Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ def try_api(message, openai_api_key):
|
|
53 |
except openai.error.PermissionError as e:
|
54 |
#Handle permission error, e.g. check scope or log
|
55 |
print(f"OpenAI API request was not permitted: {e}")
|
56 |
-
return "oups", f"<span class='openai_error'>OpenAI API request was not permitted:
|
57 |
except openai.error.RateLimitError as e:
|
58 |
#Handle rate limit error, e.g. wait or log
|
59 |
print(f"OpenAI API request exceeded rate limit: {e}")
|
|
|
53 |
except openai.error.PermissionError as e:
|
54 |
#Handle permission error, e.g. check scope or log
|
55 |
print(f"OpenAI API request was not permitted: {e}")
|
56 |
+
return "oups", f"<span class='openai_error'>OpenAI API request was not permitted: <br />{e}</span>"
|
57 |
except openai.error.RateLimitError as e:
|
58 |
#Handle rate limit error, e.g. wait or log
|
59 |
print(f"OpenAI API request exceeded rate limit: {e}")
|