MCPcopy
hub / github.com/SqueezeAILab/LLMCompiler / _parse_generation

Method _parse_generation

src/chains/llm_chain.py:363–372  ·  view source on GitHub ↗
(
        self, generation: List[Dict[str, str]]
    )

Source from the content-addressed store, hash-verified

361 return self._parse_generation(result)
362
363 def _parse_generation(
364 self, generation: List[Dict[str, str]]
365 ) -> Sequence[Union[str, List[str], Dict[str, str]]]:
366 if self.prompt.output_parser is not None:
367 return [
368 self.prompt.output_parser.parse(res[self.output_key])
369 for res in generation
370 ]
371 else:
372 return generation
373
374 async def aapply_and_parse(
375 self, input_list: List[Dict[str, Any]], callbacks: Callbacks = None

Callers 2

apply_and_parseMethod · 0.95
aapply_and_parseMethod · 0.95

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected