Traceback (most recent call last):
File "/Users/fenyi/codesy/swarm-test/test.py", line 109, in <module>
agent1 = Agent(
^^^^^^
File "/Users/fenyi/codesy/swarm-test/.venv/lib/python3.12/site-packages/swarms/structs/agent.py", line 407, in __init__
self.tool_struct = BaseTool(
^^^^^^^^^
File "/Users/fenyi/codesy/swarm-test/.venv/lib/python3.12/site-packages/pydantic/main.py", line 194, in __init__
self.__pydantic_validator__.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for BaseTool
base_models
Input should be a valid list [type=list_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.8/v/list_type
Sentry is attempting to send 2 pending events
bug from here
actually list_base_models does not have default value,
you can ealisy find this question with this code
`from swarms import Agent
from swarms.prompts.tools import tool_sop_prompt
from swarm_models import OpenAIChat
from swarms_memory import ChromaDB
import subprocess
import os
from swarms.tools.base_tool import BaseTool
def terminal(
code: str,
):
"""
Run code in the terminal.
Args:
code (str): The code to run in the terminal.
Returns:
str: The output of the code.
"""
out = subprocess.run(
code, shell=True, capture_output=True, text=True
).stdout
return str(out)
when i try example with this https://docs.swarms.world/en/latest/swarms/tools/build_tool/#integrate-tools-into-agent
i get this error:
bug from here
actually list_base_models does not have default value,
you can ealisy find this question with this code `from swarms import Agent from swarms.prompts.tools import tool_sop_prompt
from swarm_models import OpenAIChat from swarms_memory import ChromaDB import subprocess import os from swarms.tools.base_tool import BaseTool
def terminal( code: str, ): """ Run code in the terminal.
BaseTool( tools=[terminal], base_models=None, tool_system_prompt=tool_sop_prompt(), )`
Upvote & Fund