Spaces:
Sleeping
Sleeping
revise what stored in conversation history
Browse files- chatbot_simulator.py +1 -0
chatbot_simulator.py
CHANGED
@@ -149,6 +149,7 @@ Example Output Format:
|
|
149 |
|
150 |
self.conversation.append({"role": "assistant", "content": update_prompt})
|
151 |
updated_state = self._get_openai_response(self.conversation)
|
|
|
152 |
|
153 |
# Parse and update the user state
|
154 |
updated_state = json_repair.loads(updated_state)
|
|
|
149 |
|
150 |
self.conversation.append({"role": "assistant", "content": update_prompt})
|
151 |
updated_state = self._get_openai_response(self.conversation)
|
152 |
+
self.conversation.pop(-1)
|
153 |
|
154 |
# Parse and update the user state
|
155 |
updated_state = json_repair.loads(updated_state)
|