chore: update branch with changes from master (#32277)

Co-authored-by: Maxime Grenu <69890511+cluster2600@users.noreply.github.com>
Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: jmaillefaud <jonathan.maillefaud@evooq.ch>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: tanwirahmad <tanwirahmad@users.noreply.github.com>
Co-authored-by: Christophe Bornet <cbornet@hotmail.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: niceg <79145285+growmuye@users.noreply.github.com>
Co-authored-by: Chaitanya varma <varmac301@gmail.com>
Co-authored-by: dishaprakash <57954147+dishaprakash@users.noreply.github.com>
Co-authored-by: Chester Curme <chester.curme@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kanav Bansal <13186335+bansalkanav@users.noreply.github.com>
Co-authored-by: Aleksandr Filippov <71711753+alex-feel@users.noreply.github.com>
Co-authored-by: Alex Feel <afilippov@spotware.com>
This commit is contained in:
Mason Daugherty
2025-07-28 10:39:41 -04:00
committed by GitHub
parent 3496e1739e
commit 5e9eb19a83
449 changed files with 16481 additions and 5327 deletions

View File

@@ -353,8 +353,7 @@ class ChatDeepSeek(BaseChatOpenAI):
"""Model wrapper that returns outputs formatted to match the given schema.
Args:
schema:
The output schema. Can be passed in as:
schema: The output schema. Can be passed in as:
- an OpenAI function/tool schema,
- a JSON Schema,
@@ -370,14 +369,14 @@ class ChatDeepSeek(BaseChatOpenAI):
method: The method for steering model generation, one of:
- "function_calling":
- ``'function_calling'``:
Uses DeepSeek's `tool-calling features <https://api-docs.deepseek.com/guides/function_calling>`_.
- "json_mode":
- ``'json_mode'``:
Uses DeepSeek's `JSON mode feature <https://api-docs.deepseek.com/guides/json_mode>`_.
.. versionchanged:: 0.1.3
Added support for ``"json_mode"``.
Added support for ``'json_mode'``.
include_raw:
If False then only the parsed structured output is returned. If
@@ -385,7 +384,7 @@ class ChatDeepSeek(BaseChatOpenAI):
then both the raw model response (a BaseMessage) and the parsed model
response will be returned. If an error occurs during output parsing it
will be caught and returned as well. The final output is always a dict
with keys "raw", "parsed", and "parsing_error".
with keys ``'raw'``, ``'parsed'``, and ``'parsing_error'``.
strict:
Whether to enable strict schema adherence when generating the function
@@ -399,13 +398,14 @@ class ChatDeepSeek(BaseChatOpenAI):
Returns:
A Runnable that takes same inputs as a :class:`langchain_core.language_models.chat.BaseChatModel`.
| If ``include_raw`` is False and ``schema`` is a Pydantic class, Runnable outputs an instance of ``schema`` (i.e., a Pydantic object). Otherwise, if ``include_raw`` is False then Runnable outputs a dict.
If ``include_raw`` is False and ``schema`` is a Pydantic class, Runnable outputs
an instance of ``schema`` (i.e., a Pydantic object). Otherwise, if ``include_raw`` is False then Runnable outputs a dict.
| If ``include_raw`` is True, then Runnable outputs a dict with keys:
If ``include_raw`` is True, then Runnable outputs a dict with keys:
- "raw": BaseMessage
- "parsed": None if there was a parsing error, otherwise the type depends on the ``schema`` as described above.
- "parsing_error": Optional[BaseException]
- ``'raw'``: BaseMessage
- ``'parsed'``: None if there was a parsing error, otherwise the type depends on the ``schema`` as described above.
- ``'parsing_error'``: Optional[BaseException]
""" # noqa: E501
# Some applications require that incompatible parameters (e.g., unsupported