Open xiongvalerio opened 3 hours ago
类似问题:为了构建一个有效的搜索图来回答关于 GitHub OAuth 的问题,我们需要将问题拆解为更具体的子问题。这些子问题将帮助我们逐步理解 GitHub OAuth 的各个方面。 首先,我们将添加一个根节点来表示原始问题,然后添加几个子节点来探索 GitHub OAuth 的不同方面。 python from ilagent.agents.python_web import WebSearchGraph graph = WebSearchGraph() graph.add_root_node(node_content="github oauth", node_name="root") # 添加关于 GitHub OAuth 的基本信息查询节点 graph.add_node( node_name="github_oauth_info", node_content="GitHub OAuth 是什么?") graph.add_edge(start_node="root", end_node="github_oauth_info") # 添加关于 GitHub OAuth 的工作流程查询节点 graph.add_node( node_name="github_oauth_workflow", node_content="GitHub OAuth 的工作流程是怎样的?") graph.add_edge(start_node="root", end_node="github_oauth_workflow") # 添加关于如何使用 GitHub OAuth API 的查询节点 graph.add_node( node_name="use_github_oauth_api", node_content="如何使用 GitHub OAuth API?") graph.add_edge(start_node="root", end_node="use_github_oauth_api") # 显示当前搜索图的结构 print(graph.node("github_oauth_info")) print(graph.node("github_oauth_workflow")) print(graph.node("use_github_oath_api"))
后端: INFO: 127.0.0.1:47766 - "POST /solve HTTP/1.1" 200 OK
{'content': 'GitHub OAuth 是什么?', 'type': 'searcher'}
{'content': 'GitHub OAuth 的工作流程是怎样的?', 'type': 'searcher'}
ERROR:root:Exception in sync_generator_wrapper: 'use_github_oath_api'
Traceback (most recent call last):
File "/www/wwwroot/xxx/search/mindsearch/app.py", line 90, in sync_generator_wrapper
for response in agent(inputs, session_id=session_id):
File "/www/wwwroot/xxx/search/mindsearch/agent/streaming.py", line 19, in call
for response_message in self.forward(*message, session_id=session_id, **kwargs):
File "/www/wwwroot/xxx/search/mindsearch/agent/mindsearch_agent.py", line 105, in forward
for graph_exec in gen:
File "/home/user/.local/lib/python3.12/site-packages/lagent/utils/util.py", line 138, in iter
self.ret = yield from self.generator
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/www/wwwroot/xxx/search/mindsearch/agent/graph.py", line 263, in run
exec(command, global_dict, local_dict)
File "
KeyError: 'use_github_oath_api'
这是mindsearch的思考:为了构建关于Gay-Lussac的搜索图,我们需要首先添加一个根节点来表示这个问题。然后,我们可以添加子节点来探索Gay-Lussac的生平、成就以及他在科学领域的具体贡献。
这是后端返回的错误:INFO: 127.0.0.1:40602 - "POST /solve HTTP/1.1" 200 OK ERROR:root:Exception in sync_generator_wrapper: 'gAY_LUSSAC_BIOGRAPHY' Traceback (most recent call last): File "/www/wwwroot/xxx/search/mindsearch/app.py", line 90, in sync_generator_wrapper for response in agent(inputs, session_id=session_id): File "/www/wwwroot/xxx/search/mindsearch/agent/streaming.py", line 19, in call for response_message in self.forward(*message, session_id=session_id, **kwargs): File "/www/wwwroot/xxx/search/mindsearch/agent/mindsearch_agent.py", line 105, in forward for graph_exec in gen: File "/home/user/.local/lib/python3.12/site-packages/lagent/utils/util.py", line 138, in iter self.ret = yield from self.generator ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/www/wwwroot/xxx/search/mindsearch/agent/graph.py", line 263, in run exec(command, global_dict, local_dict) File "", line 25, in
File "/www/wwwroot/xxx/search/mindsearch/agent/graph.py", line 220, in node
return self.nodes[node_name].copy()