This commit is contained in:
hailin 2025-08-01 14:25:54 +08:00
parent effd559734
commit f32175aa48
1 changed files with 3 additions and 3 deletions

View File

@ -162,9 +162,8 @@ def chat(
txt = str(result).strip() txt = str(result).strip()
# ✅ 推荐返回结构,自动渲染 + 自动 history 追加 # ✅ 推荐返回结构,自动渲染 + 自动 history 追加
#yield {"text": txt}, log_state yield {"text": txt}, log_state
#return return
return txt, log_state
else: else:
while thread.is_alive(): while thread.is_alive():
try: try:
@ -211,6 +210,7 @@ with gr.Blocks(title="调试界面") as demo:
rep_pen, pres_pen, stop_txt, rep_pen, pres_pen, stop_txt,
api_choice, log_state], api_choice, log_state],
additional_outputs=[log_state], additional_outputs=[log_state],
streaming=True,
type="messages" type="messages"
) )