MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / run

Method run

eval_heldout/rewoo/nodes/Planner.py:17–26  ·  view source on GitHub ↗
(self, input, log=False)

Source from the content-addressed store, hash-verified

15 self.fewshot = fewshot
16
17 def run(self, input, log=False):
18 assert isinstance(input, self.input_type)
19 prompt = self.prefix + self.worker_prompt + self.fewshot + self.suffix + input + '\n'
20 if self.model_name in LLAMA_WEIGHTS:
21 prompt = [self.prefix + self.worker_prompt, input]
22 response = self.call_llm(prompt, self.stop)
23 completion = response["output"]
24 if log:
25 return response
26 return completion
27
28 def _get_worker(self, name):
29 if name in WORKER_REGISTRY:

Callers

nothing calls this directly

Calls 1

call_llmMethod · 0.80

Tested by

no test coverage detected