streamlit / llm-examples

Streamlit LLM app examples for getting started
https://streamlit.io/generative-ai
Apache License 2.0
613 stars 1.31k forks source link

Errors on demo page #11

Closed BuggieCoder closed 1 year ago

BuggieCoder commented 1 year ago

I got this error while testing the bots https://llm-examples.streamlit.app/:

openai.error.AuthenticationError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you're on Streamlit Cloud, click on 'Manage app' in the lower right of your app). Traceback: File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script exec(code, module.dict) File "/app/llm-examples/Chatbot.py", line 24, in response = openai.ChatCompletion.create(model="gpt-3.5-turbo", messages=st.session_state.messages) File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_resources/chat_completion.py", line 25, in create return super().create(*args, **kwargs) File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_resources/abstract/engine_apiresource.py", line 153, in create response, , api_key = requestor.request( File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_requestor.py", line 298, in request resp, got_stream = self._interpret_response(result, stream) File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_requestor.py", line 700, in _interpret_response self._interpret_response_line( File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_requestor.py", line 763, in _interpret_response_line raise self.handle_error_response(

sfc-gh-jcarroll commented 1 year ago

Hi @BuggieCoder it looks like you used an invalid OpenAI API Key. If you try it with a confirmed valid key and still have issues, let us know and feel free to reopen this. TY!