Tachi67 commited on
Commit
da2cf88
·
1 Parent(s): c1f887c

Update Controller_CoderFlow.py

Browse files
Files changed (1) hide show
  1. Controller_CoderFlow.py +2 -1
Controller_CoderFlow.py CHANGED
@@ -110,8 +110,9 @@ class Controller_CoderFlow(ChatAtomicFlow):
110
  response = json.loads(api_output)
111
  return response
112
  except json.decoder.JSONDecodeError:
 
113
  new_input_data = input_data.copy()
114
- new_input_data['result'] = "The previous respond cannot be parsed with json.loads. Make sure your next response is in JSON format."
115
  new_api_output = super().run(new_input_data)["api_output"].strip()
116
  return json.loads(new_api_output)
117
 
 
110
  response = json.loads(api_output)
111
  return response
112
  except json.decoder.JSONDecodeError:
113
+ new_goal = f"Here is your previous response {api_output}, it cannot be parsed with json.loads, please fix this issue."
114
  new_input_data = input_data.copy()
115
+ new_input_data['goal'] = new_goal
116
  new_api_output = super().run(new_input_data)["api_output"].strip()
117
  return json.loads(new_api_output)
118