修复小bug

This commit is contained in:
h88782481 2026-03-13 17:53:51 +08:00
parent ae059ffcb8
commit 406a36af89
5 changed files with 92 additions and 13 deletions

View file

@ -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