Spaces:
Sleeping
Sleeping
samlonka
commited on
Commit
•
87886ae
1
Parent(s):
7d84684
'memory'
Browse files
app.py
CHANGED
@@ -165,11 +165,10 @@ try:
|
|
165 |
message = {"role": "assistant", "content": response.response}
|
166 |
st.session_state.messages.append(message)
|
167 |
|
168 |
-
except openai.
|
169 |
# Handle the RateLimitError
|
170 |
st.error(f"RateLimitError: {e}")
|
171 |
st.error("You have exceeded your API quota. Please check your plan and billing details.")
|
172 |
-
st.error("For more information, read the OpenAI documentation: https://platform.openai.com/docs/guides/error-codes/api-errors.")
|
173 |
except Exception as e:
|
174 |
# Handle other exceptions if needed
|
175 |
st.error(f"An unexpected error occurred: {e}")
|
|
|
165 |
message = {"role": "assistant", "content": response.response}
|
166 |
st.session_state.messages.append(message)
|
167 |
|
168 |
+
except openai.RateLimitError as e:
|
169 |
# Handle the RateLimitError
|
170 |
st.error(f"RateLimitError: {e}")
|
171 |
st.error("You have exceeded your API quota. Please check your plan and billing details.")
|
|
|
172 |
except Exception as e:
|
173 |
# Handle other exceptions if needed
|
174 |
st.error(f"An unexpected error occurred: {e}")
|