fix:V3哈气
This commit is contained in:
@@ -762,9 +762,15 @@ class HeartFChatting:
|
||||
# 执行LLM请求
|
||||
|
||||
try:
|
||||
print("prompt")
|
||||
print("prompt")
|
||||
print("prompt")
|
||||
print(payload)
|
||||
print(prompt)
|
||||
response = await self.planner_llm._execute_request(
|
||||
endpoint="/chat/completions", payload=payload, prompt=prompt
|
||||
)
|
||||
print(response)
|
||||
except Exception as req_e:
|
||||
logger.error(f"{self.log_prefix}[Planner] LLM请求执行失败: {req_e}")
|
||||
return {
|
||||
@@ -779,6 +785,9 @@ class HeartFChatting:
|
||||
# 处理LLM响应
|
||||
with Timer("使用工具", cycle_timers):
|
||||
# 使用辅助函数处理工具调用响应
|
||||
print(1111122222222222)
|
||||
print(response)
|
||||
|
||||
success, arguments, error_msg = process_llm_tool_response(
|
||||
response, expected_tool_name="decide_reply_action", log_prefix=f"{self.log_prefix}[Planner] "
|
||||
)
|
||||
|
||||
@@ -213,6 +213,9 @@ def process_llm_tool_calls(response: List[Any], log_prefix: str = "") -> Tuple[b
|
||||
元组 (成功标志, 工具调用列表, 错误消息)
|
||||
"""
|
||||
# 确保响应格式正确
|
||||
print(response)
|
||||
print(11111111111111111)
|
||||
|
||||
if len(response) != 3:
|
||||
return False, [], f"LLM响应元素数量不正确: 预期3个元素,实际{len(response)}个"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user