Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def call_openai_api(user_prompt):
|
|
41 |
],
|
42 |
)
|
43 |
response.choices[0].message['content']
|
44 |
-
|
45 |
if attempt < max_retries - 1: # if it's not the last attempt
|
46 |
time.sleep(1) # wait for 1 seconds before retrying
|
47 |
continue
|
|
|
41 |
],
|
42 |
)
|
43 |
response.choices[0].message['content']
|
44 |
+
except Exception as e:
|
45 |
if attempt < max_retries - 1: # if it's not the last attempt
|
46 |
time.sleep(1) # wait for 1 seconds before retrying
|
47 |
continue
|