MCPcopy Create free account
hub / github.com/OpenBMB/BMTools / prep_outputs

Method prep_outputs

bmtools/agent/executor.py:13–26  ·  view source on GitHub ↗
(
        self,
        inputs: Dict[str, str],
        outputs: Dict[str, str],
        return_only_outputs: bool = False,
    )

Source from the content-addressed store, hash-verified

11 translator: Translator = Translator()
12
13 def prep_outputs(
14 self,
15 inputs: Dict[str, str],
16 outputs: Dict[str, str],
17 return_only_outputs: bool = False,
18 ) -> Dict[str, str]:
19 try:
20 outputs = super().prep_outputs(inputs, outputs, return_only_outputs)
21 except ValueError as e:
22 return outputs
23 else:
24 if "input" in outputs:
25 outputs = self.translator(outputs)
26 return outputs
27
28class Executor(AgentExecutorWithTranslation):
29 def _call(self, inputs: Dict[str, str]) -> Dict[str, Any]:

Callers 1

__call__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected