jgravelle / AutoGroq

AutoGroq is a groundbreaking tool that revolutionizes the way users interact with Autogen™ and other AI assistants. By dynamically generating tailored teams of AI agents based on your project requirements, AutoGroq eliminates the need for manual configuration and allows you to tackle any question, problem, or project with ease and efficiency.
https://autogroq.streamlit.app/
1.21k stars 422 forks source link

crashed app #6

Closed JamesFincher closed 2 months ago

JamesFincher commented 2 months ago

Was just going back and forth with the agents and this occurred. Had a similar error earlier.

NameError: name 'url_content' is not defined Traceback: File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 537, in _run_script self._session_state.on_script_will_rerun(rerun_data.widget_states) File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/streamlit/runtime/state/safe_session_state.py", line 68, in on_script_will_rerun self._state.on_script_will_rerun(latest_widget_states) File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/streamlit/runtime/state/session_state.py", line 500, in on_script_will_rerun self._call_callbacks() File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/streamlit/runtime/state/session_state.py", line 513, in _call_callbacks self._new_widget_state.call_callback(wid) File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/streamlit/runtime/state/session_state.py", line 260, in call_callback callback(*args, **kwargs) File "/teamspace/studios/this_studio/AutoGroq/AutoGroq/agent_management.py", line 22, in callback process_agent_interaction(agent_index) File "/teamspace/studios/this_studio/AutoGroq/AutoGroq/agent_management.py", line 222, in process_agent_interaction request += f" Additional input: {user_input}. Reference URL content: {url_content}."

jgravelle commented 2 months ago

The error indicates that the variable url_content is not defined in the process_agent_interaction function. Looking at the code in agent_management.py, it seems that url_content is only defined inside the construct_request function when a valid reference URL is provided. However, in the process_agent_interaction function, url_content is being used without being defined.

Pushing a fix. Thanks...!