Hi Streamlit community !
I’m trying to use OpenAI API in my streamlit app.
To do so, I added in my requierements a line “openai” and in my code “import openai”
However I get an error in “Manage app terminal” (cf. screenshot bellow)
Do you know what’s wrong here and how to fix ? Thks
Hello !
Thanks for your feedback. I will check new guidelines.
Yes it is working locally.
The repo is private so I do not understand why it is not working within Streamlit cloud.
The traceback in the screenshot makes clear what the error is. For openai==0.0.2:
This package is a placeholder on the public PyPi instance, and is not the correct version to install
The version of openai getting installed is just an obsolete placeholder and not a real package. You need to pin a more recent version in your requirements, such as openai==0.25.0
Happy Streamlit-ing! Snehan
Going forward, please follow our guidelines on posting an effective question and include relevant information that will help the community debug your issue. That includes links to your GitHub repo, app, and the contents of your requirements file.