Browse Source

feat-sse-len-in-meta

master
Serge Shutov 2 weeks ago
parent
commit
38a1399c38
  1. 2
      injected/chat-logger.js

2
injected/chat-logger.js

@ -206,7 +206,7 @@ @@ -206,7 +206,7 @@
accum: accum,
delta: delta,
chars: ctxChars,
chat_id: chatId, parent_id: pid, sse_calls: sseCalls, req_keys: reqKeys, 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
chat_id: chatId, parent_id: pid, sse_calls: sseCalls, sse_len: assistant.length, sse_len: assistant.length, req_keys: reqKeys, 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_tok: Math.round(charsAccum / K_RATIO), ctx_pct: Math.round(charsAccum / K_RATIO * 1000 / CONTEXT_LIMIT) / 10 }) })) } catch (e) { }
}

Loading…
Cancel
Save