server : skip byte pair in display probabilites
This commit is contained in:
parent
236c838d23
commit
3409735cff
1 changed files with 6 additions and 6 deletions
|
@ -441,12 +441,12 @@
|
|||
return params.data.map(msg => {
|
||||
const { completion_probabilities } = msg;
|
||||
|
||||
let pColor = 'transparent';
|
||||
if (completion_probabilities.length === 1) {
|
||||
const { probs } = completion_probabilities[0]
|
||||
const found = probs.find(p => p.tok_str === msg.content)
|
||||
pColor = probColor(found ? found.prob : 0)
|
||||
}
|
||||
// Skip byte pair
|
||||
if (completion_probabilities.length > 1) return msg.content
|
||||
|
||||
const { probs } = completion_probabilities[0]
|
||||
const found = probs.find(p => p.tok_str === msg.content)
|
||||
const pColor = probColor(found ? found.prob : 0)
|
||||
|
||||
const popoverChildren = html`
|
||||
<div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue