This commit is contained in:
hailin 2025-08-01 20:15:06 +08:00
parent aec50e2029
commit 01ce15ddeb
1 changed files with 1 additions and 3 deletions

View File

@ -148,10 +148,8 @@ def chat(
except Empty: except Empty:
continue continue
# 你用 backend 返回的其实已经是 content 字符串了,不要再转 json
txt = result.strip() if isinstance(result, str) else str(result).strip() txt = result.strip() if isinstance(result, str) else str(result).strip()
# 注意,这里必须 yield {"text": txt}, log_state
print("==UI OUTPUT==", repr(txt))
yield {"text": txt}, log_state yield {"text": txt}, log_state
return return
else: else: