Update CodeWriterCtrlFlow.py
Browse files- CodeWriterCtrlFlow.py +2 -1
CodeWriterCtrlFlow.py
CHANGED
@@ -78,7 +78,8 @@ class CodeWriterCtrlFlow(ChatAtomicFlow):
|
|
78 |
response = json.loads(api_output)
|
79 |
return response
|
80 |
except json.decoder.JSONDecodeError:
|
|
|
81 |
new_input_data = input_data.copy()
|
82 |
-
new_input_data['
|
83 |
new_api_output = super().run(new_input_data)["api_output"].strip()
|
84 |
return json.loads(new_api_output)
|
|
|
78 |
response = json.loads(api_output)
|
79 |
return response
|
80 |
except json.decoder.JSONDecodeError:
|
81 |
+
new_goal = f"Here is your previous response {api_output}, it cannot be parsed with json.loads, please fix this issue."
|
82 |
new_input_data = input_data.copy()
|
83 |
+
new_input_data['goal'] = new_goal
|
84 |
new_api_output = super().run(new_input_data)["api_output"].strip()
|
85 |
return json.loads(new_api_output)
|