docs: improve output_version description (#31977)

This commit is contained in:
Mason Daugherty 2025-07-16 12:29:07 -04:00 committed by GitHub
parent 7c1b59d26a
commit 3c19cafab0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -311,14 +311,16 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC):
does not properly support streaming.
"""
output_version: str = "v0"
output_version: Literal["v0", "v1"] = "v0"
"""Version of AIMessage output format to use.
This field is used to roll-out new output formats for chat model AIMessages
in a backwards-compatible way.
All chat models currently support the default of ``"v0"``. Chat model subclasses
can override with (customizable) supported values.
``'v1'`` standardizes output format using a list of typed ContentBlock dicts. We
recommend this for new applications.
All chat models currently support the default of ``"v0"``.
.. versionadded:: 0.3.68
"""