1
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user