(
self, generation: List[Dict[str, str]]
)
| 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 |
no test coverage detected