Browse Source

clean_agent

丁云鹏 1 week ago
parent
commit
e2a620116e
1 changed files with 2 additions and 4 deletions
  1. 2 4
      agents/clean_agent/agent.py

+ 2 - 4
agents/clean_agent/agent.py

@@ -63,10 +63,6 @@ def chatbot(state: State):
     assert len(message.tool_calls) <= 1
     return {"messages": [message]}
 
-def main():
-    start("Can you look up when LangGraph was released? When you have the answer, use the human_assistance tool for review.")
-
-
 def execute_agent_with_api(user_input: str):
     global graph, llm_with_tools, prompt
     
@@ -115,6 +111,8 @@ def execute_agent_with_api(user_input: str):
     # 返回结果
     return "\n".join(results) if results else "Agent执行完成,但没有返回结果"
 
+def main():
+    execute_agent_with_api("Can you look up when LangGraph was released? When you have the answer, use the human_assistance tool for review.")
 
 if __name__ == '__main__':
     main()