MCPcopy
hub / github.com/langchain-ai/langchain / invoke

Method invoke

libs/core/langchain_core/runnables/base.py:581–594  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 4

streamMethod · 0.95
invokeMethod · 0.45
_invokeMethod · 0.45
invokeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected