From bc5e8e0c172e4e20958ef5227226e8c88667047c Mon Sep 17 00:00:00 2001 From: Chester Curme Date: Wed, 9 Jul 2025 09:17:54 -0400 Subject: [PATCH] remove total --- .../langchain_core/messages/content_blocks.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libs/core/langchain_core/messages/content_blocks.py b/libs/core/langchain_core/messages/content_blocks.py index 27f21f5b3a4..8da0a797226 100644 --- a/libs/core/langchain_core/messages/content_blocks.py +++ b/libs/core/langchain_core/messages/content_blocks.py @@ -8,7 +8,7 @@ from typing_extensions import NotRequired, TypedDict # Text and annotations -class UrlCitation(TypedDict, total=False): +class UrlCitation(TypedDict): """Citation from a URL.""" type: Literal["url_citation"] @@ -29,7 +29,7 @@ class UrlCitation(TypedDict, total=False): """End index of the response text for which the annotation applies.""" -class DocumentCitation(TypedDict, total=False): +class DocumentCitation(TypedDict): """Annotation for data from a document.""" type: Literal["document_citation"] @@ -47,7 +47,7 @@ class DocumentCitation(TypedDict, total=False): """End index of the response text for which the annotation applies.""" -class NonStandardAnnotation(TypedDict, total=False): +class NonStandardAnnotation(TypedDict): """Provider-specific annotation format.""" type: Literal["non_standard_annotation"] @@ -56,7 +56,7 @@ class NonStandardAnnotation(TypedDict, total=False): """Provider-specific annotation data.""" -class TextContentBlock(TypedDict, total=False): +class TextContentBlock(TypedDict): """Content block for text output.""" type: Literal["text"] @@ -70,7 +70,7 @@ class TextContentBlock(TypedDict, total=False): # Tool calls -class ToolCallContentBlock(TypedDict, total=False): +class ToolCallContentBlock(TypedDict): """Content block for tool calls. These are references to a :class:`~langchain_core.messages.tool.ToolCall` in the @@ -84,7 +84,7 @@ class ToolCallContentBlock(TypedDict, total=False): # Reasoning -class ReasoningContentBlock(TypedDict, total=False): +class ReasoningContentBlock(TypedDict): """Content block for reasoning output.""" type: Literal["reasoning"] @@ -94,7 +94,7 @@ class ReasoningContentBlock(TypedDict, total=False): # Multi-modal -class BaseDataContentBlock(TypedDict, total=False): +class BaseDataContentBlock(TypedDict): """Base class for data content blocks.""" mime_type: NotRequired[str] @@ -134,7 +134,7 @@ class PlainTextContentBlock(BaseDataContentBlock): """Text data.""" -class IDContentBlock(TypedDict): +class IDContentBlock(BaseDataContentBlock): """Content block for data specified by an identifier.""" type: Literal["image", "audio", "file"]