Open AlefAlfa opened 1 year ago
Getting the same error: AttributeError: OPENAI_FUNCTIONS. How to fix it?
using langchain is pain in the ass , hard to debug .
I get this error when I run the code directly. When I use "Streamlit run app.py", the app works.
That's cause you are using an older version of langchain, you gotta upgrade it via pip3 install --upgrade langchain
AttributeError: OPENAI_FUNCTIONS Traceback: File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script exec(code, module.dict) File "/Users/lev/Documents/Github/researcher-gpt/app.py", line 169, in
agent=AgentType.OPENAI_FUNCTIONS,
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/enum.py", line 786, in getattr
raise AttributeError(name) from None