_stream() — langchain Function Reference
Architecture documentation for the _stream() function in chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 7d7d41f3_46ef_cc4d_a8a4_38e778bdb10b["_stream()"] f3181e26_0568_4993_612c_5b8d73ad3c37["ChatDeepSeek"] 7d7d41f3_46ef_cc4d_a8a4_38e778bdb10b -->|defined in| f3181e26_0568_4993_612c_5b8d73ad3c37 style 7d7d41f3_46ef_cc4d_a8a4_38e778bdb10b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/deepseek/langchain_deepseek/chat_models.py lines 345–368
def _stream(
self,
messages: list[BaseMessage],
stop: list[str] | None = None,
run_manager: CallbackManagerForLLMRun | None = None,
**kwargs: Any,
) -> Iterator[ChatGenerationChunk]:
try:
yield from super()._stream(
messages,
stop=stop,
run_manager=run_manager,
**kwargs,
)
except JSONDecodeError as e:
msg = (
"DeepSeek API returned an invalid response. "
"Please check the API status and try again."
)
raise JSONDecodeError(
msg,
e.doc,
e.pos,
) from e
Domain
Subdomains
Source
Frequently Asked Questions
What does _stream() do?
_stream() is a function in the langchain codebase, defined in libs/partners/deepseek/langchain_deepseek/chat_models.py.
Where is _stream() defined?
_stream() is defined in libs/partners/deepseek/langchain_deepseek/chat_models.py at line 345.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free