jrpettus / streamlit-buffett

Snowflake LLM-based text to SQL and document retrieval in Streamlit
https://jrpettus-streamlit-buffett-buffett-app-hqw5pq.streamlit.app/
42 stars 35 forks source link

[Bug report] Buffett app not working #5

Closed kagurashi closed 1 year ago

kagurashi commented 1 year ago

Hi @Randy,

I'm writing to report a bug with the Buffett app that is hosted on your GitHub repository. The app is no longer working on the App Gallery of "Streamlit in Snowflake" at the following URL:

https://jrpettus-streamlit-buffett-buffett-app-hqw5pq.streamlit.app/

I'm receiving the following error message:

NameError: name 'output' is not defined

Traceback:

File "/home/adminuser/venv/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
exec(code, module.dict)
File "/mount/src/streamlit-buffett/buffett_app.py", line 145, in <module>
st.write(output)

I've tried to reproduce the bug on my own machine by following these steps:

  1. Go to the app's website: https://jrpettus-streamlit-buffett-buffett-app-hqw5pq.streamlit.app/
  2. Enter the following text in the textbox "Financial Statement Questions": "What was Proctor and Gamble's net income from 2010 through 2020?"

I've attached a screenshot of the error message. fig

I'm a big fan of your work and have been using this app to learn more about developing useful applications. I would introduce it to my coworkers if the bug were fixed. I would be very grateful if you could fix this bug so that I can continue to use it.

Thanks, Kagurashi

jrpettus commented 1 year ago

Thanks, @kagurashi. OpenAI changed the API which broke the langchain integration, and others have experienced this as well see here. I had set langchain==0.0.124 in requirements.txt but openai was left open, so for now I have resolved with the following in the requirments:

openai==0.27.3 langchain==0.0.124

I will look into bringing langchain and OpenAI to be more current, but the app is back to working.