| 663 | output_processors: Optional[DataComponent] |
| 664 | |
| 665 | def __init__( |
| 666 | self, |
| 667 | *, |
| 668 | model_client: ModelClient, |
| 669 | model_kwargs: Dict[str, Any] = {}, |
| 670 | output_processors: Optional[DataComponent] = None, |
| 671 | ) -> None: |
| 672 | |
| 673 | super().__init__(model_kwargs=model_kwargs) |
| 674 | if not isinstance(model_kwargs, Dict): |
| 675 | raise TypeError( |
| 676 | f"{type(self).__name__} requires a dictionary for model_kwargs, not a string" |
| 677 | ) |
| 678 | self.model_kwargs = model_kwargs.copy() |
| 679 | |
| 680 | if not isinstance(model_client, ModelClient): |
| 681 | raise TypeError( |
| 682 | f"{type(self).__name__} requires a ModelClient instance for model_client." |
| 683 | ) |
| 684 | self.model_client = model_client |
| 685 | self.output_processors = output_processors |
| 686 | |
| 687 | def call( |
| 688 | self, |