fix: openai api client (#8154)
This commit is contained in:
@@ -717,7 +717,12 @@ export class OpenAIAPIClient extends OpenAIBaseClient<
|
||||
contentSource = choice.message
|
||||
}
|
||||
|
||||
if (!contentSource) continue
|
||||
if (!contentSource) {
|
||||
if ('finish_reason' in choice && choice.finish_reason) {
|
||||
emitCompletionSignals(controller)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
const webSearchData = collectWebSearchData(chunk, contentSource, context)
|
||||
if (webSearchData) {
|
||||
|
||||
Reference in New Issue
Block a user