Haolong Li commited on
Commit
3ac19a5
·
1 Parent(s): eae83f7

Update ControllerAtomicFlow.py

Browse files
Files changed (1) hide show
  1. ControllerAtomicFlow.py +1 -1
ControllerAtomicFlow.py CHANGED
@@ -78,6 +78,6 @@ class ControllerAtomicFlow(OpenAIChatAtomicFlow):
78
  except json.decoder.JSONDecodeError:
79
  new_input_data = input_data.copy()
80
  new_input_data['observation'] = ""
81
- new_input_data['human_feedback'] = "The previous respond cannot be parsed with json.loads, it could be the backslashes used for escaping single quotes in the string arguments of the Python code are not properly escaped themselves within the JSON context."
82
  new_api_output = super().run(new_input_data)["api_output"].strip()
83
  return json.loads(new_api_output)
 
78
  except json.decoder.JSONDecodeError:
79
  new_input_data = input_data.copy()
80
  new_input_data['observation'] = ""
81
+ new_input_data['human_feedback'] = "The previous respond cannot be parsed with json.loads, it could be the backslashes used for escaping single quotes in the string arguments of the Python code are not properly escaped themselves within the JSON context. Make sure your next response is in JSON format."
82
  new_api_output = super().run(new_input_data)["api_output"].strip()
83
  return json.loads(new_api_output)