diff --git a/libs/core/langchain_core/callbacks/usage.py b/libs/core/langchain_core/callbacks/usage.py index 7a77ea970b3..b183a51383e 100644 --- a/libs/core/langchain_core/callbacks/usage.py +++ b/libs/core/langchain_core/callbacks/usage.py @@ -43,7 +43,7 @@ class UsageMetadataCallbackHandler(BaseCallbackHandler): 'input_token_details': {'cache_read': 0, 'cache_creation': 0}}} ``` - !!! version-added "Added in version 0.3.49" + !!! version-added "Added in `langchain-core` 0.3.49" """ @@ -134,7 +134,7 @@ def get_usage_metadata_callback( } ``` - !!! version-added "Added in version 0.3.49" + !!! version-added "Added in `langchain-core` 0.3.49" """ usage_metadata_callback_var: ContextVar[UsageMetadataCallbackHandler | None] = ( diff --git a/libs/core/langchain_core/indexing/api.py b/libs/core/langchain_core/indexing/api.py index 84bd746b53b..de42a4f4f8e 100644 --- a/libs/core/langchain_core/indexing/api.py +++ b/libs/core/langchain_core/indexing/api.py @@ -298,7 +298,7 @@ def index( For the time being, documents are indexed using their hashes, and users are not able to specify the uid of the document. - !!! warning "Behavior changed in 0.3.25" + !!! warning "Behavior changed in `langchain-core` 0.3.25" Added `scoped_full` cleanup mode. !!! warning @@ -349,7 +349,7 @@ def index( key_encoder: Hashing algorithm to use for hashing the document content and metadata. Options include "blake2b", "sha256", and "sha512". - !!! version-added "Added in version 0.3.66" + !!! version-added "Added in `langchain-core` 0.3.66" key_encoder: Hashing algorithm to use for hashing the document. If not provided, a default encoder using SHA-1 will be used. @@ -366,7 +366,7 @@ def index( method of the `VectorStore` or the upsert method of the DocumentIndex. For example, you can use this to specify a custom vector_field: upsert_kwargs={"vector_field": "embedding"} - !!! version-added "Added in version 0.3.10" + !!! version-added "Added in `langchain-core` 0.3.10" Returns: Indexing result which contains information about how many documents @@ -636,7 +636,7 @@ async def aindex( For the time being, documents are indexed using their hashes, and users are not able to specify the uid of the document. - !!! warning "Behavior changed in 0.3.25" + !!! warning "Behavior changed in `langchain-core` 0.3.25" Added `scoped_full` cleanup mode. !!! warning @@ -687,7 +687,7 @@ async def aindex( key_encoder: Hashing algorithm to use for hashing the document content and metadata. Options include "blake2b", "sha256", and "sha512". - !!! version-added "Added in version 0.3.66" + !!! version-added "Added in `langchain-core` 0.3.66" key_encoder: Hashing algorithm to use for hashing the document. If not provided, a default encoder using SHA-1 will be used. @@ -704,7 +704,7 @@ async def aindex( method of the `VectorStore` or the upsert method of the DocumentIndex. For example, you can use this to specify a custom vector_field: upsert_kwargs={"vector_field": "embedding"} - !!! version-added "Added in version 0.3.10" + !!! version-added "Added in `langchain-core` 0.3.10" Returns: Indexing result which contains information about how many documents diff --git a/libs/core/langchain_core/language_models/_utils.py b/libs/core/langchain_core/language_models/_utils.py index 07c0b4678be..d777425dde6 100644 --- a/libs/core/langchain_core/language_models/_utils.py +++ b/libs/core/langchain_core/language_models/_utils.py @@ -139,7 +139,7 @@ def _normalize_messages( directly; this may change in the future - LangChain v0 standard content blocks for backward compatibility - !!! warning "Behavior changed in 1.0.0" + !!! warning "Behavior changed in `langchain-core` 1.0.0" In previous versions, this function returned messages in LangChain v0 format. Now, it returns messages in LangChain v1 format, which upgraded chat models now expect to receive when passing back in message history. For backward diff --git a/libs/core/langchain_core/language_models/base.py b/libs/core/langchain_core/language_models/base.py index ec84230157f..958a03dd13d 100644 --- a/libs/core/langchain_core/language_models/base.py +++ b/libs/core/langchain_core/language_models/base.py @@ -195,15 +195,22 @@ class BaseLanguageModel( type (e.g., pure text completion models vs chat models). Args: - prompts: List of `PromptValue` objects. A `PromptValue` is an object that - can be converted to match the format of any language model (string for - pure text generation models and `BaseMessage` objects for chat models). - stop: Stop words to use when generating. Model output is cut off at the - first occurrence of any of these substrings. - callbacks: `Callbacks` to pass through. Used for executing additional - functionality, such as logging or streaming, throughout generation. - **kwargs: Arbitrary additional keyword arguments. These are usually passed - to the model provider API call. + prompts: List of `PromptValue` objects. + + A `PromptValue` is an object that can be converted to match the format + of any language model (string for pure text generation models and + `BaseMessage` objects for chat models). + stop: Stop words to use when generating. + + Model output is cut off at the first occurrence of any of these + substrings. + callbacks: `Callbacks` to pass through. + + Used for executing additional functionality, such as logging or + streaming, throughout generation. + **kwargs: Arbitrary additional keyword arguments. + + These are usually passed to the model provider API call. Returns: An `LLMResult`, which contains a list of candidate `Generation` objects for @@ -232,15 +239,22 @@ class BaseLanguageModel( type (e.g., pure text completion models vs chat models). Args: - prompts: List of `PromptValue` objects. A `PromptValue` is an object that - can be converted to match the format of any language model (string for - pure text generation models and `BaseMessage` objects for chat models). - stop: Stop words to use when generating. Model output is cut off at the - first occurrence of any of these substrings. - callbacks: `Callbacks` to pass through. Used for executing additional - functionality, such as logging or streaming, throughout generation. - **kwargs: Arbitrary additional keyword arguments. These are usually passed - to the model provider API call. + prompts: List of `PromptValue` objects. + + A `PromptValue` is an object that can be converted to match the format + of any language model (string for pure text generation models and + `BaseMessage` objects for chat models). + stop: Stop words to use when generating. + + Model output is cut off at the first occurrence of any of these + substrings. + callbacks: `Callbacks` to pass through. + + Used for executing additional functionality, such as logging or + streaming, throughout generation. + **kwargs: Arbitrary additional keyword arguments. + + These are usually passed to the model provider API call. Returns: An `LLMResult`, which contains a list of candidate `Generation` objects for diff --git a/libs/core/langchain_core/language_models/chat_models.py b/libs/core/langchain_core/language_models/chat_models.py index c3544038913..bbd7cb56857 100644 --- a/libs/core/langchain_core/language_models/chat_models.py +++ b/libs/core/langchain_core/language_models/chat_models.py @@ -332,7 +332,7 @@ class BaseChatModel(BaseLanguageModel[AIMessage], ABC): [`langchain-openai`](https://pypi.org/project/langchain-openai)) can also use this field to roll out new content formats in a backward-compatible way. - !!! version-added "Added in version 1.0" + !!! version-added "Added in `langchain-core` 1.0" """ @@ -845,16 +845,21 @@ class BaseChatModel(BaseLanguageModel[AIMessage], ABC): Args: messages: List of list of messages. - stop: Stop words to use when generating. Model output is cut off at the - first occurrence of any of these substrings. - callbacks: `Callbacks` to pass through. Used for executing additional - functionality, such as logging or streaming, throughout generation. + stop: Stop words to use when generating. + + Model output is cut off at the first occurrence of any of these + substrings. + callbacks: `Callbacks` to pass through. + + Used for executing additional functionality, such as logging or + streaming, throughout generation. tags: The tags to apply. metadata: The metadata to apply. run_name: The name of the run. run_id: The ID of the run. - **kwargs: Arbitrary additional keyword arguments. These are usually passed - to the model provider API call. + **kwargs: Arbitrary additional keyword arguments. + + These are usually passed to the model provider API call. Returns: An `LLMResult`, which contains a list of candidate `Generations` for each @@ -963,16 +968,21 @@ class BaseChatModel(BaseLanguageModel[AIMessage], ABC): Args: messages: List of list of messages. - stop: Stop words to use when generating. Model output is cut off at the - first occurrence of any of these substrings. - callbacks: `Callbacks` to pass through. Used for executing additional - functionality, such as logging or streaming, throughout generation. + stop: Stop words to use when generating. + + Model output is cut off at the first occurrence of any of these + substrings. + callbacks: `Callbacks` to pass through. + + Used for executing additional functionality, such as logging or + streaming, throughout generation. tags: The tags to apply. metadata: The metadata to apply. run_name: The name of the run. run_id: The ID of the run. - **kwargs: Arbitrary additional keyword arguments. These are usually passed - to the model provider API call. + **kwargs: Arbitrary additional keyword arguments. + + These are usually passed to the model provider API call. Returns: An `LLMResult`, which contains a list of candidate `Generations` for each @@ -1629,7 +1639,7 @@ class BaseChatModel(BaseLanguageModel[AIMessage], ABC): # } ``` - !!! warning "Behavior changed in 0.2.26" + !!! warning "Behavior changed in `langchain-core` 0.2.26" Added support for TypedDict class. """ # noqa: E501 diff --git a/libs/core/langchain_core/language_models/llms.py b/libs/core/langchain_core/language_models/llms.py index 051c2781e1c..813ae7b21b9 100644 --- a/libs/core/langchain_core/language_models/llms.py +++ b/libs/core/langchain_core/language_models/llms.py @@ -651,9 +651,12 @@ class BaseLLM(BaseLanguageModel[str], ABC): Args: prompts: The prompts to generate from. - stop: Stop words to use when generating. Model output is cut off at the - first occurrence of any of the stop substrings. - If stop tokens are not supported consider raising NotImplementedError. + stop: Stop words to use when generating. + + Model output is cut off at the first occurrence of any of these + substrings. + + If stop tokens are not supported consider raising `NotImplementedError`. run_manager: Callback manager for the run. Returns: @@ -671,9 +674,12 @@ class BaseLLM(BaseLanguageModel[str], ABC): Args: prompts: The prompts to generate from. - stop: Stop words to use when generating. Model output is cut off at the - first occurrence of any of the stop substrings. - If stop tokens are not supported consider raising NotImplementedError. + stop: Stop words to use when generating. + + Model output is cut off at the first occurrence of any of these + substrings. + + If stop tokens are not supported consider raising `NotImplementedError`. run_manager: Callback manager for the run. Returns: @@ -705,11 +711,14 @@ class BaseLLM(BaseLanguageModel[str], ABC): Args: prompt: The prompt to generate from. - stop: Stop words to use when generating. Model output is cut off at the - first occurrence of any of these substrings. + stop: Stop words to use when generating. + + Model output is cut off at the first occurrence of any of these + substrings. run_manager: Callback manager for the run. - **kwargs: Arbitrary additional keyword arguments. These are usually passed - to the model provider API call. + **kwargs: Arbitrary additional keyword arguments. + + These are usually passed to the model provider API call. Yields: Generation chunks. @@ -731,11 +740,14 @@ class BaseLLM(BaseLanguageModel[str], ABC): Args: prompt: The prompt to generate from. - stop: Stop words to use when generating. Model output is cut off at the - first occurrence of any of these substrings. + stop: Stop words to use when generating. + + Model output is cut off at the first occurrence of any of these + substrings. run_manager: Callback manager for the run. - **kwargs: Arbitrary additional keyword arguments. These are usually passed - to the model provider API call. + **kwargs: Arbitrary additional keyword arguments. + + These are usually passed to the model provider API call. Yields: Generation chunks. @@ -846,10 +858,14 @@ class BaseLLM(BaseLanguageModel[str], ABC): Args: prompts: List of string prompts. - stop: Stop words to use when generating. Model output is cut off at the - first occurrence of any of these substrings. - callbacks: `Callbacks` to pass through. Used for executing additional - functionality, such as logging or streaming, throughout generation. + stop: Stop words to use when generating. + + Model output is cut off at the first occurrence of any of these + substrings. + callbacks: `Callbacks` to pass through. + + Used for executing additional functionality, such as logging or + streaming, throughout generation. tags: List of tags to associate with each prompt. If provided, the length of the list must match the length of the prompts list. metadata: List of metadata dictionaries to associate with each prompt. If @@ -859,8 +875,9 @@ class BaseLLM(BaseLanguageModel[str], ABC): length of the list must match the length of the prompts list. run_id: List of run IDs to associate with each prompt. If provided, the length of the list must match the length of the prompts list. - **kwargs: Arbitrary additional keyword arguments. These are usually passed - to the model provider API call. + **kwargs: Arbitrary additional keyword arguments. + + These are usually passed to the model provider API call. Raises: ValueError: If prompts is not a list. @@ -1116,10 +1133,14 @@ class BaseLLM(BaseLanguageModel[str], ABC): Args: prompts: List of string prompts. - stop: Stop words to use when generating. Model output is cut off at the - first occurrence of any of these substrings. - callbacks: `Callbacks` to pass through. Used for executing additional - functionality, such as logging or streaming, throughout generation. + stop: Stop words to use when generating. + + Model output is cut off at the first occurrence of any of these + substrings. + callbacks: `Callbacks` to pass through. + + Used for executing additional functionality, such as logging or + streaming, throughout generation. tags: List of tags to associate with each prompt. If provided, the length of the list must match the length of the prompts list. metadata: List of metadata dictionaries to associate with each prompt. If @@ -1129,8 +1150,9 @@ class BaseLLM(BaseLanguageModel[str], ABC): length of the list must match the length of the prompts list. run_id: List of run IDs to associate with each prompt. If provided, the length of the list must match the length of the prompts list. - **kwargs: Arbitrary additional keyword arguments. These are usually passed - to the model provider API call. + **kwargs: Arbitrary additional keyword arguments. + + These are usually passed to the model provider API call. Raises: ValueError: If the length of `callbacks`, `tags`, `metadata`, or @@ -1410,12 +1432,16 @@ class LLM(BaseLLM): Args: prompt: The prompt to generate from. - stop: Stop words to use when generating. Model output is cut off at the - first occurrence of any of the stop substrings. - If stop tokens are not supported consider raising NotImplementedError. + stop: Stop words to use when generating. + + Model output is cut off at the first occurrence of any of these + substrings. + + If stop tokens are not supported consider raising `NotImplementedError`. run_manager: Callback manager for the run. - **kwargs: Arbitrary additional keyword arguments. These are usually passed - to the model provider API call. + **kwargs: Arbitrary additional keyword arguments. + + These are usually passed to the model provider API call. Returns: The model output as a string. SHOULD NOT include the prompt. @@ -1436,12 +1462,16 @@ class LLM(BaseLLM): Args: prompt: The prompt to generate from. - stop: Stop words to use when generating. Model output is cut off at the - first occurrence of any of the stop substrings. - If stop tokens are not supported consider raising NotImplementedError. + stop: Stop words to use when generating. + + Model output is cut off at the first occurrence of any of these + substrings. + + If stop tokens are not supported consider raising `NotImplementedError`. run_manager: Callback manager for the run. - **kwargs: Arbitrary additional keyword arguments. These are usually passed - to the model provider API call. + **kwargs: Arbitrary additional keyword arguments. + + These are usually passed to the model provider API call. Returns: The model output as a string. SHOULD NOT include the prompt. diff --git a/libs/core/langchain_core/messages/ai.py b/libs/core/langchain_core/messages/ai.py index c6b6f604142..fb85027b142 100644 --- a/libs/core/langchain_core/messages/ai.py +++ b/libs/core/langchain_core/messages/ai.py @@ -50,7 +50,7 @@ class InputTokenDetails(TypedDict, total=False): May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" """ @@ -85,7 +85,7 @@ class OutputTokenDetails(TypedDict, total=False): May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" """ @@ -123,7 +123,7 @@ class UsageMetadata(TypedDict): } ``` - !!! warning "Behavior changed in 0.3.9" + !!! warning "Behavior changed in `langchain-core` 0.3.9" Added `input_token_details` and `output_token_details`. !!! note "LangSmith SDK" diff --git a/libs/core/langchain_core/messages/base.py b/libs/core/langchain_core/messages/base.py index 96c99b5087a..05ce4e57fd1 100644 --- a/libs/core/langchain_core/messages/base.py +++ b/libs/core/langchain_core/messages/base.py @@ -199,7 +199,7 @@ class BaseMessage(Serializable): def content_blocks(self) -> list[types.ContentBlock]: r"""Load content blocks from the message content. - !!! version-added "Added in version 1.0.0" + !!! version-added "Added in `langchain-core` 1.0.0" """ # Needed here to avoid circular import, as these classes import BaseMessages diff --git a/libs/core/langchain_core/messages/utils.py b/libs/core/langchain_core/messages/utils.py index 8a98d7761c7..9c0c89a23cb 100644 --- a/libs/core/langchain_core/messages/utils.py +++ b/libs/core/langchain_core/messages/utils.py @@ -1101,7 +1101,7 @@ def convert_to_openai_messages( # ] ``` - !!! version-added "Added in version 0.3.11" + !!! version-added "Added in `langchain-core` 0.3.11" """ # noqa: E501 if text_format not in {"string", "block"}: @@ -1701,7 +1701,7 @@ def count_tokens_approximately( Warning: This function does not currently support counting image tokens. - !!! version-added "Added in version 0.3.46" + !!! version-added "Added in `langchain-core` 0.3.46" """ token_count = 0.0 diff --git a/libs/core/langchain_core/runnables/base.py b/libs/core/langchain_core/runnables/base.py index 8d0409c2929..26432f05a7b 100644 --- a/libs/core/langchain_core/runnables/base.py +++ b/libs/core/langchain_core/runnables/base.py @@ -432,7 +432,7 @@ class Runnable(ABC, Generic[Input, Output]): print(runnable.get_input_jsonschema()) ``` - !!! version-added "Added in version 0.3.0" + !!! version-added "Added in `langchain-core` 0.3.0" """ return self.get_input_schema(config).model_json_schema() @@ -510,7 +510,7 @@ class Runnable(ABC, Generic[Input, Output]): print(runnable.get_output_jsonschema()) ``` - !!! version-added "Added in version 0.3.0" + !!! version-added "Added in `langchain-core` 0.3.0" """ return self.get_output_schema(config).model_json_schema() @@ -574,7 +574,7 @@ class Runnable(ABC, Generic[Input, Output]): Returns: A JSON schema that represents the config of the `Runnable`. - !!! version-added "Added in version 0.3.0" + !!! version-added "Added in `langchain-core` 0.3.0" """ return self.config_schema(include=include).model_json_schema() @@ -826,6 +826,7 @@ class Runnable(ABC, Generic[Input, Output]): Args: input: The input to the `Runnable`. config: A config to use when invoking the `Runnable`. + The config supports standard keys like `'tags'`, `'metadata'` for tracing purposes, `'max_concurrency'` for controlling how much work to do in parallel, and other keys. Please refer to the `RunnableConfig` @@ -846,6 +847,7 @@ class Runnable(ABC, Generic[Input, Output]): Args: input: The input to the `Runnable`. config: A config to use when invoking the `Runnable`. + The config supports standard keys like `'tags'`, `'metadata'` for tracing purposes, `'max_concurrency'` for controlling how much work to do in parallel, and other keys. Please refer to the `RunnableConfig` @@ -940,6 +942,7 @@ class Runnable(ABC, Generic[Input, Output]): Args: inputs: A list of inputs to the `Runnable`. config: A config to use when invoking the `Runnable`. + The config supports standard keys like `'tags'`, `'metadata'` for tracing purposes, `'max_concurrency'` for controlling how much work to do in parallel, and other keys. Please refer to the `RunnableConfig` @@ -1006,6 +1009,7 @@ class Runnable(ABC, Generic[Input, Output]): Args: inputs: A list of inputs to the `Runnable`. config: A config to use when invoking the `Runnable`. + The config supports standard keys like `'tags'`, `'metadata'` for tracing purposes, `'max_concurrency'` for controlling how much work to do in parallel, and other keys. Please refer to the `RunnableConfig` @@ -1069,6 +1073,7 @@ class Runnable(ABC, Generic[Input, Output]): Args: inputs: A list of inputs to the `Runnable`. config: A config to use when invoking the `Runnable`. + The config supports standard keys like `'tags'`, `'metadata'` for tracing purposes, `'max_concurrency'` for controlling how much work to do in parallel, and other keys. Please refer to the `RunnableConfig` diff --git a/libs/core/langchain_core/runnables/schema.py b/libs/core/langchain_core/runnables/schema.py index 05221c7f34a..919b7db4108 100644 --- a/libs/core/langchain_core/runnables/schema.py +++ b/libs/core/langchain_core/runnables/schema.py @@ -28,7 +28,7 @@ class EventData(TypedDict, total=False): This field is only available if the `Runnable` raised an exception. - !!! version-added "Added in version 1.0.0" + !!! version-added "Added in `langchain-core` 1.0.0" """ output: Any """The output of the `Runnable` that generated the event. diff --git a/libs/core/langchain_core/utils/function_calling.py b/libs/core/langchain_core/utils/function_calling.py index 44def3f3dd2..ada7680c54a 100644 --- a/libs/core/langchain_core/utils/function_calling.py +++ b/libs/core/langchain_core/utils/function_calling.py @@ -351,7 +351,7 @@ def convert_to_openai_function( Raises: ValueError: If function is not in a supported format. - !!! warning "Behavior changed in 0.3.16" + !!! warning "Behavior changed in `langchain-core` 0.3.16" `description` and `parameters` keys are now optional. Only `name` is required and guaranteed to be part of the output. """ @@ -475,16 +475,16 @@ def convert_to_openai_tool( A dict version of the passed in tool which is compatible with the OpenAI tool-calling API. - !!! warning "Behavior changed in 0.3.16" + !!! warning "Behavior changed in `langchain-core` 0.3.16" `description` and `parameters` keys are now optional. Only `name` is required and guaranteed to be part of the output. - !!! warning "Behavior changed in 0.3.44" + !!! warning "Behavior changed in `langchain-core` 0.3.44" Return OpenAI Responses API-style tools unchanged. This includes any dict with `"type"` in `"file_search"`, `"function"`, `"computer_use_preview"`, `"web_search_preview"`. - !!! warning "Behavior changed in 0.3.63" + !!! warning "Behavior changed in `langchain-core` 0.3.63" Added support for OpenAI's image generation built-in tool. """ # Import locally to prevent circular import diff --git a/libs/core/tests/unit_tests/prompts/__snapshots__/test_chat.ambr b/libs/core/tests/unit_tests/prompts/__snapshots__/test_chat.ambr index 9446bc21c56..964aa8817b9 100644 --- a/libs/core/tests/unit_tests/prompts/__snapshots__/test_chat.ambr +++ b/libs/core/tests/unit_tests/prompts/__snapshots__/test_chat.ambr @@ -682,7 +682,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -800,7 +800,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -1319,7 +1319,7 @@ } ``` - !!! warning "Behavior changed in 0.3.9" + !!! warning "Behavior changed in `langchain-core` 0.3.9" Added `input_token_details` and `output_token_details`. !!! note "LangSmith SDK" @@ -2096,7 +2096,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -2214,7 +2214,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -2733,7 +2733,7 @@ } ``` - !!! warning "Behavior changed in 0.3.9" + !!! warning "Behavior changed in `langchain-core` 0.3.9" Added `input_token_details` and `output_token_details`. !!! note "LangSmith SDK" diff --git a/libs/core/tests/unit_tests/runnables/__snapshots__/test_graph.ambr b/libs/core/tests/unit_tests/runnables/__snapshots__/test_graph.ambr index 8891c8aac3d..0f788aeef95 100644 --- a/libs/core/tests/unit_tests/runnables/__snapshots__/test_graph.ambr +++ b/libs/core/tests/unit_tests/runnables/__snapshots__/test_graph.ambr @@ -1106,7 +1106,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -1224,7 +1224,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -1743,7 +1743,7 @@ } ``` - !!! warning "Behavior changed in 0.3.9" + !!! warning "Behavior changed in `langchain-core` 0.3.9" Added `input_token_details` and `output_token_details`. !!! note "LangSmith SDK" diff --git a/libs/core/tests/unit_tests/runnables/__snapshots__/test_runnable.ambr b/libs/core/tests/unit_tests/runnables/__snapshots__/test_runnable.ambr index 8cee28625f5..ef6f6f8089b 100644 --- a/libs/core/tests/unit_tests/runnables/__snapshots__/test_runnable.ambr +++ b/libs/core/tests/unit_tests/runnables/__snapshots__/test_runnable.ambr @@ -2629,7 +2629,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -2746,7 +2746,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -3259,7 +3259,7 @@ } ``` - !!! warning "Behavior changed in 0.3.9" + !!! warning "Behavior changed in `langchain-core` 0.3.9" Added `input_token_details` and `output_token_details`. !!! note "LangSmith SDK" @@ -4086,7 +4086,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -4203,7 +4203,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -4735,7 +4735,7 @@ } ``` - !!! warning "Behavior changed in 0.3.9" + !!! warning "Behavior changed in `langchain-core` 0.3.9" Added `input_token_details` and `output_token_details`. !!! note "LangSmith SDK" @@ -5574,7 +5574,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -5691,7 +5691,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -6223,7 +6223,7 @@ } ``` - !!! warning "Behavior changed in 0.3.9" + !!! warning "Behavior changed in `langchain-core` 0.3.9" Added `input_token_details` and `output_token_details`. !!! note "LangSmith SDK" @@ -6937,7 +6937,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -7054,7 +7054,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -7567,7 +7567,7 @@ } ``` - !!! warning "Behavior changed in 0.3.9" + !!! warning "Behavior changed in `langchain-core` 0.3.9" Added `input_token_details` and `output_token_details`. !!! note "LangSmith SDK" @@ -8436,7 +8436,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -8553,7 +8553,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -9085,7 +9085,7 @@ } ``` - !!! warning "Behavior changed in 0.3.9" + !!! warning "Behavior changed in `langchain-core` 0.3.9" Added `input_token_details` and `output_token_details`. !!! note "LangSmith SDK" @@ -9844,7 +9844,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -9961,7 +9961,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -10474,7 +10474,7 @@ } ``` - !!! warning "Behavior changed in 0.3.9" + !!! warning "Behavior changed in `langchain-core` 0.3.9" Added `input_token_details` and `output_token_details`. !!! note "LangSmith SDK" @@ -11251,7 +11251,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -11368,7 +11368,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -11911,7 +11911,7 @@ } ``` - !!! warning "Behavior changed in 0.3.9" + !!! warning "Behavior changed in `langchain-core` 0.3.9" Added `input_token_details` and `output_token_details`. !!! note "LangSmith SDK" @@ -12700,7 +12700,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -12817,7 +12817,7 @@ May also hold extra provider-specific keys. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-core` 0.3.9" ''', 'properties': dict({ 'audio': dict({ @@ -13349,7 +13349,7 @@ } ``` - !!! warning "Behavior changed in 0.3.9" + !!! warning "Behavior changed in `langchain-core` 0.3.9" Added `input_token_details` and `output_token_details`. !!! note "LangSmith SDK" diff --git a/libs/core/uv.lock b/libs/core/uv.lock index 137e0d729ed..736a129bdd7 100644 --- a/libs/core/uv.lock +++ b/libs/core/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 2 +revision = 3 requires-python = ">=3.10.0, <4.0.0" resolution-markers = [ "python_full_version >= '3.14' and platform_python_implementation == 'PyPy'", @@ -1057,7 +1057,7 @@ typing = [ [[package]] name = "langchain-model-profiles" -version = "0.0.2" +version = "0.0.3" source = { directory = "../model-profiles" } dependencies = [ { name = "tomli", marker = "python_full_version < '3.11'" }, @@ -1097,7 +1097,7 @@ typing = [ [[package]] name = "langchain-tests" -version = "1.0.0" +version = "1.0.1" source = { directory = "../standard-tests" } dependencies = [ { name = "httpx" }, diff --git a/libs/langchain/langchain_classic/chat_models/base.py b/libs/langchain/langchain_classic/chat_models/base.py index b912f5189c9..8c7f0249d7b 100644 --- a/libs/langchain/langchain_classic/chat_models/base.py +++ b/libs/langchain/langchain_classic/chat_models/base.py @@ -316,10 +316,10 @@ def init_chat_model( # Use Sonnet 4.5 ``` - !!! warning "Behavior changed in 0.2.8" + !!! warning "Behavior changed in `langchain` 0.2.8" Support for `configurable_fields` and `config_prefix` added. - !!! warning "Behavior changed in 0.2.12" + !!! warning "Behavior changed in `langchain` 0.2.12" Support for Ollama via langchain-ollama package added (`langchain_ollama.ChatOllama`). Previously, the now-deprecated langchain-community version of Ollama was imported @@ -328,10 +328,10 @@ def init_chat_model( Support for AWS Bedrock models via the Converse API added (`model_provider="bedrock_converse"`). - !!! warning "Behavior changed in 0.3.5" + !!! warning "Behavior changed in `langchain` 0.3.5" Out of beta. - !!! warning "Behavior changed in 0.3.19" + !!! warning "Behavior changed in `langchain` 0.3.19" Support for Deepseek, IBM, Nvidia, and xAI models added. """ # noqa: E501 diff --git a/libs/langchain/langchain_classic/embeddings/base.py b/libs/langchain/langchain_classic/embeddings/base.py index 2eea84f9653..7fc32abc98e 100644 --- a/libs/langchain/langchain_classic/embeddings/base.py +++ b/libs/langchain/langchain_classic/embeddings/base.py @@ -185,7 +185,7 @@ def init_embeddings( model = init_embeddings("openai:text-embedding-3-small", api_key="sk-...") ``` - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain` 0.3.9" """ if not model: diff --git a/libs/langchain_v1/langchain/embeddings/base.py b/libs/langchain_v1/langchain/embeddings/base.py index 708ac6a41a1..97b5c62a2ef 100644 --- a/libs/langchain_v1/langchain/embeddings/base.py +++ b/libs/langchain_v1/langchain/embeddings/base.py @@ -187,7 +187,7 @@ def init_embeddings( model = init_embeddings("openai:text-embedding-3-small", api_key="sk-...") ``` - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain` 0.3.9" """ if not model: diff --git a/libs/partners/anthropic/langchain_anthropic/chat_models.py b/libs/partners/anthropic/langchain_anthropic/chat_models.py index 7ee7c8c1d83..e2f0aa3fbe0 100644 --- a/libs/partners/anthropic/langchain_anthropic/chat_models.py +++ b/libs/partners/anthropic/langchain_anthropic/chat_models.py @@ -1929,7 +1929,7 @@ class ChatAnthropic(BaseChatModel): parallel_tool_calls: Set to `False` to disable parallel tool use. Defaults to `None` (no specification, which allows parallel tool use). - !!! version-added "Added in version 0.3.2" + !!! version-added "Added in `langchain-anthropic` 0.3.2" kwargs: Any additional parameters are passed directly to `bind`. Example: @@ -2408,7 +2408,7 @@ class ChatAnthropic(BaseChatModel): 403 ``` - !!! warning "Behavior changed in 0.3.0" + !!! warning "Behavior changed in `langchain-anthropic` 0.3.0" Uses Anthropic's [token counting API](https://docs.claude.com/en/docs/build-with-claude/token-counting) to count tokens in messages. """ # noqa: D214,E501 diff --git a/libs/partners/fireworks/langchain_fireworks/chat_models.py b/libs/partners/fireworks/langchain_fireworks/chat_models.py index 53af609a42a..e89da1df73d 100644 --- a/libs/partners/fireworks/langchain_fireworks/chat_models.py +++ b/libs/partners/fireworks/langchain_fireworks/chat_models.py @@ -708,7 +708,7 @@ class ChatFireworks(BaseChatModel): - `'json_mode'`: Uses Fireworks's [JSON mode feature](https://docs.fireworks.ai/structured-responses/structured-response-formatting). - !!! warning "Behavior changed in 0.2.8" + !!! warning "Behavior changed in `langchain-fireworks` 0.2.8" Added support for `'json_schema'`. include_raw: diff --git a/libs/partners/groq/langchain_groq/chat_models.py b/libs/partners/groq/langchain_groq/chat_models.py index bbbe94dad06..3a1bf9ff1f0 100644 --- a/libs/partners/groq/langchain_groq/chat_models.py +++ b/libs/partners/groq/langchain_groq/chat_models.py @@ -840,7 +840,7 @@ class ChatGroq(BaseChatModel): more on how to properly specify types and descriptions of schema fields when specifying a Pydantic or `TypedDict` class. - !!! warning "Behavior changed in 0.3.8" + !!! warning "Behavior changed in `langchain-groq` 0.3.8" Added support for Groq's dedicated structured output feature via `method="json_schema"`. diff --git a/libs/partners/mistralai/langchain_mistralai/chat_models.py b/libs/partners/mistralai/langchain_mistralai/chat_models.py index 39c7c80d910..9240dba23b8 100644 --- a/libs/partners/mistralai/langchain_mistralai/chat_models.py +++ b/libs/partners/mistralai/langchain_mistralai/chat_models.py @@ -832,7 +832,7 @@ class ChatMistralAI(BaseChatModel): must include instructions for formatting the output into the desired schema into the model call. - !!! warning "Behavior changed in 0.2.5" + !!! warning "Behavior changed in `langchain-mistralai` 0.2.5" Added method="json_schema" include_raw: diff --git a/libs/partners/ollama/langchain_ollama/chat_models.py b/libs/partners/ollama/langchain_ollama/chat_models.py index 149a3977372..e13901d4965 100644 --- a/libs/partners/ollama/langchain_ollama/chat_models.py +++ b/libs/partners/ollama/langchain_ollama/chat_models.py @@ -543,7 +543,7 @@ class ChatOllama(BaseChatModel): validate_model_on_init: bool = False """Whether to validate the model exists in Ollama locally on initialization. - !!! version-added "Added in version 0.3.4" + !!! version-added "Added in `langchain-ollama` 0.3.4" """ mirostat: int | None = None @@ -1309,10 +1309,10 @@ class ChatOllama(BaseChatModel): depends on the `schema` as described above. - `'parsing_error'`: `BaseException | None` - !!! warning "Behavior changed in 0.2.2" + !!! warning "Behavior changed in `langchain-ollama` 0.2.2" Added support for structured output API via `format` parameter. - !!! warning "Behavior changed in 0.3.0" + !!! warning "Behavior changed in `langchain-ollama` 0.3.0" Updated default `method` to `'json_schema'`. ??? note "Example: `schema=Pydantic` class, `method='json_schema'`, `include_raw=False`" diff --git a/libs/partners/ollama/langchain_ollama/embeddings.py b/libs/partners/ollama/langchain_ollama/embeddings.py index 9d2d85eebea..675211e4ff7 100644 --- a/libs/partners/ollama/langchain_ollama/embeddings.py +++ b/libs/partners/ollama/langchain_ollama/embeddings.py @@ -123,7 +123,7 @@ class OllamaEmbeddings(BaseModel, Embeddings): validate_model_on_init: bool = False """Whether to validate the model exists in ollama locally on initialization. - !!! version-added "Added in version 0.3.4" + !!! version-added "Added in `langchain-ollama` 0.3.4" """ diff --git a/libs/partners/ollama/langchain_ollama/llms.py b/libs/partners/ollama/langchain_ollama/llms.py index 898259361b1..d840eff45cb 100644 --- a/libs/partners/ollama/langchain_ollama/llms.py +++ b/libs/partners/ollama/langchain_ollama/llms.py @@ -126,7 +126,7 @@ class OllamaLLM(BaseLLM): validate_model_on_init: bool = False """Whether to validate the model exists in ollama locally on initialization. - !!! version-added "Added in version 0.3.4" + !!! version-added "Added in `langchain-ollama` 0.3.4" """ mirostat: int | None = None diff --git a/libs/partners/openai/langchain_openai/chat_models/azure.py b/libs/partners/openai/langchain_openai/chat_models/azure.py index ce4440b3e18..eec47611578 100644 --- a/libs/partners/openai/langchain_openai/chat_models/azure.py +++ b/libs/partners/openai/langchain_openai/chat_models/azure.py @@ -955,13 +955,13 @@ class AzureChatOpenAI(BaseChatOpenAI): depends on the `schema` as described above. - `'parsing_error'`: `BaseException | None` - !!! warning "Behavior changed in 0.3.0" + !!! warning "Behavior changed in `langchain-openai` 0.3.0" `method` default changed from "function_calling" to "json_schema". - !!! warning "Behavior changed in 0.3.12" + !!! warning "Behavior changed in `langchain-openai` 0.3.12" Support for `tools` added. - !!! warning "Behavior changed in 0.3.21" + !!! warning "Behavior changed in `langchain-openai` 0.3.21" Pass `kwargs` through to the model. ??? note "Example: `schema=Pydantic` class, `method='json_schema'`, `include_raw=False`, `strict=True`" diff --git a/libs/partners/openai/langchain_openai/chat_models/base.py b/libs/partners/openai/langchain_openai/chat_models/base.py index 0447f49366d..a43045bc564 100644 --- a/libs/partners/openai/langchain_openai/chat_models/base.py +++ b/libs/partners/openai/langchain_openai/chat_models/base.py @@ -545,9 +545,9 @@ class BaseChatOpenAI(BaseChatModel): initialized with a custom client, as many chat completions APIs do not support streaming token usage. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-openai` 0.3.9" - !!! warning "Behavior changed in 0.3.35" + !!! warning "Behavior changed in `langchain-openai` 0.3.35" Enabled for default base URL and client. """ max_retries: int | None = None @@ -594,7 +594,7 @@ class BaseChatOpenAI(BaseChatModel): } ``` - !!! version-added "Added in version 0.3.24" + !!! version-added "Added in `langchain-openai` 0.3.24" """ verbosity: str | None = None """Controls the verbosity level of responses for reasoning models. For use with the @@ -602,7 +602,7 @@ class BaseChatOpenAI(BaseChatModel): Currently supported values are `'low'`, `'medium'`, and `'high'`. - !!! version-added "Added in version 0.3.28" + !!! version-added "Added in `langchain-openai` 0.3.28" """ tiktoken_model_name: str | None = None """The model name to pass to tiktoken when using this class. @@ -677,7 +677,7 @@ class BaseChatOpenAI(BaseChatModel): - `'reasoning.encrypted_content'` - `'code_interpreter_call.outputs'` - !!! version-added "Added in version 0.3.24" + !!! version-added "Added in `langchain-openai` 0.3.24" """ service_tier: str | None = None @@ -690,7 +690,7 @@ class BaseChatOpenAI(BaseChatModel): Defaults to `True` for the Responses API and `False` for the Chat Completions API. - !!! version-added "Added in version 0.3.24" + !!! version-added "Added in `langchain-openai` 0.3.24" """ truncation: str | None = None @@ -698,7 +698,7 @@ class BaseChatOpenAI(BaseChatModel): If `'auto'`, model may drop input items from the middle of the message sequence to fit the context window. - !!! version-added "Added in version 0.3.24" + !!! version-added "Added in `langchain-openai` 0.3.24" """ use_previous_response_id: bool = False @@ -729,7 +729,7 @@ class BaseChatOpenAI(BaseChatModel): model.invoke([HumanMessage("How are you?")], previous_response_id="resp_123") ``` - !!! version-added "Added in version 0.3.26" + !!! version-added "Added in `langchain-openai` 0.3.26" """ use_responses_api: bool | None = None @@ -737,7 +737,7 @@ class BaseChatOpenAI(BaseChatModel): If not specified then will be inferred based on invocation params. - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-openai` 0.3.9" """ output_version: str | None = Field( @@ -755,7 +755,7 @@ class BaseChatOpenAI(BaseChatModel): (Responses API only) - `'v1'`: v1 of LangChain cross-provider standard. - !!! warning "Behavior changed in 1.0.0" + !!! warning "Behavior changed in `langchain-openai` 1.0.0" Default updated to `"responses/v1"`. """ @@ -1931,10 +1931,10 @@ class BaseChatOpenAI(BaseChatModel): depends on the `schema` as described above. - `'parsing_error'`: `BaseException | None` - !!! warning "Behavior changed in 0.3.12" + !!! warning "Behavior changed in `langchain-openai` 0.3.12" Support for `tools` added. - !!! warning "Behavior changed in 0.3.21" + !!! warning "Behavior changed in `langchain-openai` 0.3.21" Pass `kwargs` through to the model. """ if strict is not None and method == "json_mode": @@ -2429,9 +2429,9 @@ class ChatOpenAI(BaseChatOpenAI): # type: ignore[override] ] ``` - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-openai` 0.3.9" - !!! version-added "Added in version 0.3.26: Updated `AIMessage` format" + !!! version-added "Added in `langchain-openai` 0.3.26: Updated `AIMessage` format" [`langchain-openai >= 0.3.26`](https://pypi.org/project/langchain-openai/#history) allows users to opt-in to an updated `AIMessage` format when using the Responses API. Setting `ChatOpenAI(..., output_version="responses/v1")` will @@ -2473,9 +2473,9 @@ class ChatOpenAI(BaseChatOpenAI): # type: ignore[override] "Your name is Bob. How can I help you today, Bob?" ``` - !!! version-added "Added in version 0.3.9" + !!! version-added "Added in `langchain-openai` 0.3.9" - !!! version-added "Added in version 0.3.26" + !!! version-added "Added in `langchain-openai` 0.3.26" You can also initialize `ChatOpenAI` with `use_previous_response_id`. Input messages up to the most recent response will then be dropped from request payloads, and `previous_response_id` will be set using the ID of the most @@ -2518,7 +2518,7 @@ class ChatOpenAI(BaseChatOpenAI): # type: ignore[override] Reasoning: The user wants to know... ``` - !!! version-added "Added in version 0.3.26: Updated `AIMessage` format" + !!! version-added "Added in `langchain-openai` 0.3.26: Updated `AIMessage` format" [`langchain-openai >= 0.3.26`](https://pypi.org/project/langchain-openai/#history) allows users to opt-in to an updated `AIMessage` format when using the Responses API. Setting `ChatOpenAI(..., output_version="responses/v1")` will @@ -3043,13 +3043,13 @@ class ChatOpenAI(BaseChatOpenAI): # type: ignore[override] depends on the `schema` as described above. - `'parsing_error'`: `BaseException | None` - !!! warning "Behavior changed in 0.3.0" + !!! warning "Behavior changed in `langchain-openai` 0.3.0" `method` default changed from `"function_calling"` to `"json_schema"`. - !!! warning "Behavior changed in 0.3.12" + !!! warning "Behavior changed in `langchain-openai` 0.3.12" Support for `tools` added. - !!! warning "Behavior changed in 0.3.21" + !!! warning "Behavior changed in `langchain-openai` 0.3.21" Pass `kwargs` through to the model. ??? note "Example: `schema=Pydantic` class, `method='json_schema'`, `include_raw=False`, `strict=True`" diff --git a/libs/standard-tests/langchain_tests/integration_tests/chat_models.py b/libs/standard-tests/langchain_tests/integration_tests/chat_models.py index 62a2697af01..93e55949a02 100644 --- a/libs/standard-tests/langchain_tests/integration_tests/chat_models.py +++ b/libs/standard-tests/langchain_tests/integration_tests/chat_models.py @@ -997,7 +997,7 @@ class ChatModelIntegrationTests(ChatModelTests): This test is optional and should be skipped if the model does not return usage metadata (see configuration below). - !!! warning "Behavior changed in 0.3.17" + !!! warning "Behavior changed in `langchain-tests` 0.3.17" Additionally check for the presence of `model_name` in the response metadata, which is needed for usage tracking in callback handlers. @@ -1171,7 +1171,7 @@ class ChatModelIntegrationTests(ChatModelTests): Test to verify that the model returns correct usage metadata in streaming mode. - !!! warning "Behavior changed in 0.3.17" + !!! warning "Behavior changed in `langchain-tests` 0.3.17" Additionally check for the presence of `model_name` in the response metadata, which is needed for usage tracking in callback handlers. diff --git a/libs/text-splitters/langchain_text_splitters/html.py b/libs/text-splitters/langchain_text_splitters/html.py index 47596f135f4..2eee21a3b21 100644 --- a/libs/text-splitters/langchain_text_splitters/html.py +++ b/libs/text-splitters/langchain_text_splitters/html.py @@ -529,7 +529,7 @@ class HTMLSemanticPreservingSplitter(BaseDocumentTransformer): Markdown format. Note that some chunks may exceed the maximum size to maintain semantic integrity. - !!! version-added "Added in version 0.3.5" + !!! version-added "Added in `langchain-text-splitters` 0.3.5" Example: ```python