|
|
|
|
@ -204,9 +204,9 @@
@@ -204,9 +204,9 @@
|
|
|
|
|
accum: accum, |
|
|
|
|
delta: delta, |
|
|
|
|
chars: ctxChars, |
|
|
|
|
est_tok: Math.round(ctxChars / K_RATIO), ctx_chars: charsAccum, ctx_pct: Math.round(charsAccum * 100 / CONTEXT_LIMIT) |
|
|
|
|
est_tok: Math.round(ctxChars / K_RATIO), ctx_chars: charsAccum, ctx_tok: Math.round(charsAccum / K_RATIO), ctx_pct: Math.round(charsAccum / K_RATIO * 1000 / CONTEXT_LIMIT) / 10 |
|
|
|
|
} |
|
|
|
|
lines.push(JSON.stringify(meta)); try { window.dispatchEvent(new CustomEvent('dshmem:metrics', { detail: JSON.stringify({ accum: accum, delta: delta, chars: ctxChars, est_tok: Math.round(ctxChars / K_RATIO), ctx_chars: charsAccum, ctx_pct: Math.round(charsAccum * 100 / CONTEXT_LIMIT) }) })) } catch (e) { } |
|
|
|
|
lines.push(JSON.stringify(meta)); try { window.dispatchEvent(new CustomEvent('dshmem:metrics', { detail: JSON.stringify({ accum: accum, delta: delta, chars: ctxChars, est_tok: Math.round(ctxChars / K_RATIO), ctx_chars: charsAccum, ctx_tok: Math.round(charsAccum / K_RATIO), ctx_pct: Math.round(charsAccum / K_RATIO * 1000 / CONTEXT_LIMIT) / 10 }) })) } catch (e) { } |
|
|
|
|
} |
|
|
|
|
if (!lines.length) return |
|
|
|
|
sendLines(file, lines).then(function (ok) { |
|
|
|
|
|