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 => {
|
return params.data.map(msg => {
|
||||||
const { completion_probabilities } = msg;
|
const { completion_probabilities } = msg;
|
||||||
|
|
||||||
let pColor = 'transparent';
|
// Skip byte pair
|
||||||
if (completion_probabilities.length === 1) {
|
if (completion_probabilities.length > 1) return msg.content
|
||||||
const { probs } = completion_probabilities[0]
|
|
||||||
const found = probs.find(p => p.tok_str === msg.content)
|
const { probs } = completion_probabilities[0]
|
||||||
pColor = probColor(found ? found.prob : 0)
|
const found = probs.find(p => p.tok_str === msg.content)
|
||||||
}
|
const pColor = probColor(found ? found.prob : 0)
|
||||||
|
|
||||||
const popoverChildren = html`
|
const popoverChildren = html`
|
||||||
<div>
|
<div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue