This commit is contained in:
hailin 2025-08-01 14:04:09 +08:00
parent e71c4823ef
commit a2cc08abc6
1 changed files with 3 additions and 2 deletions

View File

@ -162,8 +162,9 @@ def chat(
txt = str(result).strip() txt = str(result).strip()
# ✅ 推荐返回结构,自动渲染 + 自动 history 追加 # ✅ 推荐返回结构,自动渲染 + 自动 history 追加
yield {"text": txt}, log_state #yield {"text": txt}, log_state
return return txt, log_state
#return
else: else:
while thread.is_alive(): while thread.is_alive():
try: try: