VRSEN / agency-swarm

The only reliable agent framework built on top of the latest OpenAI Assistants API.
https://vrsen.github.io/agency-swarm/
MIT License
2.06k stars 539 forks source link

FieldInfo object is not iterable #83

Closed programmer22 closed 2 months ago

programmer22 commented 4 months ago

I have this error:

(venv) nicklopacki@Nick-Macbook-Pro CryptoSphereInsight % python3 agency.py Error parsing tool: ModelDevelopmentTool.py Traceback (most recent call last): File "/Users/nicklopacki/Music/agency-swarm/CryptoSphereInsight/agency.py", line 8, in <module> predictiveAnalyst = PredictiveAnalyst() ^^^^^^^^^^^^^^^^^^^ File "/Users/nicklopacki/Music/agency-swarm/CryptoSphereInsight/PredictiveAnalyst/PredictiveAnalyst.py", line 6, in __init__ super().__init__( File "/Users/nicklopacki/Music/agency-swarm/venv/lib/python3.11/site-packages/agency_swarm/agents/agent.py", line 99, in __init__ self._parse_tools_folder() File "/Users/nicklopacki/Music/agency-swarm/venv/lib/python3.11/site-packages/agency_swarm/agents/agent.py", line 364, in _parse_tools_folder raise e File "/Users/nicklopacki/Music/agency-swarm/venv/lib/python3.11/site-packages/agency_swarm/agents/agent.py", line 360, in _parse_tools_folder tool = ToolFactory.from_file(f_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/nicklopacki/Music/agency-swarm/venv/lib/python3.11/site-packages/agency_swarm/tools/ToolFactory.py", line 273, in from_file spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 940, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/Users/nicklopacki/Music/agency-swarm/CryptoSphereInsight/PredictiveAnalyst/tools/ModelDevelopmentTool.py", line 7, in <module> class ModelDevelopmentTool(BaseTool): File "/Users/nicklopacki/Music/agency-swarm/venv/lib/python3.11/site-packages/pydantic/_internal/_model_construction.py", line 90, in __new__ config_wrapper = ConfigWrapper.for_model(bases, namespace, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/nicklopacki/Music/agency-swarm/venv/lib/python3.11/site-packages/pydantic/_internal/_config.py", line 123, in for_model config_new.update(config_from_namespace) TypeError: 'FieldInfo' object is not iterable

It has to do how it is interacting with pydantic and the FieldInfo specifically but I can't figure out past this. Can anyone help?

github-actions[bot] commented 2 months ago

This issue is stale because it has been open for 30 days with no activity. Please upgrade to the latest version and test it again.

github-actions[bot] commented 2 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale. If the issue still persists, please reopen.