Spaces:
Sleeping
Sleeping
Update utils/response_manager.py
Browse files
utils/response_manager.py
CHANGED
@@ -114,4 +114,10 @@ class ResponseManager:
|
|
114 |
logging.error(f"An error occurred while generating a response: {e}")
|
115 |
error_message = "Sorry, I couldn't generate a response at this time. Please try again later."
|
116 |
input_data.append({"role": "assistant", "content": error_message})
|
117 |
-
return history + input_data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
logging.error(f"An error occurred while generating a response: {e}")
|
115 |
error_message = "Sorry, I couldn't generate a response at this time. Please try again later."
|
116 |
input_data.append({"role": "assistant", "content": error_message})
|
117 |
+
return history + input_data
|
118 |
+
|
119 |
+
def reset_conversation(self):
|
120 |
+
"""
|
121 |
+
Reset the conversation state internally maintained by OpenAI Response API.
|
122 |
+
"""
|
123 |
+
self.previous_response_id = None
|