(self, model_response, restrict_mode=False)
| 110 | return json.loads(action_str) |
| 111 | |
| 112 | def parse_response(self, model_response, restrict_mode=False): |
| 113 | result = {} |
| 114 | result = parse_tags(model_response, ['think', 'action']) |
| 115 | action_content = self.parse_action(result['action'], restrict_mode=True) |
| 116 | result['action_content'] = action_content |
| 117 | return result |
| 118 | |
| 119 | def format_response(self, step, image_ele, add_thought=True): |
| 120 | action_content = step['action_content'] |
no test coverage detected