From 08cd5bb9b4b45b235ac9eb0166fed479880bb806 Mon Sep 17 00:00:00 2001 From: Mason Daugherty Date: Fri, 15 Aug 2025 16:27:47 -0400 Subject: [PATCH] clarify intent of `extras` under data blocks --- libs/core/langchain_core/messages/content_blocks.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/core/langchain_core/messages/content_blocks.py b/libs/core/langchain_core/messages/content_blocks.py index ac00966814a..d98e0ff09ce 100644 --- a/libs/core/langchain_core/messages/content_blocks.py +++ b/libs/core/langchain_core/messages/content_blocks.py @@ -647,7 +647,7 @@ class ImageContentBlock(TypedDict): """Data as a base64 string.""" extras: NotRequired[dict[str, Any]] - """Provider-specific metadata.""" + """Provider-specific metadata. This shouldn't be used for the image data itself.""" class VideoContentBlock(TypedDict): @@ -694,7 +694,7 @@ class VideoContentBlock(TypedDict): """Data as a base64 string.""" extras: NotRequired[dict[str, Any]] - """Provider-specific metadata.""" + """Provider-specific metadata. This shouldn't be used for the video data itself.""" class AudioContentBlock(TypedDict): @@ -740,7 +740,7 @@ class AudioContentBlock(TypedDict): """Data as a base64 string.""" extras: NotRequired[dict[str, Any]] - """Provider-specific metadata.""" + """Provider-specific metadata. This shouldn't be used for the audio data itself.""" class PlainTextContentBlock(TypedDict): @@ -796,7 +796,7 @@ class PlainTextContentBlock(TypedDict): """Context for the text, e.g., a description or summary of the text's content.""" extras: NotRequired[dict[str, Any]] - """Provider-specific metadata.""" + """Provider-specific metadata. This shouldn't be used for the data itself.""" class FileContentBlock(TypedDict): @@ -850,7 +850,7 @@ class FileContentBlock(TypedDict): """Data as a base64 string.""" extras: NotRequired[dict[str, Any]] - """Provider-specific metadata.""" + """Provider-specific metadata. This shouldn't be used for the file data itself.""" # Future modalities to consider: