diff --git a/libs/langchain_v1/uv.lock b/libs/langchain_v1/uv.lock index 9631d73a5cc..14fdadc6108 100644 --- a/libs/langchain_v1/uv.lock +++ b/libs/langchain_v1/uv.lock @@ -2019,7 +2019,7 @@ typing = [ [[package]] name = "langchain-anthropic" -version = "1.3.4" +version = "1.3.5" source = { editable = "../partners/anthropic" } dependencies = [ { name = "anthropic" }, @@ -2151,7 +2151,7 @@ wheels = [ [[package]] name = "langchain-core" -version = "1.2.18" +version = "1.2.19" source = { editable = "../core" } dependencies = [ { name = "jsonpatch" }, 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 9191fd61d5a..3b49ac45765 100644 --- a/libs/standard-tests/langchain_tests/integration_tests/chat_models.py +++ b/libs/standard-tests/langchain_tests/integration_tests/chat_models.py @@ -2583,7 +2583,9 @@ class ChatModelIntegrationTests(ChatModelTests): pytest.skip("Model does not support PDF inputs.") url = "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" - pdf_data = base64.b64encode(httpx.get(url, timeout=10.0).content).decode("utf-8") + pdf_data = base64.b64encode(httpx.get(url, timeout=10.0).content).decode( + "utf-8" + ) message = HumanMessage( [ @@ -2781,7 +2783,9 @@ class ChatModelIntegrationTests(ChatModelTests): pytest.skip("Model does not support image message.") image_url = "https://raw.githubusercontent.com/langchain-ai/docs/4d11d08b6b0e210bd456943f7a22febbd168b543/src/images/agentic-rag-output.png" - image_data = base64.b64encode(httpx.get(image_url, timeout=10.0).content).decode("utf-8") + image_data = base64.b64encode( + httpx.get(image_url, timeout=10.0).content + ).decode("utf-8") # OpenAI CC format, base64 data message = HumanMessage( @@ -2887,7 +2891,9 @@ class ChatModelIntegrationTests(ChatModelTests): pytest.skip("Model does not support image tool message.") image_url = "https://raw.githubusercontent.com/langchain-ai/docs/4d11d08b6b0e210bd456943f7a22febbd168b543/src/images/agentic-rag-output.png" - image_data = base64.b64encode(httpx.get(image_url, timeout=10.0).content).decode("utf-8") + image_data = base64.b64encode( + httpx.get(image_url, timeout=10.0).content + ).decode("utf-8") # OpenAI CC format, base64 data oai_format_message = ToolMessage( @@ -2986,7 +2992,9 @@ class ChatModelIntegrationTests(ChatModelTests): pytest.skip("Model does not support PDF tool message.") url = "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" - pdf_data = base64.b64encode(httpx.get(url, timeout=10.0).content).decode("utf-8") + pdf_data = base64.b64encode(httpx.get(url, timeout=10.0).content).decode( + "utf-8" + ) tool_message = ToolMessage( content_blocks=[ @@ -3122,7 +3130,9 @@ class ChatModelIntegrationTests(ChatModelTests): ] if self.supports_image_inputs: image_url = "https://raw.githubusercontent.com/langchain-ai/docs/4d11d08b6b0e210bd456943f7a22febbd168b543/src/images/agentic-rag-output.png" - image_data = base64.b64encode(httpx.get(image_url, timeout=10.0).content).decode("utf-8") + image_data = base64.b64encode( + httpx.get(image_url, timeout=10.0).content + ).decode("utf-8") human_content.append( { "type": "image", diff --git a/libs/text-splitters/langchain_text_splitters/base.py b/libs/text-splitters/langchain_text_splitters/base.py index fa94ee2d464..a12564c03b3 100644 --- a/libs/text-splitters/langchain_text_splitters/base.py +++ b/libs/text-splitters/langchain_text_splitters/base.py @@ -227,7 +227,7 @@ class TextSplitter(BaseDocumentTransformer, ABC): cls, encoding_name: str = "gpt2", model_name: str | None = None, - allowed_special: Literal["all"] | AbstractSet[str] = None, + allowed_special: Literal["all"] | AbstractSet[str] | None = None, disallowed_special: Literal["all"] | Collection[str] = "all", **kwargs: Any, ) -> Self: @@ -304,7 +304,7 @@ class TokenTextSplitter(TextSplitter): self, encoding_name: str = "gpt2", model_name: str | None = None, - allowed_special: Literal["all"] | AbstractSet[str] = None, + allowed_special: Literal["all"] | AbstractSet[str] | None = None, disallowed_special: Literal["all"] | Collection[str] = "all", **kwargs: Any, ) -> None: diff --git a/libs/text-splitters/uv.lock b/libs/text-splitters/uv.lock index 6e375657b1a..c5e684af380 100644 --- a/libs/text-splitters/uv.lock +++ b/libs/text-splitters/uv.lock @@ -1184,7 +1184,7 @@ wheels = [ [[package]] name = "langchain-core" -version = "1.2.18" +version = "1.2.19" source = { editable = "../core" } dependencies = [ { name = "jsonpatch" },