The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
docs(core): image url docstring enhancement (#34488)
Mason Daugherty78b2d51edcf4
diff --git a/libs/core/langchain_core/messages/content.py b/libs/core/langchain_core/messages/content.pyindex c49dc770eb..27a1323ed1 100644--- a/libs/core/langchain_core/messages/content.py+++ b/libs/core/langchain_core/messages/content.py@@ -504,7 +504,7 @@ class ImageContentBlock(TypedDict):"""Image data.!!! note "Factory function"- `create_image_block` may also be used as a factory to create a+ `create_image_block` may also be used as a factory to create an`ImageContentBlock`. Benefits include:* Automatic ID generation (when not provided)diff --git a/libs/core/langchain_core/prompt_values.py b/libs/core/langchain_core/prompt_values.pyindex cb29070fa6..635fa87f20 100644--- a/libs/core/langchain_core/prompt_values.py+++ b/libs/core/langchain_core/prompt_values.py@@ -104,18 +104,31 @@ class ChatPromptValue(PromptValue):class ImageURL(TypedDict, total=False):- """Image URL."""+ """Image URL for multimodal model inputs (OpenAI format).++ Represents the inner `image_url` object in OpenAI's Chat Completion API format. This+ is used by `ImagePromptTemplate` and `ChatPromptTemplate`.++ See Also:+ `ImageContentBlock`: LangChain's provider-agnostic image format used in message+ content blocks. Use `ImageContentBlock` when working with the standardized+ message format across different providers.++ Note:+ The `detail` field values are not validated locally. Invalid values+ will be rejected by the downstream API, allowing new valid values to+ be used without requiring a LangChain update.+ """detail: Literal["auto", "low", "high"]"""Specifies the detail level of the image.- Can be `'auto'`, `'low'`, or `'high'`.-- This follows OpenAI's Chat Completion API's image URL format.+ Defaults to ``'auto'`` if not specified. Higher detail levels consume+ more tokens but provide better image understanding."""url: str- """Either a URL of the image or the base64 encoded image data."""+ """URL of the image or base64-encoded image data."""class ImagePromptValue(PromptValue):