crashed app
JamesFincher opened this issue · comments
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}."
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...!