mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-10 05:20:39 +00:00
remove total
This commit is contained in:
parent
93c1aeebb6
commit
bc5e8e0c17
@ -8,7 +8,7 @@ from typing_extensions import NotRequired, TypedDict
|
|||||||
|
|
||||||
|
|
||||||
# Text and annotations
|
# Text and annotations
|
||||||
class UrlCitation(TypedDict, total=False):
|
class UrlCitation(TypedDict):
|
||||||
"""Citation from a URL."""
|
"""Citation from a URL."""
|
||||||
|
|
||||||
type: Literal["url_citation"]
|
type: Literal["url_citation"]
|
||||||
@ -29,7 +29,7 @@ class UrlCitation(TypedDict, total=False):
|
|||||||
"""End index of the response text for which the annotation applies."""
|
"""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."""
|
"""Annotation for data from a document."""
|
||||||
|
|
||||||
type: Literal["document_citation"]
|
type: Literal["document_citation"]
|
||||||
@ -47,7 +47,7 @@ class DocumentCitation(TypedDict, total=False):
|
|||||||
"""End index of the response text for which the annotation applies."""
|
"""End index of the response text for which the annotation applies."""
|
||||||
|
|
||||||
|
|
||||||
class NonStandardAnnotation(TypedDict, total=False):
|
class NonStandardAnnotation(TypedDict):
|
||||||
"""Provider-specific annotation format."""
|
"""Provider-specific annotation format."""
|
||||||
|
|
||||||
type: Literal["non_standard_annotation"]
|
type: Literal["non_standard_annotation"]
|
||||||
@ -56,7 +56,7 @@ class NonStandardAnnotation(TypedDict, total=False):
|
|||||||
"""Provider-specific annotation data."""
|
"""Provider-specific annotation data."""
|
||||||
|
|
||||||
|
|
||||||
class TextContentBlock(TypedDict, total=False):
|
class TextContentBlock(TypedDict):
|
||||||
"""Content block for text output."""
|
"""Content block for text output."""
|
||||||
|
|
||||||
type: Literal["text"]
|
type: Literal["text"]
|
||||||
@ -70,7 +70,7 @@ class TextContentBlock(TypedDict, total=False):
|
|||||||
|
|
||||||
|
|
||||||
# Tool calls
|
# Tool calls
|
||||||
class ToolCallContentBlock(TypedDict, total=False):
|
class ToolCallContentBlock(TypedDict):
|
||||||
"""Content block for tool calls.
|
"""Content block for tool calls.
|
||||||
|
|
||||||
These are references to a :class:`~langchain_core.messages.tool.ToolCall` in the
|
These are references to a :class:`~langchain_core.messages.tool.ToolCall` in the
|
||||||
@ -84,7 +84,7 @@ class ToolCallContentBlock(TypedDict, total=False):
|
|||||||
|
|
||||||
|
|
||||||
# Reasoning
|
# Reasoning
|
||||||
class ReasoningContentBlock(TypedDict, total=False):
|
class ReasoningContentBlock(TypedDict):
|
||||||
"""Content block for reasoning output."""
|
"""Content block for reasoning output."""
|
||||||
|
|
||||||
type: Literal["reasoning"]
|
type: Literal["reasoning"]
|
||||||
@ -94,7 +94,7 @@ class ReasoningContentBlock(TypedDict, total=False):
|
|||||||
|
|
||||||
|
|
||||||
# Multi-modal
|
# Multi-modal
|
||||||
class BaseDataContentBlock(TypedDict, total=False):
|
class BaseDataContentBlock(TypedDict):
|
||||||
"""Base class for data content blocks."""
|
"""Base class for data content blocks."""
|
||||||
|
|
||||||
mime_type: NotRequired[str]
|
mime_type: NotRequired[str]
|
||||||
@ -134,7 +134,7 @@ class PlainTextContentBlock(BaseDataContentBlock):
|
|||||||
"""Text data."""
|
"""Text data."""
|
||||||
|
|
||||||
|
|
||||||
class IDContentBlock(TypedDict):
|
class IDContentBlock(BaseDataContentBlock):
|
||||||
"""Content block for data specified by an identifier."""
|
"""Content block for data specified by an identifier."""
|
||||||
|
|
||||||
type: Literal["image", "audio", "file"]
|
type: Literal["image", "audio", "file"]
|
||||||
|
Loading…
Reference in New Issue
Block a user