MCPcopy Index your code
hub / github.com/InternLM/InternLM / run

Method run

tools/pal_inference.py:175–183  ·  view source on GitHub ↗
(self, prompt, time_out: float = 100)

Source from the content-addressed store, hash-verified

173 return code
174
175 def run(self, prompt, time_out: float = 100):
176 code = self.generate(prompt)
177 with Timeout(time_out):
178 try:
179 exec_result = self.execute(code)
180 except Exception as e:
181 if self.verbose:
182 print(e)
183 return exec_result
184
185 def execute(self, code: List[str]):
186 self.runtime.exec_code("\n".join(code))

Callers 1

mainFunction · 0.95

Calls 3

generateMethod · 0.95
executeMethod · 0.95
TimeoutClass · 0.90

Tested by

no test coverage detected