Update app.py
Browse files
app.py
CHANGED
|
@@ -42,7 +42,7 @@ def call_openai_api(user_prompt):
|
|
| 42 |
],
|
| 43 |
)
|
| 44 |
ai_response = response.choices[0].message['content']
|
| 45 |
-
chat_history += f"\nUser: {user_prompt}\nAI: {ai_response}
|
| 46 |
return chat_history
|
| 47 |
except Exception as e:
|
| 48 |
if attempt < max_retries - 1: # if it's not the last attempt
|
|
|
|
| 42 |
],
|
| 43 |
)
|
| 44 |
ai_response = response.choices[0].message['content']
|
| 45 |
+
chat_history += f"\nUser: {user_prompt}\nAI: {ai_response}\n"
|
| 46 |
return chat_history
|
| 47 |
except Exception as e:
|
| 48 |
if attempt < max_retries - 1: # if it's not the last attempt
|