(
self,
input: EmbedderInputType,
model_kwargs: Optional[Dict] = {},
)
| 685 | self.output_processors = output_processors |
| 686 | |
| 687 | def call( |
| 688 | self, |
| 689 | input: EmbedderInputType, |
| 690 | model_kwargs: Optional[Dict] = {}, |
| 691 | ) -> EmbedderOutputType: |
| 692 | log.debug(f"Calling {self.__class__.__name__} with input: {input}") |
| 693 | api_kwargs = self.model_client.convert_inputs_to_api_kwargs( |
| 694 | input=input, |
| 695 | model_kwargs=self._compose_model_kwargs(**model_kwargs), |
| 696 | model_type=self.model_type, |
| 697 | ) |
| 698 | try: |
| 699 | output = self.model_client.call( |
| 700 | api_kwargs=api_kwargs, model_type=self.model_type |
| 701 | ) |
| 702 | except Exception as e: |
| 703 | log.error(f"🤡 Error calling the DashScope model: {e}") |
| 704 | output = EmbedderOutput(error=str(e)) |
| 705 | return output |
| 706 | |
| 707 | async def acall( |
| 708 | self, |
nothing calls this directly
no test coverage detected