fix(backend): 累积的错误修复和细节修正
This commit is contained in:
@@ -126,11 +126,11 @@ async def s_start_async_streaming_chat(
|
||||
td = getattr(chuck.choices[0].delta, "reasoning_content", None)
|
||||
cd = chuck.choices[0].delta.content
|
||||
if td:
|
||||
logger.debug(f"reasoning 流式输出:{cd}")
|
||||
# logger.debug(f"reasoning 流式输出:{cd}")
|
||||
aii_thinking += td
|
||||
yield f"data: {json.dumps({'text': td, 'type': 'thinking'}, ensure_ascii=False)}\n\n"
|
||||
if cd:
|
||||
logger.debug(f"content 流式输出:{cd}")
|
||||
# logger.debug(f"content 流式输出:{cd}")
|
||||
aii_message += cd
|
||||
yield f"data: {json.dumps({'text': cd, 'type': 'output'}, ensure_ascii=False)}\n\n"
|
||||
logger.info(f"AI 完成输出 : {aii_message}")
|
||||
|
||||
Reference in New Issue
Block a user