docs: update structured how to (#21679)

This commit is contained in:
Bagatur
2024-05-14 15:19:51 -07:00
committed by GitHub
parent f369495fa0
commit 241a6e43a5
3 changed files with 303 additions and 79 deletions

View File

@@ -204,7 +204,9 @@ class BaseLanguageModel(
def with_structured_output(
self, schema: Union[Dict, Type[BaseModel]], **kwargs: Any
) -> Runnable[LanguageModelInput, Union[Dict, BaseModel]]:
"""Implement this if there is a way of steering the model to generate responses that match a given schema.""" # noqa: E501
"""Not implemented on this class."""
# Implement this on child class if there is a way of steering the model to
# generate responses that match a given schema.
raise NotImplementedError()
@deprecated("0.1.7", alternative="invoke", removal="0.3.0")