Update Controller_CoderFlow.py
Browse files- Controller_CoderFlow.py +4 -1
Controller_CoderFlow.py
CHANGED
@@ -118,7 +118,10 @@ class Controller_CoderFlow(ChatAtomicFlow):
|
|
118 |
response = json.loads(api_output)
|
119 |
return response
|
120 |
except (json.decoder.JSONDecodeError, json.JSONDecodeError):
|
121 |
-
|
|
|
|
|
|
|
122 |
new_input_data = input_data.copy()
|
123 |
new_input_data['result'] = new_goal
|
124 |
input_data = new_input_data
|
|
|
118 |
response = json.loads(api_output)
|
119 |
return response
|
120 |
except (json.decoder.JSONDecodeError, json.JSONDecodeError):
|
121 |
+
updated_system_message_content = self._get_message(self.system_message_prompt_template, input_data)
|
122 |
+
self._state_update_add_chat_message(content=updated_system_message_content,
|
123 |
+
role=self.flow_config["system_name"])
|
124 |
+
new_goal = "The previous respond cannot be parsed with json.loads. Next time, do not provide any comments or code blocks. Make sure your next response is purely json parsable."
|
125 |
new_input_data = input_data.copy()
|
126 |
new_input_data['result'] = new_goal
|
127 |
input_data = new_input_data
|