|
@@ -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()
|