MCPcopy Create free account
hub / github.com/AMAP-ML/Thinking-with-Map / call

Method call

demo/qwen_agent/tools/python_executor.py:129–140  ·  view source on GitHub ↗
(self, params: Union[str, dict], **kwargs)

Source from the content-addressed store, hash-verified

127 self.timeout_length = timeout_length
128
129 def call(self, params: Union[str, dict], **kwargs) -> list:
130 try:
131 params = json5.loads(params)
132 code = params['code']
133 except Exception:
134 code = extract_code(params)
135
136 if not code.strip():
137 return ['', '']
138
139 predictions = self.apply(code)
140 return predictions
141
142 def apply(self, code: str) -> list:
143 return self.batch_apply([code])[0]

Callers

nothing calls this directly

Calls 2

applyMethod · 0.95
extract_codeFunction · 0.90

Tested by

no test coverage detected