commit by Kalman.CHENG ☆

This commit is contained in:
chengminglong
2025-08-19 09:59:30 +08:00
parent 79c6cc992c
commit 827ab6dc45

View File

@@ -166,8 +166,9 @@ async def send_question(request: Request):
result += chunk
print(chunk, end='', flush=True)
except Exception as e:
no_answer_msg = "暂时无法回答这个问题呢,我专注于【" + theme_object["theme_name"] + "】这方面知识,若需这方面帮助,请告知我更准确的信息吧~"
yield f"data: {json.dumps({'reply': no_answer_msg})}\n\n"
print(f"error:{str(e)}")
result = "暂时无法回答这个问题呢,我专注于【" + theme_object["theme_name"] + "】这方面知识,若需这方面帮助,请告知我更准确的信息吧~"
yield f"data: {json.dumps({'reply': result})}\n\n"
# yield f"data: {json.dumps({'error': str(e)})}\n\n"
finally:
# 保存答案