BraisedPork
BraisedPork
WebBrowser设置了搜索引擎的api_key吗
lagent版本是0.5以上吗,不显式传api_key会报参数缺失 ```python WebBrowser( searcher_type="BingSearch", api_key=os.getenv("WEB_SEARCH_API_KEY"), topk=6 ) ```
这个格式internlm-2.5外的模型难follow上,拼一下planner和searcher的fewshot提示词(可能还要进一步调整),然后InterpreterParser和PluginParser解析工具的begin和end模式放宽松一点 ```python from mindsearch.agent.mindsearch_prompt import ( fewshot_example_cn, fewshot_example_en, graph_fewshot_example_cn, graph_fewshot_example_en, ) agent = MindSearchAgent( llm=llm, template=date, output_format=InterpreterParser( begin="", end="", template=( GRAPH_PROMPT_CN + graph_fewshot_example_cn if lang == "cn" else GRAPH_PROMPT_EN +...
参考 `WebBrowser` 当前接入的搜索引擎 https://github.com/InternLM/lagent/blob/main/lagent/actions/web_browser.py
It seems that there's an error in tool parsing. Could you provide detailed logs ```python from lagent.hooks import MessageLogger searcher_agent.agent.register_hook(MessageLogger()) ```
How about setting `stop_words=["", ""]` or ```python output_format=PluginParser( template=(searcher_system_prompt_cn), tool_info=get_plugin_prompt(plugins), begin='', end='' ) ```
The plugin parser splits messages with `'\n'` and `'\n'` by default, and the action part will be loaded through `json.loads`. See the code https://github.com/InternLM/lagent/blob/main/lagent/prompts/parsers/tool_parser.py#L44 I think missing newline at the...
Add examples to system prompts. See https://github.com/InternLM/MindSearch/issues/249#issuecomment-2472680114 I used BingSearch,for DDGS keeps reporting timeout errors. * `__init__.py` ```python agent = (AsyncMindSearchAgent if use_async else MindSearchAgent)( llm=llm, template=date, output_format=InterpreterParser( begin="", end="",...
Have you checked if there's any syntax error in the code block from the planner's response? Most errors above are caused by its coding capability.