mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-01 19:03:25 +00:00
docs: enhance docstring for disable_streaming
parameter in BaseChatModel (#31759)
Resolves #31758
This commit is contained in:
parent
e8e89b0b82
commit
9aa75eaef3
@ -300,9 +300,15 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC):
|
||||
defer to ``invoke()``/``ainvoke()``.
|
||||
|
||||
- If True, will always bypass streaming case.
|
||||
- If "tool_calling", will bypass streaming case only when the model is called
|
||||
with a ``tools`` keyword argument.
|
||||
- If ``'tool_calling'``, will bypass streaming case only when the model is called
|
||||
with a ``tools`` keyword argument. In other words, LangChain will automatically
|
||||
switch to non-streaming behavior (``invoke()``) only when the tools argument is
|
||||
provided. This offers the best of both worlds.
|
||||
- If False (default), will always use streaming case if available.
|
||||
|
||||
The main reason for this flag is that code might be written using ``.stream()`` and
|
||||
a user may want to swap out a given model for another model whose the implementation
|
||||
does not properly support streaming.
|
||||
"""
|
||||
|
||||
@model_validator(mode="before")
|
||||
|
Loading…
Reference in New Issue
Block a user