The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
docs(core): update to indicate betas (#34457)
Mason Daugherty75b07b3d4edc
diff --git a/libs/core/langchain_core/caches.py b/libs/core/langchain_core/caches.pyindex 86139c5d82..5c7b4bc0ce 100644--- a/libs/core/langchain_core/caches.py+++ b/libs/core/langchain_core/caches.py@@ -3,6 +3,7 @@Distinct from provider-based [prompt caching](https://docs.langchain.com/oss/python/langchain/models#prompt-caching).!!! warning "Beta feature"+This is a beta feature. Please be wary of deploying experimental code to productionunless you've taken appropriate precautions.diff --git a/libs/core/langchain_core/language_models/chat_models.py b/libs/core/langchain_core/language_models/chat_models.pyindex 86f9222e77..c7bf78dc8d 100644--- a/libs/core/langchain_core/language_models/chat_models.py+++ b/libs/core/langchain_core/language_models/chat_models.py@@ -341,6 +341,7 @@ class BaseChatModel(BaseLanguageModel[AIMessage], ABC):"""Profile detailing model capabilities.!!! warning "Beta feature"+This is a beta feature. The format of model profiles is subject to change.If not specified, automatically loaded from the provider package on initializationdiff --git a/libs/core/langchain_core/language_models/model_profile.py b/libs/core/langchain_core/language_models/model_profile.pyindex b2cc4df4c1..06b9155230 100644--- a/libs/core/langchain_core/language_models/model_profile.py+++ b/libs/core/langchain_core/language_models/model_profile.py@@ -7,6 +7,7 @@ class ModelProfile(TypedDict, total=False):"""Model profile.!!! warning "Beta feature"+This is a beta feature. The format of model profiles is subject to change.Provides information about chat model capabilities, such as context window sizesdiff --git a/libs/core/langchain_core/load/load.py b/libs/core/langchain_core/load/load.pyindex 41849ed0e7..82d84646f7 100644--- a/libs/core/langchain_core/load/load.py+++ b/libs/core/langchain_core/load/load.py@@ -490,17 +490,23 @@ def loads(core LangChain types (messages, prompts, documents, etc.). See`langchain_core.load.mapping` for the full list.+ !!! warning "Beta feature"++ This is a beta feature. Please be wary of deploying experimental code to+ production unless you've taken appropriate precautions.+Args:text: The string to load.allowed_objects: Allowlist of classes that can be deserialized.- `'core'` (default): Allow classes defined in the serialization mappings- for langchain_core.+ for `langchain_core`.- `'all'`: Allow classes defined in the serialization mappings.This includes core LangChain types (messages, prompts, documents, etc.)and trusted partner integrations. See `langchain_core.load.mapping` forthe full list.+- Explicit list of classes: Only those specific classes are allowed.- `[]`: Disallow all deserialization (will raise on any object).secrets_map: A map of secrets to load.@@ -522,8 +528,9 @@ def loads(If provided, this function is called with `(class_path, kwargs)` where`class_path` is the class path tuple and `kwargs` is the kwargs dict.The validator should raise an exception if the object should not be- deserialized, otherwise return `None`. Defaults to- `default_init_validator` which blocks jinja2 templates.+ deserialized, otherwise return `None`.++ Defaults to `default_init_validator` which blocks jinja2 templates.Returns:Revived LangChain objects.@@ -566,17 +573,23 @@ def load(core LangChain types (messages, prompts, documents, etc.). See`langchain_core.load.mapping` for the full list.+ !!! warning "Beta feature"++ This is a beta feature. Please be wary of deploying experimental code to+ production unless you've taken appropriate precautions.+Args:obj: The object to load.allowed_objects: Allowlist of classes that can be deserialized.- `'core'` (default): Allow classes defined in the serialization mappings- for langchain_core.+ for `langchain_core`.- `'all'`: Allow classes defined in the serialization mappings.This includes core LangChain types (messages, prompts, documents, etc.)and trusted partner integrations. See `langchain_core.load.mapping` forthe full list.+- Explicit list of classes: Only those specific classes are allowed.- `[]`: Disallow all deserialization (will raise on any object).secrets_map: A map of secrets to load.@@ -598,8 +611,9 @@ def load(If provided, this function is called with `(class_path, kwargs)` where`class_path` is the class path tuple and `kwargs` is the kwargs dict.The validator should raise an exception if the object should not be- deserialized, otherwise return `None`. Defaults to- `default_init_validator` which blocks jinja2 templates.+ deserialized, otherwise return `None`.++ Defaults to `default_init_validator` which blocks jinja2 templates.Returns:Revived LangChain objects.diff --git a/libs/core/langchain_core/load/serializable.py b/libs/core/langchain_core/load/serializable.pyindex 9c7588c185..df69e8ca91 100644--- a/libs/core/langchain_core/load/serializable.py+++ b/libs/core/langchain_core/load/serializable.py@@ -92,11 +92,12 @@ class Serializable(BaseModel, ABC):It relies on the following methods and properties:- - `is_lc_serializable`: Is this class serializable?+ - [`is_lc_serializable`][langchain_core.load.serializable.Serializable.is_lc_serializable]: Is this class serializable?+By design, even if a class inherits from `Serializable`, it is not serializableby default. This is to prevent accidental serialization of objects that shouldnot be serialized.- - `get_lc_namespace`: Get the namespace of the LangChain object.+ - [`get_lc_namespace`][langchain_core.load.serializable.Serializable.get_lc_namespace]: Get the namespace of the LangChain object.During deserialization, this namespace is used to identifythe correct class to instantiate.@@ -105,10 +106,10 @@ class Serializable(BaseModel, ABC):During deserialization an additional mapping is handle classes that have movedor been renamed across package versions.- - `lc_secrets`: A map of constructor argument names to secret ids.- - `lc_attributes`: List of additional attribute names that should be included+ - [`lc_secrets`][langchain_core.load.serializable.Serializable.lc_secrets]: A map of constructor argument names to secret ids.+ - [`lc_attributes`][langchain_core.load.serializable.Serializable.lc_attributes]: List of additional attribute names that should be includedas part of the serialized representation.- """+ """ # noqa: E501# Remove default BaseModel init docstring.def __init__(self, *args: Any, **kwargs: Any) -> None:@@ -132,12 +133,12 @@ class Serializable(BaseModel, ABC):def get_lc_namespace(cls) -> list[str]:"""Get the namespace of the LangChain object.- For example, if the class is `langchain.llms.openai.OpenAI`, then the- namespace is `["langchain", "llms", "openai"]`+ For example, if the class is [`langchain.llms.openai.OpenAI`][langchain_openai.OpenAI],+ then the namespace is `["langchain", "llms", "openai"]`Returns:The namespace.- """+ """ # noqa: E501return cls.__module__.split(".")@property