This commit is contained in:
2026-08-07 13:18:53 +08:00
parent 410c87e02f
commit 828594baef
19 changed files with 774 additions and 66 deletions
+1
View File
@@ -61,6 +61,7 @@ export async function streamChat(payload, handlers) {
}
if (obj.citations !== undefined) handlers.onCitations(obj)
else if (obj.content !== undefined) handlers.onDelta(obj.content)
else if (obj.type === 'thinking' && handlers.onThinking) handlers.onThinking(obj.message || '')
else if (obj.status === 'ok') handlers.onDone()
else if (obj.message) handlers.onError(new Error(obj.message))
}