ai调试ok
This commit is contained in:
@@ -81,6 +81,10 @@ export async function streamChat(messages, options = {}, handlers = {}) {
|
||||
switch (frame.type) {
|
||||
case 'delta':
|
||||
handlers.onDelta?.(frame.text || '')
|
||||
if (frame.stats) handlers.onStats?.(frame.stats)
|
||||
break
|
||||
case 'reasoning':
|
||||
handlers.onReasoning?.(frame.text || '', frame)
|
||||
break
|
||||
case 'trace':
|
||||
handlers.onTrace?.(frame)
|
||||
|
||||
Reference in New Issue
Block a user