Transform a single input into an output. Override to implement. Args: input: The input to the runnable. config: A config to use when invoking the runnable. The config supports standard keys like 'tags', 'metadata' for tracing purposes, '
(self, input: Input, config: Optional[RunnableConfig] = None)
| 579 | |
| 580 | @abstractmethod |
| 581 | def invoke(self, input: Input, config: Optional[RunnableConfig] = None) -> Output: |
| 582 | """Transform a single input into an output. Override to implement. |
| 583 | |
| 584 | Args: |
| 585 | input: The input to the runnable. |
| 586 | config: A config to use when invoking the runnable. |
| 587 | The config supports standard keys like 'tags', 'metadata' for tracing |
| 588 | purposes, 'max_concurrency' for controlling how much work to do |
| 589 | in parallel, and other keys. Please refer to the RunnableConfig |
| 590 | for more details. |
| 591 | |
| 592 | Returns: |
| 593 | The output of the runnable. |
| 594 | """ |
| 595 | |
| 596 | async def ainvoke( |
| 597 | self, input: Input, config: Optional[RunnableConfig] = None, **kwargs: Any |