fix: stream response (#3682)
* perf: supplement assistant empty response * check array * fix: stream response * fix: model config cannot set to null
This commit is contained in:
@@ -208,14 +208,13 @@ export const dispatchChatCompletion = async (props: ChatProps): Promise<ChatResp
|
||||
: '';
|
||||
if (stream) {
|
||||
// Some models do not support streaming
|
||||
reasoning &&
|
||||
workflowStreamResponse?.({
|
||||
event: SseResponseEventEnum.fastAnswer,
|
||||
data: textAdaptGptResponse({
|
||||
text: answer,
|
||||
reasoning_content: reasoning
|
||||
})
|
||||
});
|
||||
workflowStreamResponse?.({
|
||||
event: SseResponseEventEnum.fastAnswer,
|
||||
data: textAdaptGptResponse({
|
||||
text: answer,
|
||||
reasoning_content: reasoning
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user