agentscope-ai / agentscope-ai/agentscope
[Bug]:某些模型不支持工具调用,可以增加一个自动退档的功能吗?
- Ngôn ngữ chính
- Python
- Star
- 31.5k
- Fork
- 3.5k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 95
Mô tả
Traceback (most recent call last):
File "C:\Users\high-genius\WorkDir\a2a_agents\wind_agent\main.py", line 57, in
asyncio.run(main())
File "C:\Users\high-genius\AppData\Roaming\uv\python\cpython-3.12.10-windows-x86_64-none\Lib\asyncio\runners.py", line 195, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Users\high-genius\AppData\Roaming\uv\python\cpython-3.12.10-windows-x86_64-none\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\high-genius\AppData\Roaming\uv\python\cpython-3.12.10-windows-x86_64-none\Lib\asyncio\base_events.py", line 691, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\high-genius\WorkDir\a2a_agents\wind_agent\main.py", line 51, in main
msg = await agent(msg)
^^^^^^^^^^^^^^^^
File "C:\Users\high-genius\WorkDir\a2a_agents\wind_agent\.venv\Lib\site-packages\agentscope\agent\_agent_base.py", line 455, in __call__
reply_msg = await self.reply(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\high-genius\WorkDir\a2a_agents\wind_agent\.venv\Lib\site-packages\agentscope\agent\_agent_meta.py", line 120, in async_wrapper
current_output = await original_func(
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\high-genius\WorkDir\a2a_agents\wind_agent\.venv\Lib\site-packages\agentscope\tracing\_trace.py", line 390, in wrapper
return await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\high-genius\WorkDir\a2a_agents\wind_agent\.venv\Lib\site-packages\agentscope\agent\_react_agent.py", line 437, in reply
msg_reasoning = await self._reasoning(tool_choice)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\high-genius\WorkDir\a2a_agents\wind_agent\.venv\Lib\site-packages\agentscope\agent\_agent_meta.py", line 120, in async_wrapper
current_output = await original_func(
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\high-genius\WorkDir\a2a_agents\wind_agent\.venv\Lib\site-packages\agentscope\agent\_react_agent.py", line 568, in _reasoning
res = await self.model(
^^^^^^^^^^^^^^^^^
File "C:\Users\high-genius\WorkDir\a2a_agents\wind_agent\.venv\Lib\site-packages\agentscope\tracing\_trace.py", line 602, in async_wrapper
return await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\high-genius\WorkDir\a2a_agents\wind_agent\.venv\Lib\site-packages\agentscope\model\_ollama_model.py", line 157, in __call__
response = await self.client.chat(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\high-genius\WorkDir\a2a_agents\wind_agent\.venv\Lib\site-packages\ollama\_client.py", line 983, in chat
return await self._request(
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\high-genius\WorkDir\a2a_agents\wind_agent\.venv\Lib\site-packages\ollama\_client.py", line 767, in _request
return cls(**(await self._request_raw(*args, **kwargs)).json())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\high-genius\WorkDir\a2a_agents\wind_agent\.venv\Lib\site-packages\ollama\_client.py", line 711, in _request_raw
raise ResponseError(e.response.text, e.response.status_code) from None
ollama._types.ResponseError: registry.ollama.ai/library/deepseek-r1:1.5b does not support tools (status code: 400)
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.