File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
libs/core/langchain_core/language_models Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -300,9 +300,15 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC):
300
300
defer to ``invoke()``/``ainvoke()``.
301
301
302
302
- If True, will always bypass streaming case.
303
- - If "tool_calling", will bypass streaming case only when the model is called
304
- with a ``tools`` keyword argument.
303
+ - If ``'tool_calling'``, will bypass streaming case only when the model is called
304
+ with a ``tools`` keyword argument. In other words, LangChain will automatically
305
+ switch to non-streaming behavior (``invoke()``) only when the tools argument is
306
+ provided. This offers the best of both worlds.
305
307
- If False (default), will always use streaming case if available.
308
+
309
+ The main reason for this flag is that code might be written using ``.stream()`` and
310
+ a user may want to swap out a given model for another model whose the implementation
311
+ does not properly support streaming.
306
312
"""
307
313
308
314
@model_validator (mode = "before" )
You can’t perform that action at this time.
0 commit comments