inference fixes
This commit is contained in:
@@ -66,7 +66,7 @@ export function streamMessage(sessionId, message, model, { onChunk, onDone, onEr
|
||||
try {
|
||||
const data = JSON.parse(raw);
|
||||
if (data.text) onChunk(data.text);
|
||||
if (data.done) onDone({ model, tokenCount: data.tokenCount ?? 0 });
|
||||
if (data.done) onDone({ model: data.model ?? model, tokenCount: data.tokenCount ?? 0 });
|
||||
if (data.error) onError(new Error(data.error));
|
||||
} catch {
|
||||
// malformed JSON — skip
|
||||
|
||||
Reference in New Issue
Block a user