Fix repeated stream finishes and preserve cancellation causes
This commit is contained in:
1 parent
3170b28251
commit
019a38f111
5 files changed
+68
-2
No files matched your search
@@ -339,6 +339,7 @@ func (p *OpenAIProvider) ChatStream(ctx context.Context, req llm.ChatRequest) (<
|
||||
// Finish reason
|
||||
if choice.FinishReason == openai.FinishReasonToolCalls || choice.FinishReason == openai.FinishReasonStop {
|
||||
emitToolCalls(events, toolCalls)
|
||||
clear(toolCalls)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user