Open okoliechykwuka opened 1 month ago
I'm facing the same problem.
Exact same problem here --- both when importing from agency-swarm
, and when importing from a custom module I created after importing BrowserAgent via the CLI agency-swarm import-agent
command.
Hey guys, please install from main branch using pip install --no-cache -e .
and let me know if this persists
Hey guys, please install from main branch using
pip install --no-cache -e .
and let me know if this persists
Still not working as of now.
I am using requirement or poetry . How can I install the module without using pip install --no-cache -e .
so that I can use the browsing agent
pip install --no-cache -e .
method can only work in development.
Pass local path to latest agency swarm into pip install or in your poetry dependencies. Alternatively install from github pip install --no-cache git+https://github.com/VRSEN/agency-swarm.git
@okoliechykwuka
After attempting to resolve the issue with the proposed solution, I am still encountering an error. I'm not sure how severe it is, but here is the error message:
Files folder 'C:\Users\javi\Documents\PROGRAMAS_PYTHON\agency-swarm\agency_swarm\agents\BrowsingAgent\files' is not a directory. Skipping... Schemas folder path is not a directory. Skipping... C:\Users\javi\Documents\PROGRAMAS_PYTHON\agency-swarm\agency_swarm\agents\BrowsingAgent\schemas Updating agent... GenesisCEO Updating agent... ToolCreator Updating agent... AgentCreator Updating agent... OpenAPICreator Updating agent... BrowsingAgent Any guidance on how to fix this would be greatly appreciated.
I'm running the exact same code and the BrowsingAgent is loaded in fine, but when you ask it to search anything, it shoots the following error:
File "/opt/anaconda3/envs/AgencySwarmNotebooks/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
File "/opt/anaconda3/envs/AgencySwarmNotebooks/lib/python3.11/site-packages/ipykernel/ipkernel.py", line 761, in run_closure
_threading_Thread_run(self)
File "/opt/anaconda3/envs/AgencySwarmNotebooks/lib/python3.11/threading.py", line 982, in run
self._target(*self._args, **self._kwargs)
File "/opt/anaconda3/envs/AgencySwarmNotebooks/lib/python3.11/site-packages/agency_swarm/agency/agency.py", line 196, in get_completion_stream
next(res)
File "/opt/anaconda3/envs/AgencySwarmNotebooks/lib/python3.11/site-packages/agency_swarm/threads/thread.py", line 118, in get_completion
self._create_run(recipient_agent, additional_instructions, event_handler, tool_choice)
File "/opt/anaconda3/envs/AgencySwarmNotebooks/lib/python3.11/site-packages/agency_swarm/threads/thread.py", line 274, in _create_run
stream.until_done()
File "/opt/anaconda3/envs/AgencySwarmNotebooks/lib/python3.11/site-packages/openai/lib/streaming/_assistants.py", line 102, in until_done
consume_sync_iterator(self)
File "/opt/anaconda3/envs/AgencySwarmNotebooks/lib/python3.11/site-packages/openai/_utils/_streams.py", line 6, in consume_sync_iterator
for _ in iterator:
File "/opt/anaconda3/envs/AgencySwarmNotebooks/lib/python3.11/site-packages/openai/lib/streaming/_assistants.py", line 69, in __iter__
for item in self._iterator:
File "/opt/anaconda3/envs/AgencySwarmNotebooks/lib/python3.11/site-packages/openai/lib/streaming/_assistants.py", line 405, in __stream__
self._emit_sse_event(event)
File "/opt/anaconda3/envs/AgencySwarmNotebooks/lib/python3.11/site-packages/openai/lib/streaming/_assistants.py", line 368, in _emit_sse_event
self.on_tool_call_created(self._current_tool_call)
File "/opt/anaconda3/envs/AgencySwarmNotebooks/lib/python3.11/site-packages/agency_swarm/agency/agency.py", line 392, in on_tool_call_created
raise ValueError("Invalid tool call type: " + tool_call["type"])
ValueError: Invalid tool call type: browser
This happens when I ask the agent to search anything up, including @okoliechykwuka's original prompt. It seems that it doesn't have an actual browser tool to make any searches?
Aside from the bugs, the Framework is too expensive to use.
Just added a SearchWeb tool to the BrowsingAgent in my fork ( #146 ), which resolves some of the bugs. I've also made the agent rely less on the user when navigating by taking more screenshots. Just as a note, don't leave your chrome profile path in the selenium config if you have that chrome profile already open because it will just throw an error (you can't have the same profile open more than once). Other than that make sure you're importing the agent from the right place.
This is directly from the Browsing Agent Notebook, The only added changes are in line one.
from agency_swarm.agents import BrowsingAgent
tofrom agency_swarm.agents.BrowsingAgent import BrowsingAgent
ERROR TRACRBACK
WHEN I TYPE "what is the current AAPL stock price in the radio text box, I get the below error.