大修_execute_request炸程序的问题

This commit is contained in:
UnCLAS-Prommer
2025-04-09 13:52:12 +08:00
parent a42d1b3664
commit e35c2bb9b4
9 changed files with 93 additions and 46 deletions

View File

@@ -117,9 +117,12 @@ class GoalAnalyzer:
}}"""
logger.debug(f"发送到LLM的提示词: {prompt}")
content, _ = await self.llm.generate_response_async(prompt)
logger.debug(f"LLM原始返回内容: {content}")
try:
content, _ = await self.llm.generate_response_async(prompt)
logger.debug(f"LLM原始返回内容: {content}")
except Exception as e:
logger.error(f"分析对话目标时出错: {str(e)}")
content = ""
# 使用简化函数提取JSON内容
success, result = get_items_from_json(
content,