修复小bug
This commit is contained in:
parent
ae059ffcb8
commit
406a36af89
5 changed files with 92 additions and 13 deletions
|
|
@ -165,6 +165,9 @@ def _handle_openai_stream(
|
|||
for chunk in iter_openai_sse(resp):
|
||||
if chunk is None:
|
||||
_dbg(f'流式响应结束,共 {chunk_count} 个数据片段')
|
||||
close_chunk = think_extractor.finalize()
|
||||
if close_chunk:
|
||||
yield sse_data_message(close_chunk)
|
||||
yield sse_data_message('[DONE]')
|
||||
return
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue