MCPcopy Create free account
hub / github.com/X-PLUG/MobileAgent / parse_response

Method parse_response

UI-S1/x/data/agent/json.py:112–117  ·  view source on GitHub ↗
(self, model_response, restrict_mode=False)

Source from the content-addressed store, hash-verified

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']

Callers 4

process_lineFunction · 0.45

Calls 2

parse_actionMethod · 0.95
parse_tagsFunction · 0.90

Tested by

no test coverage detected