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

Method stream

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

Default implementation of stream, which calls invoke. Subclasses should override this method if they support streaming output.

(
        self,
        input: Input,
        config: Optional[RunnableConfig] = None,
        **kwargs: Optional[Any],
    )

Source from the content-addressed store, hash-verified

804 yield await coro
805
806 def stream(
807 self,
808 input: Input,
809 config: Optional[RunnableConfig] = None,
810 **kwargs: Optional[Any],
811 ) -> Iterator[Output]:
812 """
813 Default implementation of stream, which calls invoke.
814 Subclasses should override this method if they support streaming output.
815 """
816 yield self.invoke(input, config, **kwargs)
817
818 async def astream(
819 self,

Callers 15

transformMethod · 0.95
test_watsonxllm_streamFunction · 0.45
test_streamFunction · 0.45
test_streamFunction · 0.45
test_streamFunction · 0.45
test_streaming_tool_callFunction · 0.45
test_anthropic_streamingFunction · 0.45
test_streamFunction · 0.45
test_streamFunction · 0.45
test_anthropic_streamingFunction · 0.45

Calls 1

invokeMethod · 0.95

Tested by 15

test_watsonxllm_streamFunction · 0.36
test_streamFunction · 0.36
test_streamFunction · 0.36
test_streamFunction · 0.36
test_streaming_tool_callFunction · 0.36
test_anthropic_streamingFunction · 0.36
test_streamFunction · 0.36
test_streamFunction · 0.36
test_anthropic_streamingFunction · 0.36