diff --git a/agentmain.py b/agentmain.py index 1253c29..382253a 100644 --- a/agentmain.py +++ b/agentmain.py @@ -137,7 +137,7 @@ class GeneraticAgent: user_input = raw_query if source == 'feishu' and len(self.history) > 1: # 如果有历史记录且来自飞书,注入到首轮 user_input 中(支持/restore恢复上下文) user_input = handler._get_anchor_prompt() + f"\n\n### 用户当前消息\n{raw_query}" - if 'gpt' in self.get_llm_name(model=True): handler._done_hooks.append('请确定用户任务是否完成,如未完成需要继续工具调用直到完成任务,确实需要问用户应使用ask_user工具') + if 'gpt' in self.get_llm_name(model=True): handler._done_hooks.append('请确定任务是否完成,如果完成请给出信息完整的简报回答,如未完成需要继续工具调用直到完成任务,确实需要问用户应使用ask_user工具') # although new handler, the **full** history is in llmclient, so it is full history! gen = agent_runner_loop(self.llmclient, sys_prompt, user_input, handler, TOOLS_SCHEMA, max_turns=40, verbose=self.verbose)