Skip to content

Type definitions#

Index > BedrockRuntime > Type definitions

Auto-generated documentation for BedrockRuntime type annotations stubs module mypy-boto3-bedrock-runtime.

BlobTypeDef#

# BlobTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import BlobTypeDef


def get_value() -> BlobTypeDef:
    return ...


# BlobTypeDef definition

BlobTypeDef = Union[
    str,
    bytes,
    IO[Any],
    botocore.response.StreamingBody,
]

TimestampTypeDef#

# TimestampTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import TimestampTypeDef


def get_value() -> TimestampTypeDef:
    return ...


# TimestampTypeDef definition

TimestampTypeDef = Union[
    datetime.datetime,
    str,
]

GuardrailConverseTextBlockUnionTypeDef#

# GuardrailConverseTextBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseTextBlockUnionTypeDef


def get_value() -> GuardrailConverseTextBlockUnionTypeDef:
    return ...


# GuardrailConverseTextBlockUnionTypeDef definition

GuardrailConverseTextBlockUnionTypeDef = Union[
    GuardrailConverseTextBlockTypeDef,  # (1)
    GuardrailConverseTextBlockOutputTypeDef,  # (2)
]
  1. See GuardrailConverseTextBlockTypeDef
  2. See GuardrailConverseTextBlockOutputTypeDef

ToolUseBlockUnionTypeDef#

# ToolUseBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolUseBlockUnionTypeDef


def get_value() -> ToolUseBlockUnionTypeDef:
    return ...


# ToolUseBlockUnionTypeDef definition

ToolUseBlockUnionTypeDef = Union[
    ToolUseBlockTypeDef,  # (1)
    ToolUseBlockOutputTypeDef,  # (2)
]
  1. See ToolUseBlockTypeDef
  2. See ToolUseBlockOutputTypeDef

AudioSourceUnionTypeDef#

# AudioSourceUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import AudioSourceUnionTypeDef


def get_value() -> AudioSourceUnionTypeDef:
    return ...


# AudioSourceUnionTypeDef definition

AudioSourceUnionTypeDef = Union[
    AudioSourceTypeDef,  # (1)
    AudioSourceOutputTypeDef,  # (2)
]
  1. See AudioSourceTypeDef
  2. See AudioSourceOutputTypeDef

GuardrailConverseImageSourceUnionTypeDef#

# GuardrailConverseImageSourceUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseImageSourceUnionTypeDef


def get_value() -> GuardrailConverseImageSourceUnionTypeDef:
    return ...


# GuardrailConverseImageSourceUnionTypeDef definition

GuardrailConverseImageSourceUnionTypeDef = Union[
    GuardrailConverseImageSourceTypeDef,  # (1)
    GuardrailConverseImageSourceOutputTypeDef,  # (2)
]
  1. See GuardrailConverseImageSourceTypeDef
  2. See GuardrailConverseImageSourceOutputTypeDef

ImageSourceUnionTypeDef#

# ImageSourceUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import ImageSourceUnionTypeDef


def get_value() -> ImageSourceUnionTypeDef:
    return ...


# ImageSourceUnionTypeDef definition

ImageSourceUnionTypeDef = Union[
    ImageSourceTypeDef,  # (1)
    ImageSourceOutputTypeDef,  # (2)
]
  1. See ImageSourceTypeDef
  2. See ImageSourceOutputTypeDef

VideoSourceUnionTypeDef#

# VideoSourceUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import VideoSourceUnionTypeDef


def get_value() -> VideoSourceUnionTypeDef:
    return ...


# VideoSourceUnionTypeDef definition

VideoSourceUnionTypeDef = Union[
    VideoSourceTypeDef,  # (1)
    VideoSourceOutputTypeDef,  # (2)
]
  1. See VideoSourceTypeDef
  2. See VideoSourceOutputTypeDef

DocumentSourceUnionTypeDef#

# DocumentSourceUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import DocumentSourceUnionTypeDef


def get_value() -> DocumentSourceUnionTypeDef:
    return ...


# DocumentSourceUnionTypeDef definition

DocumentSourceUnionTypeDef = Union[
    DocumentSourceTypeDef,  # (1)
    DocumentSourceOutputTypeDef,  # (2)
]
  1. See DocumentSourceTypeDef
  2. See DocumentSourceOutputTypeDef

ReasoningContentBlockUnionTypeDef#

# ReasoningContentBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import ReasoningContentBlockUnionTypeDef


def get_value() -> ReasoningContentBlockUnionTypeDef:
    return ...


# ReasoningContentBlockUnionTypeDef definition

ReasoningContentBlockUnionTypeDef = Union[
    ReasoningContentBlockTypeDef,  # (1)
    ReasoningContentBlockOutputTypeDef,  # (2)
]
  1. See ReasoningContentBlockTypeDef
  2. See ReasoningContentBlockOutputTypeDef

SearchResultBlockUnionTypeDef#

# SearchResultBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import SearchResultBlockUnionTypeDef


def get_value() -> SearchResultBlockUnionTypeDef:
    return ...


# SearchResultBlockUnionTypeDef definition

SearchResultBlockUnionTypeDef = Union[
    SearchResultBlockTypeDef,  # (1)
    SearchResultBlockOutputTypeDef,  # (2)
]
  1. See SearchResultBlockTypeDef
  2. See SearchResultBlockOutputTypeDef

CitationUnionTypeDef#

# CitationUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import CitationUnionTypeDef


def get_value() -> CitationUnionTypeDef:
    return ...


# CitationUnionTypeDef definition

CitationUnionTypeDef = Union[
    CitationTypeDef,  # (1)
    CitationOutputTypeDef,  # (2)
]
  1. See CitationTypeDef
  2. See CitationOutputTypeDef

AudioBlockUnionTypeDef#

# AudioBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import AudioBlockUnionTypeDef


def get_value() -> AudioBlockUnionTypeDef:
    return ...


# AudioBlockUnionTypeDef definition

AudioBlockUnionTypeDef = Union[
    AudioBlockTypeDef,  # (1)
    AudioBlockOutputTypeDef,  # (2)
]
  1. See AudioBlockTypeDef
  2. See AudioBlockOutputTypeDef

GuardrailConverseImageBlockUnionTypeDef#

# GuardrailConverseImageBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseImageBlockUnionTypeDef


def get_value() -> GuardrailConverseImageBlockUnionTypeDef:
    return ...


# GuardrailConverseImageBlockUnionTypeDef definition

GuardrailConverseImageBlockUnionTypeDef = Union[
    GuardrailConverseImageBlockTypeDef,  # (1)
    GuardrailConverseImageBlockOutputTypeDef,  # (2)
]
  1. See GuardrailConverseImageBlockTypeDef
  2. See GuardrailConverseImageBlockOutputTypeDef

ImageBlockUnionTypeDef#

# ImageBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import ImageBlockUnionTypeDef


def get_value() -> ImageBlockUnionTypeDef:
    return ...


# ImageBlockUnionTypeDef definition

ImageBlockUnionTypeDef = Union[
    ImageBlockTypeDef,  # (1)
    ImageBlockOutputTypeDef,  # (2)
]
  1. See ImageBlockTypeDef
  2. See ImageBlockOutputTypeDef

VideoBlockUnionTypeDef#

# VideoBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import VideoBlockUnionTypeDef


def get_value() -> VideoBlockUnionTypeDef:
    return ...


# VideoBlockUnionTypeDef definition

VideoBlockUnionTypeDef = Union[
    VideoBlockTypeDef,  # (1)
    VideoBlockOutputTypeDef,  # (2)
]
  1. See VideoBlockTypeDef
  2. See VideoBlockOutputTypeDef

DocumentBlockUnionTypeDef#

# DocumentBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import DocumentBlockUnionTypeDef


def get_value() -> DocumentBlockUnionTypeDef:
    return ...


# DocumentBlockUnionTypeDef definition

DocumentBlockUnionTypeDef = Union[
    DocumentBlockTypeDef,  # (1)
    DocumentBlockOutputTypeDef,  # (2)
]
  1. See DocumentBlockTypeDef
  2. See DocumentBlockOutputTypeDef

CitationsContentBlockUnionTypeDef#

# CitationsContentBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import CitationsContentBlockUnionTypeDef


def get_value() -> CitationsContentBlockUnionTypeDef:
    return ...


# CitationsContentBlockUnionTypeDef definition

CitationsContentBlockUnionTypeDef = Union[
    CitationsContentBlockTypeDef,  # (1)
    CitationsContentBlockOutputTypeDef,  # (2)
]
  1. See CitationsContentBlockTypeDef
  2. See CitationsContentBlockOutputTypeDef

GuardrailConverseContentBlockUnionTypeDef#

# GuardrailConverseContentBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseContentBlockUnionTypeDef


def get_value() -> GuardrailConverseContentBlockUnionTypeDef:
    return ...


# GuardrailConverseContentBlockUnionTypeDef definition

GuardrailConverseContentBlockUnionTypeDef = Union[
    GuardrailConverseContentBlockTypeDef,  # (1)
    GuardrailConverseContentBlockOutputTypeDef,  # (2)
]
  1. See GuardrailConverseContentBlockTypeDef
  2. See GuardrailConverseContentBlockOutputTypeDef

ToolResultContentBlockUnionTypeDef#

# ToolResultContentBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolResultContentBlockUnionTypeDef


def get_value() -> ToolResultContentBlockUnionTypeDef:
    return ...


# ToolResultContentBlockUnionTypeDef definition

ToolResultContentBlockUnionTypeDef = Union[
    ToolResultContentBlockTypeDef,  # (1)
    ToolResultContentBlockOutputTypeDef,  # (2)
]
  1. See ToolResultContentBlockTypeDef
  2. See ToolResultContentBlockOutputTypeDef

ToolResultBlockUnionTypeDef#

# ToolResultBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolResultBlockUnionTypeDef


def get_value() -> ToolResultBlockUnionTypeDef:
    return ...


# ToolResultBlockUnionTypeDef definition

ToolResultBlockUnionTypeDef = Union[
    ToolResultBlockTypeDef,  # (1)
    ToolResultBlockOutputTypeDef,  # (2)
]
  1. See ToolResultBlockTypeDef
  2. See ToolResultBlockOutputTypeDef

ContentBlockUnionTypeDef#

# ContentBlockUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import ContentBlockUnionTypeDef


def get_value() -> ContentBlockUnionTypeDef:
    return ...


# ContentBlockUnionTypeDef definition

ContentBlockUnionTypeDef = Union[
    ContentBlockTypeDef,  # (1)
    ContentBlockOutputTypeDef,  # (2)
]
  1. See ContentBlockTypeDef
  2. See ContentBlockOutputTypeDef

MessageUnionTypeDef#

# MessageUnionTypeDef Union usage example

from mypy_boto3_bedrock_runtime.type_defs import MessageUnionTypeDef


def get_value() -> MessageUnionTypeDef:
    return ...


# MessageUnionTypeDef definition

MessageUnionTypeDef = Union[
    MessageTypeDef,  # (1)
    MessageOutputTypeDef,  # (2)
]
  1. See MessageTypeDef
  2. See MessageOutputTypeDef

AppliedGuardrailDetailsTypeDef#

# AppliedGuardrailDetailsTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import AppliedGuardrailDetailsTypeDef


def get_value() -> AppliedGuardrailDetailsTypeDef:
    return {
        "guardrailId": ...,
    }


# AppliedGuardrailDetailsTypeDef definition

class AppliedGuardrailDetailsTypeDef(TypedDict):
    guardrailId: NotRequired[str],
    guardrailVersion: NotRequired[str],
    guardrailArn: NotRequired[str],
    guardrailOrigin: NotRequired[list[GuardrailOriginType]],  # (1)
    guardrailOwnership: NotRequired[GuardrailOwnershipType],  # (2)
  1. See list[GuardrailOriginType]
  2. See GuardrailOwnershipType

GuardrailOutputContentTypeDef#

# GuardrailOutputContentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailOutputContentTypeDef


def get_value() -> GuardrailOutputContentTypeDef:
    return {
        "text": ...,
    }


# GuardrailOutputContentTypeDef definition

class GuardrailOutputContentTypeDef(TypedDict):
    text: NotRequired[str],

GuardrailUsageTypeDef#

# GuardrailUsageTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailUsageTypeDef


def get_value() -> GuardrailUsageTypeDef:
    return {
        "topicPolicyUnits": ...,
    }


# GuardrailUsageTypeDef definition

class GuardrailUsageTypeDef(TypedDict):
    topicPolicyUnits: int,
    contentPolicyUnits: int,
    wordPolicyUnits: int,
    sensitiveInformationPolicyUnits: int,
    sensitiveInformationPolicyFreeUnits: int,
    contextualGroundingPolicyUnits: int,
    contentPolicyImageUnits: NotRequired[int],
    automatedReasoningPolicyUnits: NotRequired[int],
    automatedReasoningPolicies: NotRequired[int],

ResponseMetadataTypeDef#

# ResponseMetadataTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ResponseMetadataTypeDef


def get_value() -> ResponseMetadataTypeDef:
    return {
        "RequestId": ...,
    }


# ResponseMetadataTypeDef definition

class ResponseMetadataTypeDef(TypedDict):
    RequestId: str,
    HTTPStatusCode: int,
    HTTPHeaders: dict[str, str],
    RetryAttempts: int,
    HostId: NotRequired[str],

AsyncInvokeS3OutputDataConfigTypeDef#

# AsyncInvokeS3OutputDataConfigTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import AsyncInvokeS3OutputDataConfigTypeDef


def get_value() -> AsyncInvokeS3OutputDataConfigTypeDef:
    return {
        "s3Uri": ...,
    }


# AsyncInvokeS3OutputDataConfigTypeDef definition

class AsyncInvokeS3OutputDataConfigTypeDef(TypedDict):
    s3Uri: str,
    kmsKeyId: NotRequired[str],
    bucketOwner: NotRequired[str],

ErrorBlockTypeDef#

# ErrorBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ErrorBlockTypeDef


def get_value() -> ErrorBlockTypeDef:
    return {
        "message": ...,
    }


# ErrorBlockTypeDef definition

class ErrorBlockTypeDef(TypedDict):
    message: NotRequired[str],

S3LocationTypeDef#

# S3LocationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import S3LocationTypeDef


def get_value() -> S3LocationTypeDef:
    return {
        "uri": ...,
    }


# S3LocationTypeDef definition

class S3LocationTypeDef(TypedDict):
    uri: str,
    bucketOwner: NotRequired[str],

BidirectionalOutputPayloadPartTypeDef#

# BidirectionalOutputPayloadPartTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import BidirectionalOutputPayloadPartTypeDef


def get_value() -> BidirectionalOutputPayloadPartTypeDef:
    return {
        "bytes": ...,
    }


# BidirectionalOutputPayloadPartTypeDef definition

class BidirectionalOutputPayloadPartTypeDef(TypedDict):
    bytes: NotRequired[bytes],

CacheDetailTypeDef#

# CacheDetailTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import CacheDetailTypeDef


def get_value() -> CacheDetailTypeDef:
    return {
        "ttl": ...,
    }


# CacheDetailTypeDef definition

class CacheDetailTypeDef(TypedDict):
    ttl: CacheTTLType,  # (1)
    inputTokens: int,
  1. See CacheTTLType

CachePointBlockTypeDef#

# CachePointBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import CachePointBlockTypeDef


def get_value() -> CachePointBlockTypeDef:
    return {
        "type": ...,
    }


# CachePointBlockTypeDef definition

class CachePointBlockTypeDef(TypedDict):
    type: CachePointTypeType,  # (1)
    ttl: NotRequired[CacheTTLType],  # (2)
  1. See CachePointTypeType
  2. See CacheTTLType

CitationGeneratedContentTypeDef#

# CitationGeneratedContentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import CitationGeneratedContentTypeDef


def get_value() -> CitationGeneratedContentTypeDef:
    return {
        "text": ...,
    }


# CitationGeneratedContentTypeDef definition

class CitationGeneratedContentTypeDef(TypedDict):
    text: NotRequired[str],

DocumentCharLocationTypeDef#

# DocumentCharLocationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import DocumentCharLocationTypeDef


def get_value() -> DocumentCharLocationTypeDef:
    return {
        "documentIndex": ...,
    }


# DocumentCharLocationTypeDef definition

class DocumentCharLocationTypeDef(TypedDict):
    documentIndex: NotRequired[int],
    start: NotRequired[int],
    end: NotRequired[int],

DocumentChunkLocationTypeDef#

# DocumentChunkLocationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import DocumentChunkLocationTypeDef


def get_value() -> DocumentChunkLocationTypeDef:
    return {
        "documentIndex": ...,
    }


# DocumentChunkLocationTypeDef definition

class DocumentChunkLocationTypeDef(TypedDict):
    documentIndex: NotRequired[int],
    start: NotRequired[int],
    end: NotRequired[int],

DocumentPageLocationTypeDef#

# DocumentPageLocationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import DocumentPageLocationTypeDef


def get_value() -> DocumentPageLocationTypeDef:
    return {
        "documentIndex": ...,
    }


# DocumentPageLocationTypeDef definition

class DocumentPageLocationTypeDef(TypedDict):
    documentIndex: NotRequired[int],
    start: NotRequired[int],
    end: NotRequired[int],

SearchResultLocationTypeDef#

# SearchResultLocationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import SearchResultLocationTypeDef


def get_value() -> SearchResultLocationTypeDef:
    return {
        "searchResultIndex": ...,
    }


# SearchResultLocationTypeDef definition

class SearchResultLocationTypeDef(TypedDict):
    searchResultIndex: NotRequired[int],
    start: NotRequired[int],
    end: NotRequired[int],

WebLocationTypeDef#

# WebLocationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import WebLocationTypeDef


def get_value() -> WebLocationTypeDef:
    return {
        "url": ...,
    }


# WebLocationTypeDef definition

class WebLocationTypeDef(TypedDict):
    url: NotRequired[str],
    domain: NotRequired[str],

CitationSourceContentTypeDef#

# CitationSourceContentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import CitationSourceContentTypeDef


def get_value() -> CitationSourceContentTypeDef:
    return {
        "text": ...,
    }


# CitationSourceContentTypeDef definition

class CitationSourceContentTypeDef(TypedDict):
    text: NotRequired[str],

CitationSourceContentDeltaTypeDef#

# CitationSourceContentDeltaTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import CitationSourceContentDeltaTypeDef


def get_value() -> CitationSourceContentDeltaTypeDef:
    return {
        "text": ...,
    }


# CitationSourceContentDeltaTypeDef definition

class CitationSourceContentDeltaTypeDef(TypedDict):
    text: NotRequired[str],

CitationsConfigTypeDef#

# CitationsConfigTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import CitationsConfigTypeDef


def get_value() -> CitationsConfigTypeDef:
    return {
        "enabled": ...,
    }


# CitationsConfigTypeDef definition

class CitationsConfigTypeDef(TypedDict):
    enabled: bool,

ReasoningContentBlockDeltaTypeDef#

# ReasoningContentBlockDeltaTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ReasoningContentBlockDeltaTypeDef


def get_value() -> ReasoningContentBlockDeltaTypeDef:
    return {
        "text": ...,
    }


# ReasoningContentBlockDeltaTypeDef definition

class ReasoningContentBlockDeltaTypeDef(TypedDict):
    text: NotRequired[str],
    redactedContent: NotRequired[bytes],
    signature: NotRequired[str],

ToolResultBlockDeltaTypeDef#

# ToolResultBlockDeltaTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolResultBlockDeltaTypeDef


def get_value() -> ToolResultBlockDeltaTypeDef:
    return {
        "text": ...,
    }


# ToolResultBlockDeltaTypeDef definition

class ToolResultBlockDeltaTypeDef(TypedDict):
    text: NotRequired[str],
    json: NotRequired[dict[str, Any]],

ToolUseBlockDeltaTypeDef#

# ToolUseBlockDeltaTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolUseBlockDeltaTypeDef


def get_value() -> ToolUseBlockDeltaTypeDef:
    return {
        "input": ...,
    }


# ToolUseBlockDeltaTypeDef definition

class ToolUseBlockDeltaTypeDef(TypedDict):
    input: str,

ToolUseBlockOutputTypeDef#

# ToolUseBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolUseBlockOutputTypeDef


def get_value() -> ToolUseBlockOutputTypeDef:
    return {
        "toolUseId": ...,
    }


# ToolUseBlockOutputTypeDef definition

class ToolUseBlockOutputTypeDef(TypedDict):
    toolUseId: str,
    name: str,
    input: dict[str, Any],
    type: NotRequired[ToolUseTypeType],  # (1)
  1. See ToolUseTypeType

ImageBlockStartTypeDef#

# ImageBlockStartTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ImageBlockStartTypeDef


def get_value() -> ImageBlockStartTypeDef:
    return {
        "format": ...,
    }


# ImageBlockStartTypeDef definition

class ImageBlockStartTypeDef(TypedDict):
    format: ImageFormatType,  # (1)
  1. See ImageFormatType

ToolResultBlockStartTypeDef#

# ToolResultBlockStartTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolResultBlockStartTypeDef


def get_value() -> ToolResultBlockStartTypeDef:
    return {
        "toolUseId": ...,
    }


# ToolResultBlockStartTypeDef definition

class ToolResultBlockStartTypeDef(TypedDict):
    toolUseId: str,
    type: NotRequired[str],
    status: NotRequired[ToolResultStatusType],  # (1)
  1. See ToolResultStatusType

ToolUseBlockStartTypeDef#

# ToolUseBlockStartTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolUseBlockStartTypeDef


def get_value() -> ToolUseBlockStartTypeDef:
    return {
        "toolUseId": ...,
    }


# ToolUseBlockStartTypeDef definition

class ToolUseBlockStartTypeDef(TypedDict):
    toolUseId: str,
    name: str,
    type: NotRequired[ToolUseTypeType],  # (1)
  1. See ToolUseTypeType

ContentBlockStopEventTypeDef#

# ContentBlockStopEventTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ContentBlockStopEventTypeDef


def get_value() -> ContentBlockStopEventTypeDef:
    return {
        "contentBlockIndex": ...,
    }


# ContentBlockStopEventTypeDef definition

class ContentBlockStopEventTypeDef(TypedDict):
    contentBlockIndex: int,

ConverseMetricsTypeDef#

# ConverseMetricsTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseMetricsTypeDef


def get_value() -> ConverseMetricsTypeDef:
    return {
        "latencyMs": ...,
    }


# ConverseMetricsTypeDef definition

class ConverseMetricsTypeDef(TypedDict):
    latencyMs: int,

GuardrailConfigurationTypeDef#

# GuardrailConfigurationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConfigurationTypeDef


def get_value() -> GuardrailConfigurationTypeDef:
    return {
        "guardrailIdentifier": ...,
    }


# GuardrailConfigurationTypeDef definition

class GuardrailConfigurationTypeDef(TypedDict):
    guardrailIdentifier: NotRequired[str],
    guardrailVersion: NotRequired[str],
    trace: NotRequired[GuardrailTraceType],  # (1)
  1. See GuardrailTraceType

InferenceConfigurationTypeDef#

# InferenceConfigurationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InferenceConfigurationTypeDef


def get_value() -> InferenceConfigurationTypeDef:
    return {
        "maxTokens": ...,
    }


# InferenceConfigurationTypeDef definition

class InferenceConfigurationTypeDef(TypedDict):
    maxTokens: NotRequired[int],
    temperature: NotRequired[float],
    topP: NotRequired[float],
    stopSequences: NotRequired[Sequence[str]],

PerformanceConfigurationTypeDef#

# PerformanceConfigurationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import PerformanceConfigurationTypeDef


def get_value() -> PerformanceConfigurationTypeDef:
    return {
        "latency": ...,
    }


# PerformanceConfigurationTypeDef definition

class PerformanceConfigurationTypeDef(TypedDict):
    latency: NotRequired[PerformanceConfigLatencyType],  # (1)
  1. See PerformanceConfigLatencyType

PromptVariableValuesTypeDef#

# PromptVariableValuesTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import PromptVariableValuesTypeDef


def get_value() -> PromptVariableValuesTypeDef:
    return {
        "text": ...,
    }


# PromptVariableValuesTypeDef definition

class PromptVariableValuesTypeDef(TypedDict):
    text: NotRequired[str],

ServiceTierTypeDef#

# ServiceTierTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ServiceTierTypeDef


def get_value() -> ServiceTierTypeDef:
    return {
        "type": ...,
    }


# ServiceTierTypeDef definition

class ServiceTierTypeDef(TypedDict):
    type: ServiceTierTypeType,  # (1)
  1. See ServiceTierTypeType

ConverseStreamMetricsTypeDef#

# ConverseStreamMetricsTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseStreamMetricsTypeDef


def get_value() -> ConverseStreamMetricsTypeDef:
    return {
        "latencyMs": ...,
    }


# ConverseStreamMetricsTypeDef definition

class ConverseStreamMetricsTypeDef(TypedDict):
    latencyMs: int,

InternalServerExceptionTypeDef#

# InternalServerExceptionTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InternalServerExceptionTypeDef


def get_value() -> InternalServerExceptionTypeDef:
    return {
        "message": ...,
    }


# InternalServerExceptionTypeDef definition

class InternalServerExceptionTypeDef(TypedDict):
    message: NotRequired[str],

MessageStartEventTypeDef#

# MessageStartEventTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import MessageStartEventTypeDef


def get_value() -> MessageStartEventTypeDef:
    return {
        "role": ...,
    }


# MessageStartEventTypeDef definition

class MessageStartEventTypeDef(TypedDict):
    role: ConversationRoleType,  # (1)
  1. See ConversationRoleType

MessageStopEventTypeDef#

# MessageStopEventTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import MessageStopEventTypeDef


def get_value() -> MessageStopEventTypeDef:
    return {
        "stopReason": ...,
    }


# MessageStopEventTypeDef definition

class MessageStopEventTypeDef(TypedDict):
    stopReason: StopReasonType,  # (1)
    additionalModelResponseFields: NotRequired[dict[str, Any]],
  1. See StopReasonType

ModelStreamErrorExceptionTypeDef#

# ModelStreamErrorExceptionTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ModelStreamErrorExceptionTypeDef


def get_value() -> ModelStreamErrorExceptionTypeDef:
    return {
        "message": ...,
    }


# ModelStreamErrorExceptionTypeDef definition

class ModelStreamErrorExceptionTypeDef(TypedDict):
    message: NotRequired[str],
    originalStatusCode: NotRequired[int],
    originalMessage: NotRequired[str],

ServiceUnavailableExceptionTypeDef#

# ServiceUnavailableExceptionTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ServiceUnavailableExceptionTypeDef


def get_value() -> ServiceUnavailableExceptionTypeDef:
    return {
        "message": ...,
    }


# ServiceUnavailableExceptionTypeDef definition

class ServiceUnavailableExceptionTypeDef(TypedDict):
    message: NotRequired[str],

ThrottlingExceptionTypeDef#

# ThrottlingExceptionTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ThrottlingExceptionTypeDef


def get_value() -> ThrottlingExceptionTypeDef:
    return {
        "message": ...,
    }


# ThrottlingExceptionTypeDef definition

class ThrottlingExceptionTypeDef(TypedDict):
    message: NotRequired[str],

ValidationExceptionTypeDef#

# ValidationExceptionTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ValidationExceptionTypeDef


def get_value() -> ValidationExceptionTypeDef:
    return {
        "message": ...,
    }


# ValidationExceptionTypeDef definition

class ValidationExceptionTypeDef(TypedDict):
    message: NotRequired[str],

GuardrailStreamConfigurationTypeDef#

# GuardrailStreamConfigurationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailStreamConfigurationTypeDef


def get_value() -> GuardrailStreamConfigurationTypeDef:
    return {
        "guardrailIdentifier": ...,
    }


# GuardrailStreamConfigurationTypeDef definition

class GuardrailStreamConfigurationTypeDef(TypedDict):
    guardrailIdentifier: NotRequired[str],
    guardrailVersion: NotRequired[str],
    trace: NotRequired[GuardrailTraceType],  # (1)
    streamProcessingMode: NotRequired[GuardrailStreamProcessingModeType],  # (2)
  1. See GuardrailTraceType
  2. See GuardrailStreamProcessingModeType

PromptRouterTraceTypeDef#

# PromptRouterTraceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import PromptRouterTraceTypeDef


def get_value() -> PromptRouterTraceTypeDef:
    return {
        "invokedModelId": ...,
    }


# PromptRouterTraceTypeDef definition

class PromptRouterTraceTypeDef(TypedDict):
    invokedModelId: NotRequired[str],

DocumentContentBlockTypeDef#

# DocumentContentBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import DocumentContentBlockTypeDef


def get_value() -> DocumentContentBlockTypeDef:
    return {
        "text": ...,
    }


# DocumentContentBlockTypeDef definition

class DocumentContentBlockTypeDef(TypedDict):
    text: NotRequired[str],

GetAsyncInvokeRequestTypeDef#

# GetAsyncInvokeRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GetAsyncInvokeRequestTypeDef


def get_value() -> GetAsyncInvokeRequestTypeDef:
    return {
        "invocationArn": ...,
    }


# GetAsyncInvokeRequestTypeDef definition

class GetAsyncInvokeRequestTypeDef(TypedDict):
    invocationArn: str,

GuardrailAutomatedReasoningRuleTypeDef#

# GuardrailAutomatedReasoningRuleTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailAutomatedReasoningRuleTypeDef


def get_value() -> GuardrailAutomatedReasoningRuleTypeDef:
    return {
        "identifier": ...,
    }


# GuardrailAutomatedReasoningRuleTypeDef definition

class GuardrailAutomatedReasoningRuleTypeDef(TypedDict):
    identifier: NotRequired[str],
    policyVersionArn: NotRequired[str],

GuardrailAutomatedReasoningInputTextReferenceTypeDef#

# GuardrailAutomatedReasoningInputTextReferenceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailAutomatedReasoningInputTextReferenceTypeDef


def get_value() -> GuardrailAutomatedReasoningInputTextReferenceTypeDef:
    return {
        "text": ...,
    }


# GuardrailAutomatedReasoningInputTextReferenceTypeDef definition

class GuardrailAutomatedReasoningInputTextReferenceTypeDef(TypedDict):
    text: NotRequired[str],

GuardrailAutomatedReasoningStatementTypeDef#

# GuardrailAutomatedReasoningStatementTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailAutomatedReasoningStatementTypeDef


def get_value() -> GuardrailAutomatedReasoningStatementTypeDef:
    return {
        "logic": ...,
    }


# GuardrailAutomatedReasoningStatementTypeDef definition

class GuardrailAutomatedReasoningStatementTypeDef(TypedDict):
    logic: NotRequired[str],
    naturalLanguage: NotRequired[str],

GuardrailTextBlockTypeDef#

# GuardrailTextBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailTextBlockTypeDef


def get_value() -> GuardrailTextBlockTypeDef:
    return {
        "text": ...,
    }


# GuardrailTextBlockTypeDef definition

class GuardrailTextBlockTypeDef(TypedDict):
    text: str,
    qualifiers: NotRequired[Sequence[GuardrailContentQualifierType]],  # (1)
  1. See Sequence[GuardrailContentQualifierType]

GuardrailContentFilterTypeDef#

# GuardrailContentFilterTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailContentFilterTypeDef


def get_value() -> GuardrailContentFilterTypeDef:
    return {
        "type": ...,
    }


# GuardrailContentFilterTypeDef definition

class GuardrailContentFilterTypeDef(TypedDict):
    type: GuardrailContentFilterTypeType,  # (1)
    confidence: GuardrailContentFilterConfidenceType,  # (2)
    action: GuardrailContentPolicyActionType,  # (4)
    filterStrength: NotRequired[GuardrailContentFilterStrengthType],  # (3)
    detected: NotRequired[bool],
  1. See GuardrailContentFilterTypeType
  2. See GuardrailContentFilterConfidenceType
  3. See GuardrailContentFilterStrengthType
  4. See GuardrailContentPolicyActionType

GuardrailContextualGroundingFilterTypeDef#

# GuardrailContextualGroundingFilterTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailContextualGroundingFilterTypeDef


def get_value() -> GuardrailContextualGroundingFilterTypeDef:
    return {
        "type": ...,
    }


# GuardrailContextualGroundingFilterTypeDef definition

class GuardrailContextualGroundingFilterTypeDef(TypedDict):
    type: GuardrailContextualGroundingFilterTypeType,  # (1)
    threshold: float,
    score: float,
    action: GuardrailContextualGroundingPolicyActionType,  # (2)
    detected: NotRequired[bool],
  1. See GuardrailContextualGroundingFilterTypeType
  2. See GuardrailContextualGroundingPolicyActionType

GuardrailConverseTextBlockOutputTypeDef#

# GuardrailConverseTextBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseTextBlockOutputTypeDef


def get_value() -> GuardrailConverseTextBlockOutputTypeDef:
    return {
        "text": ...,
    }


# GuardrailConverseTextBlockOutputTypeDef definition

class GuardrailConverseTextBlockOutputTypeDef(TypedDict):
    text: str,
    qualifiers: NotRequired[list[GuardrailConverseContentQualifierType]],  # (1)
  1. See list[GuardrailConverseContentQualifierType]

GuardrailConverseImageSourceOutputTypeDef#

# GuardrailConverseImageSourceOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseImageSourceOutputTypeDef


def get_value() -> GuardrailConverseImageSourceOutputTypeDef:
    return {
        "bytes": ...,
    }


# GuardrailConverseImageSourceOutputTypeDef definition

class GuardrailConverseImageSourceOutputTypeDef(TypedDict):
    bytes: NotRequired[bytes],

GuardrailConverseTextBlockTypeDef#

# GuardrailConverseTextBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseTextBlockTypeDef


def get_value() -> GuardrailConverseTextBlockTypeDef:
    return {
        "text": ...,
    }


# GuardrailConverseTextBlockTypeDef definition

class GuardrailConverseTextBlockTypeDef(TypedDict):
    text: str,
    qualifiers: NotRequired[Sequence[GuardrailConverseContentQualifierType]],  # (1)
  1. See Sequence[GuardrailConverseContentQualifierType]

GuardrailImageCoverageTypeDef#

# GuardrailImageCoverageTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailImageCoverageTypeDef


def get_value() -> GuardrailImageCoverageTypeDef:
    return {
        "guarded": ...,
    }


# GuardrailImageCoverageTypeDef definition

class GuardrailImageCoverageTypeDef(TypedDict):
    guarded: NotRequired[int],
    total: NotRequired[int],

GuardrailTextCharactersCoverageTypeDef#

# GuardrailTextCharactersCoverageTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailTextCharactersCoverageTypeDef


def get_value() -> GuardrailTextCharactersCoverageTypeDef:
    return {
        "guarded": ...,
    }


# GuardrailTextCharactersCoverageTypeDef definition

class GuardrailTextCharactersCoverageTypeDef(TypedDict):
    guarded: NotRequired[int],
    total: NotRequired[int],

GuardrailCustomWordTypeDef#

# GuardrailCustomWordTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailCustomWordTypeDef


def get_value() -> GuardrailCustomWordTypeDef:
    return {
        "match": ...,
    }


# GuardrailCustomWordTypeDef definition

class GuardrailCustomWordTypeDef(TypedDict):
    match: str,
    action: GuardrailWordPolicyActionType,  # (1)
    detected: NotRequired[bool],
  1. See GuardrailWordPolicyActionType

GuardrailManagedWordTypeDef#

# GuardrailManagedWordTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailManagedWordTypeDef


def get_value() -> GuardrailManagedWordTypeDef:
    return {
        "match": ...,
    }


# GuardrailManagedWordTypeDef definition

class GuardrailManagedWordTypeDef(TypedDict):
    match: str,
    type: GuardrailManagedWordTypeType,  # (1)
    action: GuardrailWordPolicyActionType,  # (2)
    detected: NotRequired[bool],
  1. See GuardrailManagedWordTypeType
  2. See GuardrailWordPolicyActionType

GuardrailPiiEntityFilterTypeDef#

# GuardrailPiiEntityFilterTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailPiiEntityFilterTypeDef


def get_value() -> GuardrailPiiEntityFilterTypeDef:
    return {
        "match": ...,
    }


# GuardrailPiiEntityFilterTypeDef definition

class GuardrailPiiEntityFilterTypeDef(TypedDict):
    match: str,
    type: GuardrailPiiEntityTypeType,  # (1)
    action: GuardrailSensitiveInformationPolicyActionType,  # (2)
    detected: NotRequired[bool],
  1. See GuardrailPiiEntityTypeType
  2. See GuardrailSensitiveInformationPolicyActionType

GuardrailRegexFilterTypeDef#

# GuardrailRegexFilterTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailRegexFilterTypeDef


def get_value() -> GuardrailRegexFilterTypeDef:
    return {
        "name": ...,
    }


# GuardrailRegexFilterTypeDef definition

class GuardrailRegexFilterTypeDef(TypedDict):
    action: GuardrailSensitiveInformationPolicyActionType,  # (1)
    name: NotRequired[str],
    match: NotRequired[str],
    regex: NotRequired[str],
    detected: NotRequired[bool],
  1. See GuardrailSensitiveInformationPolicyActionType

GuardrailTopicTypeDef#

# GuardrailTopicTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailTopicTypeDef


def get_value() -> GuardrailTopicTypeDef:
    return {
        "name": ...,
    }


# GuardrailTopicTypeDef definition

class GuardrailTopicTypeDef(TypedDict):
    name: str,
    type: GuardrailTopicTypeType,  # (1)
    action: GuardrailTopicPolicyActionType,  # (2)
    detected: NotRequired[bool],
  1. See GuardrailTopicTypeType
  2. See GuardrailTopicPolicyActionType

ModelTimeoutExceptionTypeDef#

# ModelTimeoutExceptionTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ModelTimeoutExceptionTypeDef


def get_value() -> ModelTimeoutExceptionTypeDef:
    return {
        "message": ...,
    }


# ModelTimeoutExceptionTypeDef definition

class ModelTimeoutExceptionTypeDef(TypedDict):
    message: NotRequired[str],

JsonSchemaDefinitionTypeDef#

# JsonSchemaDefinitionTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import JsonSchemaDefinitionTypeDef


def get_value() -> JsonSchemaDefinitionTypeDef:
    return {
        "schema": ...,
    }


# JsonSchemaDefinitionTypeDef definition

class JsonSchemaDefinitionTypeDef(TypedDict):
    schema: str,
    name: NotRequired[str],
    description: NotRequired[str],

PaginatorConfigTypeDef#

# PaginatorConfigTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import PaginatorConfigTypeDef


def get_value() -> PaginatorConfigTypeDef:
    return {
        "MaxItems": ...,
    }


# PaginatorConfigTypeDef definition

class PaginatorConfigTypeDef(TypedDict):
    MaxItems: NotRequired[int],
    PageSize: NotRequired[int],
    StartingToken: NotRequired[str],

PayloadPartTypeDef#

# PayloadPartTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import PayloadPartTypeDef


def get_value() -> PayloadPartTypeDef:
    return {
        "bytes": ...,
    }


# PayloadPartTypeDef definition

class PayloadPartTypeDef(TypedDict):
    bytes: NotRequired[bytes],

ReasoningTextBlockTypeDef#

# ReasoningTextBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ReasoningTextBlockTypeDef


def get_value() -> ReasoningTextBlockTypeDef:
    return {
        "text": ...,
    }


# ReasoningTextBlockTypeDef definition

class ReasoningTextBlockTypeDef(TypedDict):
    text: str,
    signature: NotRequired[str],

SearchResultContentBlockTypeDef#

# SearchResultContentBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import SearchResultContentBlockTypeDef


def get_value() -> SearchResultContentBlockTypeDef:
    return {
        "text": ...,
    }


# SearchResultContentBlockTypeDef definition

class SearchResultContentBlockTypeDef(TypedDict):
    text: str,

SpecificToolChoiceTypeDef#

# SpecificToolChoiceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import SpecificToolChoiceTypeDef


def get_value() -> SpecificToolChoiceTypeDef:
    return {
        "name": ...,
    }


# SpecificToolChoiceTypeDef definition

class SpecificToolChoiceTypeDef(TypedDict):
    name: str,

TagTypeDef#

# TagTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import TagTypeDef


def get_value() -> TagTypeDef:
    return {
        "key": ...,
    }


# TagTypeDef definition

class TagTypeDef(TypedDict):
    key: str,
    value: str,

SystemToolTypeDef#

# SystemToolTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import SystemToolTypeDef


def get_value() -> SystemToolTypeDef:
    return {
        "name": ...,
    }


# SystemToolTypeDef definition

class SystemToolTypeDef(TypedDict):
    name: str,

ToolInputSchemaTypeDef#

# ToolInputSchemaTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolInputSchemaTypeDef


def get_value() -> ToolInputSchemaTypeDef:
    return {
        "json": ...,
    }


# ToolInputSchemaTypeDef definition

class ToolInputSchemaTypeDef(TypedDict):
    json: NotRequired[Mapping[str, Any]],

ToolUseBlockTypeDef#

# ToolUseBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolUseBlockTypeDef


def get_value() -> ToolUseBlockTypeDef:
    return {
        "toolUseId": ...,
    }


# ToolUseBlockTypeDef definition

class ToolUseBlockTypeDef(TypedDict):
    toolUseId: str,
    name: str,
    input: Mapping[str, Any],
    type: NotRequired[ToolUseTypeType],  # (1)
  1. See ToolUseTypeType

CountTokensResponseTypeDef#

# CountTokensResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import CountTokensResponseTypeDef


def get_value() -> CountTokensResponseTypeDef:
    return {
        "inputTokens": ...,
    }


# CountTokensResponseTypeDef definition

class CountTokensResponseTypeDef(TypedDict):
    inputTokens: int,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

InvokeModelResponseTypeDef#

# InvokeModelResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InvokeModelResponseTypeDef


def get_value() -> InvokeModelResponseTypeDef:
    return {
        "body": ...,
    }


# InvokeModelResponseTypeDef definition

class InvokeModelResponseTypeDef(TypedDict):
    body: botocore.response.StreamingBody,
    contentType: str,
    performanceConfigLatency: PerformanceConfigLatencyType,  # (1)
    serviceTier: ServiceTierTypeType,  # (2)
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
  1. See PerformanceConfigLatencyType
  2. See ServiceTierTypeType
  3. See ResponseMetadataTypeDef

StartAsyncInvokeResponseTypeDef#

# StartAsyncInvokeResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import StartAsyncInvokeResponseTypeDef


def get_value() -> StartAsyncInvokeResponseTypeDef:
    return {
        "invocationArn": ...,
    }


# StartAsyncInvokeResponseTypeDef definition

class StartAsyncInvokeResponseTypeDef(TypedDict):
    invocationArn: str,
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

AsyncInvokeOutputDataConfigTypeDef#

# AsyncInvokeOutputDataConfigTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import AsyncInvokeOutputDataConfigTypeDef


def get_value() -> AsyncInvokeOutputDataConfigTypeDef:
    return {
        "s3OutputDataConfig": ...,
    }


# AsyncInvokeOutputDataConfigTypeDef definition

class AsyncInvokeOutputDataConfigTypeDef(TypedDict):
    s3OutputDataConfig: NotRequired[AsyncInvokeS3OutputDataConfigTypeDef],  # (1)
  1. See AsyncInvokeS3OutputDataConfigTypeDef

AudioSourceOutputTypeDef#

# AudioSourceOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import AudioSourceOutputTypeDef


def get_value() -> AudioSourceOutputTypeDef:
    return {
        "bytes": ...,
    }


# AudioSourceOutputTypeDef definition

class AudioSourceOutputTypeDef(TypedDict):
    bytes: NotRequired[bytes],
    s3Location: NotRequired[S3LocationTypeDef],  # (1)
  1. See S3LocationTypeDef

ImageSourceOutputTypeDef#

# ImageSourceOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ImageSourceOutputTypeDef


def get_value() -> ImageSourceOutputTypeDef:
    return {
        "bytes": ...,
    }


# ImageSourceOutputTypeDef definition

class ImageSourceOutputTypeDef(TypedDict):
    bytes: NotRequired[bytes],
    s3Location: NotRequired[S3LocationTypeDef],  # (1)
  1. See S3LocationTypeDef

VideoSourceOutputTypeDef#

# VideoSourceOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import VideoSourceOutputTypeDef


def get_value() -> VideoSourceOutputTypeDef:
    return {
        "bytes": ...,
    }


# VideoSourceOutputTypeDef definition

class VideoSourceOutputTypeDef(TypedDict):
    bytes: NotRequired[bytes],
    s3Location: NotRequired[S3LocationTypeDef],  # (1)
  1. See S3LocationTypeDef

AudioSourceTypeDef#

# AudioSourceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import AudioSourceTypeDef


def get_value() -> AudioSourceTypeDef:
    return {
        "bytes": ...,
    }


# AudioSourceTypeDef definition

class AudioSourceTypeDef(TypedDict):
    bytes: NotRequired[BlobTypeDef],
    s3Location: NotRequired[S3LocationTypeDef],  # (1)
  1. See S3LocationTypeDef

BidirectionalInputPayloadPartTypeDef#

# BidirectionalInputPayloadPartTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import BidirectionalInputPayloadPartTypeDef


def get_value() -> BidirectionalInputPayloadPartTypeDef:
    return {
        "bytes": ...,
    }


# BidirectionalInputPayloadPartTypeDef definition

class BidirectionalInputPayloadPartTypeDef(TypedDict):
    bytes: NotRequired[BlobTypeDef],

GuardrailConverseImageSourceTypeDef#

# GuardrailConverseImageSourceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseImageSourceTypeDef


def get_value() -> GuardrailConverseImageSourceTypeDef:
    return {
        "bytes": ...,
    }


# GuardrailConverseImageSourceTypeDef definition

class GuardrailConverseImageSourceTypeDef(TypedDict):
    bytes: NotRequired[BlobTypeDef],

GuardrailImageSourceTypeDef#

# GuardrailImageSourceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailImageSourceTypeDef


def get_value() -> GuardrailImageSourceTypeDef:
    return {
        "bytes": ...,
    }


# GuardrailImageSourceTypeDef definition

class GuardrailImageSourceTypeDef(TypedDict):
    bytes: NotRequired[BlobTypeDef],

ImageSourceTypeDef#

# ImageSourceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ImageSourceTypeDef


def get_value() -> ImageSourceTypeDef:
    return {
        "bytes": ...,
    }


# ImageSourceTypeDef definition

class ImageSourceTypeDef(TypedDict):
    bytes: NotRequired[BlobTypeDef],
    s3Location: NotRequired[S3LocationTypeDef],  # (1)
  1. See S3LocationTypeDef

InvokeModelRequestTypeDef#

# InvokeModelRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InvokeModelRequestTypeDef


def get_value() -> InvokeModelRequestTypeDef:
    return {
        "modelId": ...,
    }


# InvokeModelRequestTypeDef definition

class InvokeModelRequestTypeDef(TypedDict):
    modelId: str,
    body: NotRequired[BlobTypeDef],
    contentType: NotRequired[str],
    accept: NotRequired[str],
    trace: NotRequired[TraceType],  # (1)
    guardrailIdentifier: NotRequired[str],
    guardrailVersion: NotRequired[str],
    performanceConfigLatency: NotRequired[PerformanceConfigLatencyType],  # (2)
    serviceTier: NotRequired[ServiceTierTypeType],  # (3)
  1. See TraceType
  2. See PerformanceConfigLatencyType
  3. See ServiceTierTypeType

InvokeModelTokensRequestTypeDef#

# InvokeModelTokensRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InvokeModelTokensRequestTypeDef


def get_value() -> InvokeModelTokensRequestTypeDef:
    return {
        "body": ...,
    }


# InvokeModelTokensRequestTypeDef definition

class InvokeModelTokensRequestTypeDef(TypedDict):
    body: BlobTypeDef,

InvokeModelWithResponseStreamRequestTypeDef#

# InvokeModelWithResponseStreamRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InvokeModelWithResponseStreamRequestTypeDef


def get_value() -> InvokeModelWithResponseStreamRequestTypeDef:
    return {
        "modelId": ...,
    }


# InvokeModelWithResponseStreamRequestTypeDef definition

class InvokeModelWithResponseStreamRequestTypeDef(TypedDict):
    modelId: str,
    body: NotRequired[BlobTypeDef],
    contentType: NotRequired[str],
    accept: NotRequired[str],
    trace: NotRequired[TraceType],  # (1)
    guardrailIdentifier: NotRequired[str],
    guardrailVersion: NotRequired[str],
    performanceConfigLatency: NotRequired[PerformanceConfigLatencyType],  # (2)
    serviceTier: NotRequired[ServiceTierTypeType],  # (3)
  1. See TraceType
  2. See PerformanceConfigLatencyType
  3. See ServiceTierTypeType

VideoSourceTypeDef#

# VideoSourceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import VideoSourceTypeDef


def get_value() -> VideoSourceTypeDef:
    return {
        "bytes": ...,
    }


# VideoSourceTypeDef definition

class VideoSourceTypeDef(TypedDict):
    bytes: NotRequired[BlobTypeDef],
    s3Location: NotRequired[S3LocationTypeDef],  # (1)
  1. See S3LocationTypeDef

TokenUsageTypeDef#

# TokenUsageTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import TokenUsageTypeDef


def get_value() -> TokenUsageTypeDef:
    return {
        "inputTokens": ...,
    }


# TokenUsageTypeDef definition

class TokenUsageTypeDef(TypedDict):
    inputTokens: int,
    outputTokens: int,
    totalTokens: int,
    cacheReadInputTokens: NotRequired[int],
    cacheWriteInputTokens: NotRequired[int],
    cacheDetails: NotRequired[list[CacheDetailTypeDef]],  # (1)
  1. See list[CacheDetailTypeDef]

CitationLocationTypeDef#

# CitationLocationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import CitationLocationTypeDef


def get_value() -> CitationLocationTypeDef:
    return {
        "web": ...,
    }


# CitationLocationTypeDef definition

class CitationLocationTypeDef(TypedDict):
    web: NotRequired[WebLocationTypeDef],  # (1)
    documentChar: NotRequired[DocumentCharLocationTypeDef],  # (2)
    documentPage: NotRequired[DocumentPageLocationTypeDef],  # (3)
    documentChunk: NotRequired[DocumentChunkLocationTypeDef],  # (4)
    searchResultLocation: NotRequired[SearchResultLocationTypeDef],  # (5)
  1. See WebLocationTypeDef
  2. See DocumentCharLocationTypeDef
  3. See DocumentPageLocationTypeDef
  4. See DocumentChunkLocationTypeDef
  5. See SearchResultLocationTypeDef

ContentBlockStartTypeDef#

# ContentBlockStartTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ContentBlockStartTypeDef


def get_value() -> ContentBlockStartTypeDef:
    return {
        "toolUse": ...,
    }


# ContentBlockStartTypeDef definition

class ContentBlockStartTypeDef(TypedDict):
    toolUse: NotRequired[ToolUseBlockStartTypeDef],  # (1)
    toolResult: NotRequired[ToolResultBlockStartTypeDef],  # (2)
    image: NotRequired[ImageBlockStartTypeDef],  # (3)
  1. See ToolUseBlockStartTypeDef
  2. See ToolResultBlockStartTypeDef
  3. See ImageBlockStartTypeDef

DocumentSourceOutputTypeDef#

# DocumentSourceOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import DocumentSourceOutputTypeDef


def get_value() -> DocumentSourceOutputTypeDef:
    return {
        "bytes": ...,
    }


# DocumentSourceOutputTypeDef definition

class DocumentSourceOutputTypeDef(TypedDict):
    bytes: NotRequired[bytes],
    s3Location: NotRequired[S3LocationTypeDef],  # (1)
    text: NotRequired[str],
    content: NotRequired[list[DocumentContentBlockTypeDef]],  # (2)
  1. See S3LocationTypeDef
  2. See list[DocumentContentBlockTypeDef]

DocumentSourceTypeDef#

# DocumentSourceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import DocumentSourceTypeDef


def get_value() -> DocumentSourceTypeDef:
    return {
        "bytes": ...,
    }


# DocumentSourceTypeDef definition

class DocumentSourceTypeDef(TypedDict):
    bytes: NotRequired[BlobTypeDef],
    s3Location: NotRequired[S3LocationTypeDef],  # (1)
    text: NotRequired[str],
    content: NotRequired[Sequence[DocumentContentBlockTypeDef]],  # (2)
  1. See S3LocationTypeDef
  2. See Sequence[DocumentContentBlockTypeDef]

GuardrailAutomatedReasoningLogicWarningTypeDef#

# GuardrailAutomatedReasoningLogicWarningTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailAutomatedReasoningLogicWarningTypeDef


def get_value() -> GuardrailAutomatedReasoningLogicWarningTypeDef:
    return {
        "type": ...,
    }


# GuardrailAutomatedReasoningLogicWarningTypeDef definition

class GuardrailAutomatedReasoningLogicWarningTypeDef(TypedDict):
    type: NotRequired[GuardrailAutomatedReasoningLogicWarningTypeType],  # (1)
    premises: NotRequired[list[GuardrailAutomatedReasoningStatementTypeDef]],  # (2)
    claims: NotRequired[list[GuardrailAutomatedReasoningStatementTypeDef]],  # (2)
  1. See GuardrailAutomatedReasoningLogicWarningTypeType
  2. See list[GuardrailAutomatedReasoningStatementTypeDef]
  3. See list[GuardrailAutomatedReasoningStatementTypeDef]

GuardrailAutomatedReasoningScenarioTypeDef#

# GuardrailAutomatedReasoningScenarioTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailAutomatedReasoningScenarioTypeDef


def get_value() -> GuardrailAutomatedReasoningScenarioTypeDef:
    return {
        "statements": ...,
    }


# GuardrailAutomatedReasoningScenarioTypeDef definition

class GuardrailAutomatedReasoningScenarioTypeDef(TypedDict):
    statements: NotRequired[list[GuardrailAutomatedReasoningStatementTypeDef]],  # (1)
  1. See list[GuardrailAutomatedReasoningStatementTypeDef]

GuardrailAutomatedReasoningTranslationTypeDef#

# GuardrailAutomatedReasoningTranslationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailAutomatedReasoningTranslationTypeDef


def get_value() -> GuardrailAutomatedReasoningTranslationTypeDef:
    return {
        "premises": ...,
    }


# GuardrailAutomatedReasoningTranslationTypeDef definition

class GuardrailAutomatedReasoningTranslationTypeDef(TypedDict):
    premises: NotRequired[list[GuardrailAutomatedReasoningStatementTypeDef]],  # (1)
    claims: NotRequired[list[GuardrailAutomatedReasoningStatementTypeDef]],  # (1)
    untranslatedPremises: NotRequired[list[GuardrailAutomatedReasoningInputTextReferenceTypeDef]],  # (3)
    untranslatedClaims: NotRequired[list[GuardrailAutomatedReasoningInputTextReferenceTypeDef]],  # (3)
    confidence: NotRequired[float],
  1. See list[GuardrailAutomatedReasoningStatementTypeDef]
  2. See list[GuardrailAutomatedReasoningStatementTypeDef]
  3. See list[GuardrailAutomatedReasoningInputTextReferenceTypeDef]
  4. See list[GuardrailAutomatedReasoningInputTextReferenceTypeDef]

GuardrailContentPolicyAssessmentTypeDef#

# GuardrailContentPolicyAssessmentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailContentPolicyAssessmentTypeDef


def get_value() -> GuardrailContentPolicyAssessmentTypeDef:
    return {
        "filters": ...,
    }


# GuardrailContentPolicyAssessmentTypeDef definition

class GuardrailContentPolicyAssessmentTypeDef(TypedDict):
    filters: list[GuardrailContentFilterTypeDef],  # (1)
  1. See list[GuardrailContentFilterTypeDef]

GuardrailContextualGroundingPolicyAssessmentTypeDef#

# GuardrailContextualGroundingPolicyAssessmentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailContextualGroundingPolicyAssessmentTypeDef


def get_value() -> GuardrailContextualGroundingPolicyAssessmentTypeDef:
    return {
        "filters": ...,
    }


# GuardrailContextualGroundingPolicyAssessmentTypeDef definition

class GuardrailContextualGroundingPolicyAssessmentTypeDef(TypedDict):
    filters: NotRequired[list[GuardrailContextualGroundingFilterTypeDef]],  # (1)
  1. See list[GuardrailContextualGroundingFilterTypeDef]

GuardrailConverseImageBlockOutputTypeDef#

# GuardrailConverseImageBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseImageBlockOutputTypeDef


def get_value() -> GuardrailConverseImageBlockOutputTypeDef:
    return {
        "format": ...,
    }


# GuardrailConverseImageBlockOutputTypeDef definition

class GuardrailConverseImageBlockOutputTypeDef(TypedDict):
    format: GuardrailConverseImageFormatType,  # (1)
    source: GuardrailConverseImageSourceOutputTypeDef,  # (2)
  1. See GuardrailConverseImageFormatType
  2. See GuardrailConverseImageSourceOutputTypeDef

GuardrailCoverageTypeDef#

# GuardrailCoverageTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailCoverageTypeDef


def get_value() -> GuardrailCoverageTypeDef:
    return {
        "textCharacters": ...,
    }


# GuardrailCoverageTypeDef definition

class GuardrailCoverageTypeDef(TypedDict):
    textCharacters: NotRequired[GuardrailTextCharactersCoverageTypeDef],  # (1)
    images: NotRequired[GuardrailImageCoverageTypeDef],  # (2)
  1. See GuardrailTextCharactersCoverageTypeDef
  2. See GuardrailImageCoverageTypeDef

GuardrailWordPolicyAssessmentTypeDef#

# GuardrailWordPolicyAssessmentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailWordPolicyAssessmentTypeDef


def get_value() -> GuardrailWordPolicyAssessmentTypeDef:
    return {
        "customWords": ...,
    }


# GuardrailWordPolicyAssessmentTypeDef definition

class GuardrailWordPolicyAssessmentTypeDef(TypedDict):
    customWords: list[GuardrailCustomWordTypeDef],  # (1)
    managedWordLists: list[GuardrailManagedWordTypeDef],  # (2)
  1. See list[GuardrailCustomWordTypeDef]
  2. See list[GuardrailManagedWordTypeDef]

GuardrailSensitiveInformationPolicyAssessmentTypeDef#

# GuardrailSensitiveInformationPolicyAssessmentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailSensitiveInformationPolicyAssessmentTypeDef


def get_value() -> GuardrailSensitiveInformationPolicyAssessmentTypeDef:
    return {
        "piiEntities": ...,
    }


# GuardrailSensitiveInformationPolicyAssessmentTypeDef definition

class GuardrailSensitiveInformationPolicyAssessmentTypeDef(TypedDict):
    piiEntities: list[GuardrailPiiEntityFilterTypeDef],  # (1)
    regexes: list[GuardrailRegexFilterTypeDef],  # (2)
  1. See list[GuardrailPiiEntityFilterTypeDef]
  2. See list[GuardrailRegexFilterTypeDef]

GuardrailTopicPolicyAssessmentTypeDef#

# GuardrailTopicPolicyAssessmentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailTopicPolicyAssessmentTypeDef


def get_value() -> GuardrailTopicPolicyAssessmentTypeDef:
    return {
        "topics": ...,
    }


# GuardrailTopicPolicyAssessmentTypeDef definition

class GuardrailTopicPolicyAssessmentTypeDef(TypedDict):
    topics: list[GuardrailTopicTypeDef],  # (1)
  1. See list[GuardrailTopicTypeDef]

InvokeModelWithBidirectionalStreamOutputTypeDef#

# InvokeModelWithBidirectionalStreamOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InvokeModelWithBidirectionalStreamOutputTypeDef


def get_value() -> InvokeModelWithBidirectionalStreamOutputTypeDef:
    return {
        "chunk": ...,
    }


# InvokeModelWithBidirectionalStreamOutputTypeDef definition

class InvokeModelWithBidirectionalStreamOutputTypeDef(TypedDict):
    chunk: NotRequired[BidirectionalOutputPayloadPartTypeDef],  # (1)
    internalServerException: NotRequired[InternalServerExceptionTypeDef],  # (2)
    modelStreamErrorException: NotRequired[ModelStreamErrorExceptionTypeDef],  # (3)
    validationException: NotRequired[ValidationExceptionTypeDef],  # (4)
    throttlingException: NotRequired[ThrottlingExceptionTypeDef],  # (5)
    modelTimeoutException: NotRequired[ModelTimeoutExceptionTypeDef],  # (6)
    serviceUnavailableException: NotRequired[ServiceUnavailableExceptionTypeDef],  # (7)
  1. See BidirectionalOutputPayloadPartTypeDef
  2. See InternalServerExceptionTypeDef
  3. See ModelStreamErrorExceptionTypeDef
  4. See ValidationExceptionTypeDef
  5. See ThrottlingExceptionTypeDef
  6. See ModelTimeoutExceptionTypeDef
  7. See ServiceUnavailableExceptionTypeDef

OutputFormatStructureTypeDef#

# OutputFormatStructureTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import OutputFormatStructureTypeDef


def get_value() -> OutputFormatStructureTypeDef:
    return {
        "jsonSchema": ...,
    }


# OutputFormatStructureTypeDef definition

class OutputFormatStructureTypeDef(TypedDict):
    jsonSchema: NotRequired[JsonSchemaDefinitionTypeDef],  # (1)
  1. See JsonSchemaDefinitionTypeDef

ListAsyncInvokesRequestPaginateTypeDef#

# ListAsyncInvokesRequestPaginateTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ListAsyncInvokesRequestPaginateTypeDef


def get_value() -> ListAsyncInvokesRequestPaginateTypeDef:
    return {
        "submitTimeAfter": ...,
    }


# ListAsyncInvokesRequestPaginateTypeDef definition

class ListAsyncInvokesRequestPaginateTypeDef(TypedDict):
    submitTimeAfter: NotRequired[TimestampTypeDef],
    submitTimeBefore: NotRequired[TimestampTypeDef],
    statusEquals: NotRequired[AsyncInvokeStatusType],  # (1)
    sortBy: NotRequired[SortAsyncInvocationByType],  # (2)
    sortOrder: NotRequired[SortOrderType],  # (3)
    PaginationConfig: NotRequired[PaginatorConfigTypeDef],  # (4)
  1. See AsyncInvokeStatusType
  2. See SortAsyncInvocationByType
  3. See SortOrderType
  4. See PaginatorConfigTypeDef

ListAsyncInvokesRequestTypeDef#

# ListAsyncInvokesRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ListAsyncInvokesRequestTypeDef


def get_value() -> ListAsyncInvokesRequestTypeDef:
    return {
        "submitTimeAfter": ...,
    }


# ListAsyncInvokesRequestTypeDef definition

class ListAsyncInvokesRequestTypeDef(TypedDict):
    submitTimeAfter: NotRequired[TimestampTypeDef],
    submitTimeBefore: NotRequired[TimestampTypeDef],
    statusEquals: NotRequired[AsyncInvokeStatusType],  # (1)
    maxResults: NotRequired[int],
    nextToken: NotRequired[str],
    sortBy: NotRequired[SortAsyncInvocationByType],  # (2)
    sortOrder: NotRequired[SortOrderType],  # (3)
  1. See AsyncInvokeStatusType
  2. See SortAsyncInvocationByType
  3. See SortOrderType

ResponseStreamTypeDef#

# ResponseStreamTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ResponseStreamTypeDef


def get_value() -> ResponseStreamTypeDef:
    return {
        "chunk": ...,
    }


# ResponseStreamTypeDef definition

class ResponseStreamTypeDef(TypedDict):
    chunk: NotRequired[PayloadPartTypeDef],  # (1)
    internalServerException: NotRequired[InternalServerExceptionTypeDef],  # (2)
    modelStreamErrorException: NotRequired[ModelStreamErrorExceptionTypeDef],  # (3)
    validationException: NotRequired[ValidationExceptionTypeDef],  # (4)
    throttlingException: NotRequired[ThrottlingExceptionTypeDef],  # (5)
    modelTimeoutException: NotRequired[ModelTimeoutExceptionTypeDef],  # (6)
    serviceUnavailableException: NotRequired[ServiceUnavailableExceptionTypeDef],  # (7)
  1. See PayloadPartTypeDef
  2. See InternalServerExceptionTypeDef
  3. See ModelStreamErrorExceptionTypeDef
  4. See ValidationExceptionTypeDef
  5. See ThrottlingExceptionTypeDef
  6. See ModelTimeoutExceptionTypeDef
  7. See ServiceUnavailableExceptionTypeDef

ReasoningContentBlockOutputTypeDef#

# ReasoningContentBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ReasoningContentBlockOutputTypeDef


def get_value() -> ReasoningContentBlockOutputTypeDef:
    return {
        "reasoningText": ...,
    }


# ReasoningContentBlockOutputTypeDef definition

class ReasoningContentBlockOutputTypeDef(TypedDict):
    reasoningText: NotRequired[ReasoningTextBlockTypeDef],  # (1)
    redactedContent: NotRequired[bytes],
  1. See ReasoningTextBlockTypeDef

ReasoningContentBlockTypeDef#

# ReasoningContentBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ReasoningContentBlockTypeDef


def get_value() -> ReasoningContentBlockTypeDef:
    return {
        "reasoningText": ...,
    }


# ReasoningContentBlockTypeDef definition

class ReasoningContentBlockTypeDef(TypedDict):
    reasoningText: NotRequired[ReasoningTextBlockTypeDef],  # (1)
    redactedContent: NotRequired[BlobTypeDef],
  1. See ReasoningTextBlockTypeDef

SearchResultBlockOutputTypeDef#

# SearchResultBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import SearchResultBlockOutputTypeDef


def get_value() -> SearchResultBlockOutputTypeDef:
    return {
        "source": ...,
    }


# SearchResultBlockOutputTypeDef definition

class SearchResultBlockOutputTypeDef(TypedDict):
    source: str,
    title: str,
    content: list[SearchResultContentBlockTypeDef],  # (1)
    citations: NotRequired[CitationsConfigTypeDef],  # (2)
  1. See list[SearchResultContentBlockTypeDef]
  2. See CitationsConfigTypeDef

SearchResultBlockTypeDef#

# SearchResultBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import SearchResultBlockTypeDef


def get_value() -> SearchResultBlockTypeDef:
    return {
        "source": ...,
    }


# SearchResultBlockTypeDef definition

class SearchResultBlockTypeDef(TypedDict):
    source: str,
    title: str,
    content: Sequence[SearchResultContentBlockTypeDef],  # (1)
    citations: NotRequired[CitationsConfigTypeDef],  # (2)
  1. See Sequence[SearchResultContentBlockTypeDef]
  2. See CitationsConfigTypeDef

ToolChoiceTypeDef#

# ToolChoiceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolChoiceTypeDef


def get_value() -> ToolChoiceTypeDef:
    return {
        "auto": ...,
    }


# ToolChoiceTypeDef definition

class ToolChoiceTypeDef(TypedDict):
    auto: NotRequired[Mapping[str, Any]],
    any: NotRequired[Mapping[str, Any]],
    tool: NotRequired[SpecificToolChoiceTypeDef],  # (1)
  1. See SpecificToolChoiceTypeDef

ToolSpecificationTypeDef#

# ToolSpecificationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolSpecificationTypeDef


def get_value() -> ToolSpecificationTypeDef:
    return {
        "name": ...,
    }


# ToolSpecificationTypeDef definition

class ToolSpecificationTypeDef(TypedDict):
    name: str,
    inputSchema: ToolInputSchemaTypeDef,  # (1)
    description: NotRequired[str],
    strict: NotRequired[bool],
  1. See ToolInputSchemaTypeDef

AsyncInvokeSummaryTypeDef#

# AsyncInvokeSummaryTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import AsyncInvokeSummaryTypeDef


def get_value() -> AsyncInvokeSummaryTypeDef:
    return {
        "invocationArn": ...,
    }


# AsyncInvokeSummaryTypeDef definition

class AsyncInvokeSummaryTypeDef(TypedDict):
    invocationArn: str,
    modelArn: str,
    submitTime: datetime.datetime,
    outputDataConfig: AsyncInvokeOutputDataConfigTypeDef,  # (2)
    clientRequestToken: NotRequired[str],
    status: NotRequired[AsyncInvokeStatusType],  # (1)
    failureMessage: NotRequired[str],
    lastModifiedTime: NotRequired[datetime.datetime],
    endTime: NotRequired[datetime.datetime],
  1. See AsyncInvokeStatusType
  2. See AsyncInvokeOutputDataConfigTypeDef

GetAsyncInvokeResponseTypeDef#

# GetAsyncInvokeResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GetAsyncInvokeResponseTypeDef


def get_value() -> GetAsyncInvokeResponseTypeDef:
    return {
        "invocationArn": ...,
    }


# GetAsyncInvokeResponseTypeDef definition

class GetAsyncInvokeResponseTypeDef(TypedDict):
    invocationArn: str,
    modelArn: str,
    clientRequestToken: str,
    status: AsyncInvokeStatusType,  # (1)
    failureMessage: str,
    submitTime: datetime.datetime,
    lastModifiedTime: datetime.datetime,
    endTime: datetime.datetime,
    outputDataConfig: AsyncInvokeOutputDataConfigTypeDef,  # (2)
    ResponseMetadata: ResponseMetadataTypeDef,  # (3)
  1. See AsyncInvokeStatusType
  2. See AsyncInvokeOutputDataConfigTypeDef
  3. See ResponseMetadataTypeDef

StartAsyncInvokeRequestTypeDef#

# StartAsyncInvokeRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import StartAsyncInvokeRequestTypeDef


def get_value() -> StartAsyncInvokeRequestTypeDef:
    return {
        "modelId": ...,
    }


# StartAsyncInvokeRequestTypeDef definition

class StartAsyncInvokeRequestTypeDef(TypedDict):
    modelId: str,
    modelInput: Mapping[str, Any],
    outputDataConfig: AsyncInvokeOutputDataConfigTypeDef,  # (1)
    clientRequestToken: NotRequired[str],
    tags: NotRequired[Sequence[TagTypeDef]],  # (2)
  1. See AsyncInvokeOutputDataConfigTypeDef
  2. See Sequence[TagTypeDef]

AudioBlockOutputTypeDef#

# AudioBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import AudioBlockOutputTypeDef


def get_value() -> AudioBlockOutputTypeDef:
    return {
        "format": ...,
    }


# AudioBlockOutputTypeDef definition

class AudioBlockOutputTypeDef(TypedDict):
    format: AudioFormatType,  # (1)
    source: AudioSourceOutputTypeDef,  # (2)
    error: NotRequired[ErrorBlockTypeDef],  # (3)
  1. See AudioFormatType
  2. See AudioSourceOutputTypeDef
  3. See ErrorBlockTypeDef

ImageBlockDeltaTypeDef#

# ImageBlockDeltaTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ImageBlockDeltaTypeDef


def get_value() -> ImageBlockDeltaTypeDef:
    return {
        "source": ...,
    }


# ImageBlockDeltaTypeDef definition

class ImageBlockDeltaTypeDef(TypedDict):
    source: NotRequired[ImageSourceOutputTypeDef],  # (1)
    error: NotRequired[ErrorBlockTypeDef],  # (2)
  1. See ImageSourceOutputTypeDef
  2. See ErrorBlockTypeDef

ImageBlockOutputTypeDef#

# ImageBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ImageBlockOutputTypeDef


def get_value() -> ImageBlockOutputTypeDef:
    return {
        "format": ...,
    }


# ImageBlockOutputTypeDef definition

class ImageBlockOutputTypeDef(TypedDict):
    format: ImageFormatType,  # (1)
    source: ImageSourceOutputTypeDef,  # (2)
    error: NotRequired[ErrorBlockTypeDef],  # (3)
  1. See ImageFormatType
  2. See ImageSourceOutputTypeDef
  3. See ErrorBlockTypeDef

VideoBlockOutputTypeDef#

# VideoBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import VideoBlockOutputTypeDef


def get_value() -> VideoBlockOutputTypeDef:
    return {
        "format": ...,
    }


# VideoBlockOutputTypeDef definition

class VideoBlockOutputTypeDef(TypedDict):
    format: VideoFormatType,  # (1)
    source: VideoSourceOutputTypeDef,  # (2)
  1. See VideoFormatType
  2. See VideoSourceOutputTypeDef

InvokeModelWithBidirectionalStreamInputTypeDef#

# InvokeModelWithBidirectionalStreamInputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InvokeModelWithBidirectionalStreamInputTypeDef


def get_value() -> InvokeModelWithBidirectionalStreamInputTypeDef:
    return {
        "chunk": ...,
    }


# InvokeModelWithBidirectionalStreamInputTypeDef definition

class InvokeModelWithBidirectionalStreamInputTypeDef(TypedDict):
    chunk: NotRequired[BidirectionalInputPayloadPartTypeDef],  # (1)
  1. See BidirectionalInputPayloadPartTypeDef

GuardrailImageBlockTypeDef#

# GuardrailImageBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailImageBlockTypeDef


def get_value() -> GuardrailImageBlockTypeDef:
    return {
        "format": ...,
    }


# GuardrailImageBlockTypeDef definition

class GuardrailImageBlockTypeDef(TypedDict):
    format: GuardrailImageFormatType,  # (1)
    source: GuardrailImageSourceTypeDef,  # (2)
  1. See GuardrailImageFormatType
  2. See GuardrailImageSourceTypeDef

CitationOutputTypeDef#

# CitationOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import CitationOutputTypeDef


def get_value() -> CitationOutputTypeDef:
    return {
        "title": ...,
    }


# CitationOutputTypeDef definition

class CitationOutputTypeDef(TypedDict):
    title: NotRequired[str],
    source: NotRequired[str],
    sourceContent: NotRequired[list[CitationSourceContentTypeDef]],  # (1)
    location: NotRequired[CitationLocationTypeDef],  # (2)
  1. See list[CitationSourceContentTypeDef]
  2. See CitationLocationTypeDef

CitationTypeDef#

# CitationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import CitationTypeDef


def get_value() -> CitationTypeDef:
    return {
        "title": ...,
    }


# CitationTypeDef definition

class CitationTypeDef(TypedDict):
    title: NotRequired[str],
    source: NotRequired[str],
    sourceContent: NotRequired[Sequence[CitationSourceContentTypeDef]],  # (1)
    location: NotRequired[CitationLocationTypeDef],  # (2)
  1. See Sequence[CitationSourceContentTypeDef]
  2. See CitationLocationTypeDef

CitationsDeltaTypeDef#

# CitationsDeltaTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import CitationsDeltaTypeDef


def get_value() -> CitationsDeltaTypeDef:
    return {
        "title": ...,
    }


# CitationsDeltaTypeDef definition

class CitationsDeltaTypeDef(TypedDict):
    title: NotRequired[str],
    source: NotRequired[str],
    sourceContent: NotRequired[list[CitationSourceContentDeltaTypeDef]],  # (1)
    location: NotRequired[CitationLocationTypeDef],  # (2)
  1. See list[CitationSourceContentDeltaTypeDef]
  2. See CitationLocationTypeDef

ContentBlockStartEventTypeDef#

# ContentBlockStartEventTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ContentBlockStartEventTypeDef


def get_value() -> ContentBlockStartEventTypeDef:
    return {
        "start": ...,
    }


# ContentBlockStartEventTypeDef definition

class ContentBlockStartEventTypeDef(TypedDict):
    start: ContentBlockStartTypeDef,  # (1)
    contentBlockIndex: int,
  1. See ContentBlockStartTypeDef

DocumentBlockOutputTypeDef#

# DocumentBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import DocumentBlockOutputTypeDef


def get_value() -> DocumentBlockOutputTypeDef:
    return {
        "format": ...,
    }


# DocumentBlockOutputTypeDef definition

class DocumentBlockOutputTypeDef(TypedDict):
    name: str,
    source: DocumentSourceOutputTypeDef,  # (2)
    format: NotRequired[DocumentFormatType],  # (1)
    context: NotRequired[str],
    citations: NotRequired[CitationsConfigTypeDef],  # (3)
  1. See DocumentFormatType
  2. See DocumentSourceOutputTypeDef
  3. See CitationsConfigTypeDef

GuardrailAutomatedReasoningImpossibleFindingTypeDef#

# GuardrailAutomatedReasoningImpossibleFindingTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailAutomatedReasoningImpossibleFindingTypeDef


def get_value() -> GuardrailAutomatedReasoningImpossibleFindingTypeDef:
    return {
        "translation": ...,
    }


# GuardrailAutomatedReasoningImpossibleFindingTypeDef definition

class GuardrailAutomatedReasoningImpossibleFindingTypeDef(TypedDict):
    translation: NotRequired[GuardrailAutomatedReasoningTranslationTypeDef],  # (1)
    contradictingRules: NotRequired[list[GuardrailAutomatedReasoningRuleTypeDef]],  # (2)
    logicWarning: NotRequired[GuardrailAutomatedReasoningLogicWarningTypeDef],  # (3)
  1. See GuardrailAutomatedReasoningTranslationTypeDef
  2. See list[GuardrailAutomatedReasoningRuleTypeDef]
  3. See GuardrailAutomatedReasoningLogicWarningTypeDef

GuardrailAutomatedReasoningInvalidFindingTypeDef#

# GuardrailAutomatedReasoningInvalidFindingTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailAutomatedReasoningInvalidFindingTypeDef


def get_value() -> GuardrailAutomatedReasoningInvalidFindingTypeDef:
    return {
        "translation": ...,
    }


# GuardrailAutomatedReasoningInvalidFindingTypeDef definition

class GuardrailAutomatedReasoningInvalidFindingTypeDef(TypedDict):
    translation: NotRequired[GuardrailAutomatedReasoningTranslationTypeDef],  # (1)
    contradictingRules: NotRequired[list[GuardrailAutomatedReasoningRuleTypeDef]],  # (2)
    logicWarning: NotRequired[GuardrailAutomatedReasoningLogicWarningTypeDef],  # (3)
  1. See GuardrailAutomatedReasoningTranslationTypeDef
  2. See list[GuardrailAutomatedReasoningRuleTypeDef]
  3. See GuardrailAutomatedReasoningLogicWarningTypeDef

GuardrailAutomatedReasoningSatisfiableFindingTypeDef#

# GuardrailAutomatedReasoningSatisfiableFindingTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailAutomatedReasoningSatisfiableFindingTypeDef


def get_value() -> GuardrailAutomatedReasoningSatisfiableFindingTypeDef:
    return {
        "translation": ...,
    }


# GuardrailAutomatedReasoningSatisfiableFindingTypeDef definition

class GuardrailAutomatedReasoningSatisfiableFindingTypeDef(TypedDict):
    translation: NotRequired[GuardrailAutomatedReasoningTranslationTypeDef],  # (1)
    claimsTrueScenario: NotRequired[GuardrailAutomatedReasoningScenarioTypeDef],  # (2)
    claimsFalseScenario: NotRequired[GuardrailAutomatedReasoningScenarioTypeDef],  # (2)
    logicWarning: NotRequired[GuardrailAutomatedReasoningLogicWarningTypeDef],  # (4)
  1. See GuardrailAutomatedReasoningTranslationTypeDef
  2. See GuardrailAutomatedReasoningScenarioTypeDef
  3. See GuardrailAutomatedReasoningScenarioTypeDef
  4. See GuardrailAutomatedReasoningLogicWarningTypeDef

GuardrailAutomatedReasoningTranslationOptionTypeDef#

# GuardrailAutomatedReasoningTranslationOptionTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailAutomatedReasoningTranslationOptionTypeDef


def get_value() -> GuardrailAutomatedReasoningTranslationOptionTypeDef:
    return {
        "translations": ...,
    }


# GuardrailAutomatedReasoningTranslationOptionTypeDef definition

class GuardrailAutomatedReasoningTranslationOptionTypeDef(TypedDict):
    translations: NotRequired[list[GuardrailAutomatedReasoningTranslationTypeDef]],  # (1)
  1. See list[GuardrailAutomatedReasoningTranslationTypeDef]

GuardrailAutomatedReasoningValidFindingTypeDef#

# GuardrailAutomatedReasoningValidFindingTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailAutomatedReasoningValidFindingTypeDef


def get_value() -> GuardrailAutomatedReasoningValidFindingTypeDef:
    return {
        "translation": ...,
    }


# GuardrailAutomatedReasoningValidFindingTypeDef definition

class GuardrailAutomatedReasoningValidFindingTypeDef(TypedDict):
    translation: NotRequired[GuardrailAutomatedReasoningTranslationTypeDef],  # (1)
    claimsTrueScenario: NotRequired[GuardrailAutomatedReasoningScenarioTypeDef],  # (2)
    supportingRules: NotRequired[list[GuardrailAutomatedReasoningRuleTypeDef]],  # (3)
    logicWarning: NotRequired[GuardrailAutomatedReasoningLogicWarningTypeDef],  # (4)
  1. See GuardrailAutomatedReasoningTranslationTypeDef
  2. See GuardrailAutomatedReasoningScenarioTypeDef
  3. See list[GuardrailAutomatedReasoningRuleTypeDef]
  4. See GuardrailAutomatedReasoningLogicWarningTypeDef

GuardrailConverseContentBlockOutputTypeDef#

# GuardrailConverseContentBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseContentBlockOutputTypeDef


def get_value() -> GuardrailConverseContentBlockOutputTypeDef:
    return {
        "text": ...,
    }


# GuardrailConverseContentBlockOutputTypeDef definition

class GuardrailConverseContentBlockOutputTypeDef(TypedDict):
    text: NotRequired[GuardrailConverseTextBlockOutputTypeDef],  # (1)
    image: NotRequired[GuardrailConverseImageBlockOutputTypeDef],  # (2)
  1. See GuardrailConverseTextBlockOutputTypeDef
  2. See GuardrailConverseImageBlockOutputTypeDef

GuardrailInvocationMetricsTypeDef#

# GuardrailInvocationMetricsTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailInvocationMetricsTypeDef


def get_value() -> GuardrailInvocationMetricsTypeDef:
    return {
        "guardrailProcessingLatency": ...,
    }


# GuardrailInvocationMetricsTypeDef definition

class GuardrailInvocationMetricsTypeDef(TypedDict):
    guardrailProcessingLatency: NotRequired[int],
    usage: NotRequired[GuardrailUsageTypeDef],  # (1)
    guardrailCoverage: NotRequired[GuardrailCoverageTypeDef],  # (2)
  1. See GuardrailUsageTypeDef
  2. See GuardrailCoverageTypeDef

InvokeModelWithBidirectionalStreamResponseTypeDef#

# InvokeModelWithBidirectionalStreamResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InvokeModelWithBidirectionalStreamResponseTypeDef


def get_value() -> InvokeModelWithBidirectionalStreamResponseTypeDef:
    return {
        "body": ...,
    }


# InvokeModelWithBidirectionalStreamResponseTypeDef definition

class InvokeModelWithBidirectionalStreamResponseTypeDef(TypedDict):
    body: botocore.eventstream.EventStream[InvokeModelWithBidirectionalStreamOutputTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See EventStream[InvokeModelWithBidirectionalStreamOutputTypeDef]
  2. See ResponseMetadataTypeDef

OutputFormatTypeDef#

# OutputFormatTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import OutputFormatTypeDef


def get_value() -> OutputFormatTypeDef:
    return {
        "type": ...,
    }


# OutputFormatTypeDef definition

class OutputFormatTypeDef(TypedDict):
    type: OutputFormatTypeType,  # (1)
    structure: OutputFormatStructureTypeDef,  # (2)
  1. See OutputFormatTypeType
  2. See OutputFormatStructureTypeDef

InvokeModelWithResponseStreamResponseTypeDef#

# InvokeModelWithResponseStreamResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InvokeModelWithResponseStreamResponseTypeDef


def get_value() -> InvokeModelWithResponseStreamResponseTypeDef:
    return {
        "body": ...,
    }


# InvokeModelWithResponseStreamResponseTypeDef definition

class InvokeModelWithResponseStreamResponseTypeDef(TypedDict):
    body: botocore.eventstream.EventStream[ResponseStreamTypeDef],  # (1)
    contentType: str,
    performanceConfigLatency: PerformanceConfigLatencyType,  # (2)
    serviceTier: ServiceTierTypeType,  # (3)
    ResponseMetadata: ResponseMetadataTypeDef,  # (4)
  1. See EventStream[ResponseStreamTypeDef]
  2. See PerformanceConfigLatencyType
  3. See ServiceTierTypeType
  4. See ResponseMetadataTypeDef

ToolTypeDef#

# ToolTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolTypeDef


def get_value() -> ToolTypeDef:
    return {
        "toolSpec": ...,
    }


# ToolTypeDef definition

class ToolTypeDef(TypedDict):
    toolSpec: NotRequired[ToolSpecificationTypeDef],  # (1)
    systemTool: NotRequired[SystemToolTypeDef],  # (2)
    cachePoint: NotRequired[CachePointBlockTypeDef],  # (3)
  1. See ToolSpecificationTypeDef
  2. See SystemToolTypeDef
  3. See CachePointBlockTypeDef

ListAsyncInvokesResponseTypeDef#

# ListAsyncInvokesResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ListAsyncInvokesResponseTypeDef


def get_value() -> ListAsyncInvokesResponseTypeDef:
    return {
        "nextToken": ...,
    }


# ListAsyncInvokesResponseTypeDef definition

class ListAsyncInvokesResponseTypeDef(TypedDict):
    asyncInvokeSummaries: list[AsyncInvokeSummaryTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
    nextToken: NotRequired[str],
  1. See list[AsyncInvokeSummaryTypeDef]
  2. See ResponseMetadataTypeDef

AudioBlockTypeDef#

# AudioBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import AudioBlockTypeDef


def get_value() -> AudioBlockTypeDef:
    return {
        "format": ...,
    }


# AudioBlockTypeDef definition

class AudioBlockTypeDef(TypedDict):
    format: AudioFormatType,  # (1)
    source: AudioSourceUnionTypeDef,  # (2)
    error: NotRequired[ErrorBlockTypeDef],  # (3)
  1. See AudioFormatType
  2. See AudioSourceUnionTypeDef
  3. See ErrorBlockTypeDef

InvokeModelWithBidirectionalStreamRequestTypeDef#

# InvokeModelWithBidirectionalStreamRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import InvokeModelWithBidirectionalStreamRequestTypeDef


def get_value() -> InvokeModelWithBidirectionalStreamRequestTypeDef:
    return {
        "modelId": ...,
    }


# InvokeModelWithBidirectionalStreamRequestTypeDef definition

class InvokeModelWithBidirectionalStreamRequestTypeDef(TypedDict):
    modelId: str,
    body: botocore.eventstream.EventStream[InvokeModelWithBidirectionalStreamInputTypeDef],  # (1)
  1. See EventStream[InvokeModelWithBidirectionalStreamInputTypeDef]

GuardrailConverseImageBlockTypeDef#

# GuardrailConverseImageBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseImageBlockTypeDef


def get_value() -> GuardrailConverseImageBlockTypeDef:
    return {
        "format": ...,
    }


# GuardrailConverseImageBlockTypeDef definition

class GuardrailConverseImageBlockTypeDef(TypedDict):
    format: GuardrailConverseImageFormatType,  # (1)
    source: GuardrailConverseImageSourceUnionTypeDef,  # (2)
  1. See GuardrailConverseImageFormatType
  2. See GuardrailConverseImageSourceUnionTypeDef

GuardrailContentBlockTypeDef#

# GuardrailContentBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailContentBlockTypeDef


def get_value() -> GuardrailContentBlockTypeDef:
    return {
        "text": ...,
    }


# GuardrailContentBlockTypeDef definition

class GuardrailContentBlockTypeDef(TypedDict):
    text: NotRequired[GuardrailTextBlockTypeDef],  # (1)
    image: NotRequired[GuardrailImageBlockTypeDef],  # (2)
  1. See GuardrailTextBlockTypeDef
  2. See GuardrailImageBlockTypeDef

ImageBlockTypeDef#

# ImageBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ImageBlockTypeDef


def get_value() -> ImageBlockTypeDef:
    return {
        "format": ...,
    }


# ImageBlockTypeDef definition

class ImageBlockTypeDef(TypedDict):
    format: ImageFormatType,  # (1)
    source: ImageSourceUnionTypeDef,  # (2)
    error: NotRequired[ErrorBlockTypeDef],  # (3)
  1. See ImageFormatType
  2. See ImageSourceUnionTypeDef
  3. See ErrorBlockTypeDef

VideoBlockTypeDef#

# VideoBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import VideoBlockTypeDef


def get_value() -> VideoBlockTypeDef:
    return {
        "format": ...,
    }


# VideoBlockTypeDef definition

class VideoBlockTypeDef(TypedDict):
    format: VideoFormatType,  # (1)
    source: VideoSourceUnionTypeDef,  # (2)
  1. See VideoFormatType
  2. See VideoSourceUnionTypeDef

CitationsContentBlockOutputTypeDef#

# CitationsContentBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import CitationsContentBlockOutputTypeDef


def get_value() -> CitationsContentBlockOutputTypeDef:
    return {
        "content": ...,
    }


# CitationsContentBlockOutputTypeDef definition

class CitationsContentBlockOutputTypeDef(TypedDict):
    content: NotRequired[list[CitationGeneratedContentTypeDef]],  # (1)
    citations: NotRequired[list[CitationOutputTypeDef]],  # (2)
  1. See list[CitationGeneratedContentTypeDef]
  2. See list[CitationOutputTypeDef]

ContentBlockDeltaTypeDef#

# ContentBlockDeltaTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ContentBlockDeltaTypeDef


def get_value() -> ContentBlockDeltaTypeDef:
    return {
        "text": ...,
    }


# ContentBlockDeltaTypeDef definition

class ContentBlockDeltaTypeDef(TypedDict):
    text: NotRequired[str],
    toolUse: NotRequired[ToolUseBlockDeltaTypeDef],  # (1)
    toolResult: NotRequired[list[ToolResultBlockDeltaTypeDef]],  # (2)
    reasoningContent: NotRequired[ReasoningContentBlockDeltaTypeDef],  # (3)
    citation: NotRequired[CitationsDeltaTypeDef],  # (4)
    image: NotRequired[ImageBlockDeltaTypeDef],  # (5)
  1. See ToolUseBlockDeltaTypeDef
  2. See list[ToolResultBlockDeltaTypeDef]
  3. See ReasoningContentBlockDeltaTypeDef
  4. See CitationsDeltaTypeDef
  5. See ImageBlockDeltaTypeDef

ToolResultContentBlockOutputTypeDef#

# ToolResultContentBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolResultContentBlockOutputTypeDef


def get_value() -> ToolResultContentBlockOutputTypeDef:
    return {
        "json": ...,
    }


# ToolResultContentBlockOutputTypeDef definition

class ToolResultContentBlockOutputTypeDef(TypedDict):
    json: NotRequired[dict[str, Any]],
    text: NotRequired[str],
    image: NotRequired[ImageBlockOutputTypeDef],  # (1)
    document: NotRequired[DocumentBlockOutputTypeDef],  # (2)
    video: NotRequired[VideoBlockOutputTypeDef],  # (3)
    searchResult: NotRequired[SearchResultBlockOutputTypeDef],  # (4)
  1. See ImageBlockOutputTypeDef
  2. See DocumentBlockOutputTypeDef
  3. See VideoBlockOutputTypeDef
  4. See SearchResultBlockOutputTypeDef

DocumentBlockTypeDef#

# DocumentBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import DocumentBlockTypeDef


def get_value() -> DocumentBlockTypeDef:
    return {
        "format": ...,
    }


# DocumentBlockTypeDef definition

class DocumentBlockTypeDef(TypedDict):
    name: str,
    source: DocumentSourceUnionTypeDef,  # (2)
    format: NotRequired[DocumentFormatType],  # (1)
    context: NotRequired[str],
    citations: NotRequired[CitationsConfigTypeDef],  # (3)
  1. See DocumentFormatType
  2. See DocumentSourceUnionTypeDef
  3. See CitationsConfigTypeDef

GuardrailAutomatedReasoningTranslationAmbiguousFindingTypeDef#

# GuardrailAutomatedReasoningTranslationAmbiguousFindingTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailAutomatedReasoningTranslationAmbiguousFindingTypeDef


def get_value() -> GuardrailAutomatedReasoningTranslationAmbiguousFindingTypeDef:
    return {
        "options": ...,
    }


# GuardrailAutomatedReasoningTranslationAmbiguousFindingTypeDef definition

class GuardrailAutomatedReasoningTranslationAmbiguousFindingTypeDef(TypedDict):
    options: NotRequired[list[GuardrailAutomatedReasoningTranslationOptionTypeDef]],  # (1)
    differenceScenarios: NotRequired[list[GuardrailAutomatedReasoningScenarioTypeDef]],  # (2)
  1. See list[GuardrailAutomatedReasoningTranslationOptionTypeDef]
  2. See list[GuardrailAutomatedReasoningScenarioTypeDef]

OutputConfigTypeDef#

# OutputConfigTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import OutputConfigTypeDef


def get_value() -> OutputConfigTypeDef:
    return {
        "textFormat": ...,
    }


# OutputConfigTypeDef definition

class OutputConfigTypeDef(TypedDict):
    textFormat: NotRequired[OutputFormatTypeDef],  # (1)
  1. See OutputFormatTypeDef

ToolConfigurationTypeDef#

# ToolConfigurationTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolConfigurationTypeDef


def get_value() -> ToolConfigurationTypeDef:
    return {
        "tools": ...,
    }


# ToolConfigurationTypeDef definition

class ToolConfigurationTypeDef(TypedDict):
    tools: Sequence[ToolTypeDef],  # (1)
    toolChoice: NotRequired[ToolChoiceTypeDef],  # (2)
  1. See Sequence[ToolTypeDef]
  2. See ToolChoiceTypeDef

ApplyGuardrailRequestTypeDef#

# ApplyGuardrailRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ApplyGuardrailRequestTypeDef


def get_value() -> ApplyGuardrailRequestTypeDef:
    return {
        "guardrailIdentifier": ...,
    }


# ApplyGuardrailRequestTypeDef definition

class ApplyGuardrailRequestTypeDef(TypedDict):
    guardrailIdentifier: str,
    guardrailVersion: str,
    source: GuardrailContentSourceType,  # (1)
    content: Sequence[GuardrailContentBlockTypeDef],  # (2)
    outputScope: NotRequired[GuardrailOutputScopeType],  # (3)
  1. See GuardrailContentSourceType
  2. See Sequence[GuardrailContentBlockTypeDef]
  3. See GuardrailOutputScopeType

CitationsContentBlockTypeDef#

# CitationsContentBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import CitationsContentBlockTypeDef


def get_value() -> CitationsContentBlockTypeDef:
    return {
        "content": ...,
    }


# CitationsContentBlockTypeDef definition

class CitationsContentBlockTypeDef(TypedDict):
    content: NotRequired[Sequence[CitationGeneratedContentTypeDef]],  # (1)
    citations: NotRequired[Sequence[CitationUnionTypeDef]],  # (2)
  1. See Sequence[CitationGeneratedContentTypeDef]
  2. See Sequence[CitationUnionTypeDef]

ContentBlockDeltaEventTypeDef#

# ContentBlockDeltaEventTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ContentBlockDeltaEventTypeDef


def get_value() -> ContentBlockDeltaEventTypeDef:
    return {
        "delta": ...,
    }


# ContentBlockDeltaEventTypeDef definition

class ContentBlockDeltaEventTypeDef(TypedDict):
    delta: ContentBlockDeltaTypeDef,  # (1)
    contentBlockIndex: int,
  1. See ContentBlockDeltaTypeDef

ToolResultBlockOutputTypeDef#

# ToolResultBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolResultBlockOutputTypeDef


def get_value() -> ToolResultBlockOutputTypeDef:
    return {
        "toolUseId": ...,
    }


# ToolResultBlockOutputTypeDef definition

class ToolResultBlockOutputTypeDef(TypedDict):
    toolUseId: str,
    content: list[ToolResultContentBlockOutputTypeDef],  # (1)
    status: NotRequired[ToolResultStatusType],  # (2)
    type: NotRequired[str],
  1. See list[ToolResultContentBlockOutputTypeDef]
  2. See ToolResultStatusType

GuardrailAutomatedReasoningFindingTypeDef#

# GuardrailAutomatedReasoningFindingTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailAutomatedReasoningFindingTypeDef


def get_value() -> GuardrailAutomatedReasoningFindingTypeDef:
    return {
        "valid": ...,
    }


# GuardrailAutomatedReasoningFindingTypeDef definition

class GuardrailAutomatedReasoningFindingTypeDef(TypedDict):
    valid: NotRequired[GuardrailAutomatedReasoningValidFindingTypeDef],  # (1)
    invalid: NotRequired[GuardrailAutomatedReasoningInvalidFindingTypeDef],  # (2)
    satisfiable: NotRequired[GuardrailAutomatedReasoningSatisfiableFindingTypeDef],  # (3)
    impossible: NotRequired[GuardrailAutomatedReasoningImpossibleFindingTypeDef],  # (4)
    translationAmbiguous: NotRequired[GuardrailAutomatedReasoningTranslationAmbiguousFindingTypeDef],  # (5)
    tooComplex: NotRequired[dict[str, Any]],
    noTranslations: NotRequired[dict[str, Any]],
  1. See GuardrailAutomatedReasoningValidFindingTypeDef
  2. See GuardrailAutomatedReasoningInvalidFindingTypeDef
  3. See GuardrailAutomatedReasoningSatisfiableFindingTypeDef
  4. See GuardrailAutomatedReasoningImpossibleFindingTypeDef
  5. See GuardrailAutomatedReasoningTranslationAmbiguousFindingTypeDef

GuardrailConverseContentBlockTypeDef#

# GuardrailConverseContentBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailConverseContentBlockTypeDef


def get_value() -> GuardrailConverseContentBlockTypeDef:
    return {
        "text": ...,
    }


# GuardrailConverseContentBlockTypeDef definition

class GuardrailConverseContentBlockTypeDef(TypedDict):
    text: NotRequired[GuardrailConverseTextBlockUnionTypeDef],  # (1)
    image: NotRequired[GuardrailConverseImageBlockUnionTypeDef],  # (2)
  1. See GuardrailConverseTextBlockUnionTypeDef
  2. See GuardrailConverseImageBlockUnionTypeDef

ContentBlockOutputTypeDef#

# ContentBlockOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ContentBlockOutputTypeDef


def get_value() -> ContentBlockOutputTypeDef:
    return {
        "text": ...,
    }


# ContentBlockOutputTypeDef definition

class ContentBlockOutputTypeDef(TypedDict):
    text: NotRequired[str],
    image: NotRequired[ImageBlockOutputTypeDef],  # (1)
    document: NotRequired[DocumentBlockOutputTypeDef],  # (2)
    video: NotRequired[VideoBlockOutputTypeDef],  # (3)
    audio: NotRequired[AudioBlockOutputTypeDef],  # (4)
    toolUse: NotRequired[ToolUseBlockOutputTypeDef],  # (5)
    toolResult: NotRequired[ToolResultBlockOutputTypeDef],  # (6)
    guardContent: NotRequired[GuardrailConverseContentBlockOutputTypeDef],  # (7)
    cachePoint: NotRequired[CachePointBlockTypeDef],  # (8)
    reasoningContent: NotRequired[ReasoningContentBlockOutputTypeDef],  # (9)
    citationsContent: NotRequired[CitationsContentBlockOutputTypeDef],  # (10)
    searchResult: NotRequired[SearchResultBlockOutputTypeDef],  # (11)
  1. See ImageBlockOutputTypeDef
  2. See DocumentBlockOutputTypeDef
  3. See VideoBlockOutputTypeDef
  4. See AudioBlockOutputTypeDef
  5. See ToolUseBlockOutputTypeDef
  6. See ToolResultBlockOutputTypeDef
  7. See GuardrailConverseContentBlockOutputTypeDef
  8. See CachePointBlockTypeDef
  9. See ReasoningContentBlockOutputTypeDef
  10. See CitationsContentBlockOutputTypeDef
  11. See SearchResultBlockOutputTypeDef

ToolResultContentBlockTypeDef#

# ToolResultContentBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolResultContentBlockTypeDef


def get_value() -> ToolResultContentBlockTypeDef:
    return {
        "json": ...,
    }


# ToolResultContentBlockTypeDef definition

class ToolResultContentBlockTypeDef(TypedDict):
    json: NotRequired[Mapping[str, Any]],
    text: NotRequired[str],
    image: NotRequired[ImageBlockUnionTypeDef],  # (1)
    document: NotRequired[DocumentBlockUnionTypeDef],  # (2)
    video: NotRequired[VideoBlockUnionTypeDef],  # (3)
    searchResult: NotRequired[SearchResultBlockUnionTypeDef],  # (4)
  1. See ImageBlockUnionTypeDef
  2. See DocumentBlockUnionTypeDef
  3. See VideoBlockUnionTypeDef
  4. See SearchResultBlockUnionTypeDef

GuardrailAutomatedReasoningPolicyAssessmentTypeDef#

# GuardrailAutomatedReasoningPolicyAssessmentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailAutomatedReasoningPolicyAssessmentTypeDef


def get_value() -> GuardrailAutomatedReasoningPolicyAssessmentTypeDef:
    return {
        "findings": ...,
    }


# GuardrailAutomatedReasoningPolicyAssessmentTypeDef definition

class GuardrailAutomatedReasoningPolicyAssessmentTypeDef(TypedDict):
    findings: NotRequired[list[GuardrailAutomatedReasoningFindingTypeDef]],  # (1)
  1. See list[GuardrailAutomatedReasoningFindingTypeDef]

MessageOutputTypeDef#

# MessageOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import MessageOutputTypeDef


def get_value() -> MessageOutputTypeDef:
    return {
        "role": ...,
    }


# MessageOutputTypeDef definition

class MessageOutputTypeDef(TypedDict):
    role: ConversationRoleType,  # (1)
    content: list[ContentBlockOutputTypeDef],  # (2)
  1. See ConversationRoleType
  2. See list[ContentBlockOutputTypeDef]

GuardrailAssessmentTypeDef#

# GuardrailAssessmentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailAssessmentTypeDef


def get_value() -> GuardrailAssessmentTypeDef:
    return {
        "topicPolicy": ...,
    }


# GuardrailAssessmentTypeDef definition

class GuardrailAssessmentTypeDef(TypedDict):
    topicPolicy: NotRequired[GuardrailTopicPolicyAssessmentTypeDef],  # (1)
    contentPolicy: NotRequired[GuardrailContentPolicyAssessmentTypeDef],  # (2)
    wordPolicy: NotRequired[GuardrailWordPolicyAssessmentTypeDef],  # (3)
    sensitiveInformationPolicy: NotRequired[GuardrailSensitiveInformationPolicyAssessmentTypeDef],  # (4)
    contextualGroundingPolicy: NotRequired[GuardrailContextualGroundingPolicyAssessmentTypeDef],  # (5)
    automatedReasoningPolicy: NotRequired[GuardrailAutomatedReasoningPolicyAssessmentTypeDef],  # (6)
    invocationMetrics: NotRequired[GuardrailInvocationMetricsTypeDef],  # (7)
    appliedGuardrailDetails: NotRequired[AppliedGuardrailDetailsTypeDef],  # (8)
  1. See GuardrailTopicPolicyAssessmentTypeDef
  2. See GuardrailContentPolicyAssessmentTypeDef
  3. See GuardrailWordPolicyAssessmentTypeDef
  4. See GuardrailSensitiveInformationPolicyAssessmentTypeDef
  5. See GuardrailContextualGroundingPolicyAssessmentTypeDef
  6. See GuardrailAutomatedReasoningPolicyAssessmentTypeDef
  7. See GuardrailInvocationMetricsTypeDef
  8. See AppliedGuardrailDetailsTypeDef

SystemContentBlockTypeDef#

# SystemContentBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import SystemContentBlockTypeDef


def get_value() -> SystemContentBlockTypeDef:
    return {
        "text": ...,
    }


# SystemContentBlockTypeDef definition

class SystemContentBlockTypeDef(TypedDict):
    text: NotRequired[str],
    guardContent: NotRequired[GuardrailConverseContentBlockUnionTypeDef],  # (1)
    cachePoint: NotRequired[CachePointBlockTypeDef],  # (2)
  1. See GuardrailConverseContentBlockUnionTypeDef
  2. See CachePointBlockTypeDef

ConverseOutputTypeDef#

# ConverseOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseOutputTypeDef


def get_value() -> ConverseOutputTypeDef:
    return {
        "message": ...,
    }


# ConverseOutputTypeDef definition

class ConverseOutputTypeDef(TypedDict):
    message: NotRequired[MessageOutputTypeDef],  # (1)
  1. See MessageOutputTypeDef

ToolResultBlockTypeDef#

# ToolResultBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ToolResultBlockTypeDef


def get_value() -> ToolResultBlockTypeDef:
    return {
        "toolUseId": ...,
    }


# ToolResultBlockTypeDef definition

class ToolResultBlockTypeDef(TypedDict):
    toolUseId: str,
    content: Sequence[ToolResultContentBlockUnionTypeDef],  # (1)
    status: NotRequired[ToolResultStatusType],  # (2)
    type: NotRequired[str],
  1. See Sequence[ToolResultContentBlockUnionTypeDef]
  2. See ToolResultStatusType

ApplyGuardrailResponseTypeDef#

# ApplyGuardrailResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ApplyGuardrailResponseTypeDef


def get_value() -> ApplyGuardrailResponseTypeDef:
    return {
        "usage": ...,
    }


# ApplyGuardrailResponseTypeDef definition

class ApplyGuardrailResponseTypeDef(TypedDict):
    usage: GuardrailUsageTypeDef,  # (1)
    action: GuardrailActionType,  # (2)
    actionReason: str,
    outputs: list[GuardrailOutputContentTypeDef],  # (3)
    assessments: list[GuardrailAssessmentTypeDef],  # (4)
    guardrailCoverage: GuardrailCoverageTypeDef,  # (5)
    ResponseMetadata: ResponseMetadataTypeDef,  # (6)
  1. See GuardrailUsageTypeDef
  2. See GuardrailActionType
  3. See list[GuardrailOutputContentTypeDef]
  4. See list[GuardrailAssessmentTypeDef]
  5. See GuardrailCoverageTypeDef
  6. See ResponseMetadataTypeDef

GuardrailTraceAssessmentTypeDef#

# GuardrailTraceAssessmentTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import GuardrailTraceAssessmentTypeDef


def get_value() -> GuardrailTraceAssessmentTypeDef:
    return {
        "modelOutput": ...,
    }


# GuardrailTraceAssessmentTypeDef definition

class GuardrailTraceAssessmentTypeDef(TypedDict):
    modelOutput: NotRequired[list[str]],
    inputAssessment: NotRequired[dict[str, GuardrailAssessmentTypeDef]],  # (1)
    outputAssessments: NotRequired[dict[str, list[GuardrailAssessmentTypeDef]]],  # (2)
    actionReason: NotRequired[str],
  1. See dict[str, GuardrailAssessmentTypeDef]
  2. See dict[str, list[GuardrailAssessmentTypeDef]]

ConverseStreamTraceTypeDef#

# ConverseStreamTraceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseStreamTraceTypeDef


def get_value() -> ConverseStreamTraceTypeDef:
    return {
        "guardrail": ...,
    }


# ConverseStreamTraceTypeDef definition

class ConverseStreamTraceTypeDef(TypedDict):
    guardrail: NotRequired[GuardrailTraceAssessmentTypeDef],  # (1)
    promptRouter: NotRequired[PromptRouterTraceTypeDef],  # (2)
  1. See GuardrailTraceAssessmentTypeDef
  2. See PromptRouterTraceTypeDef

ConverseTraceTypeDef#

# ConverseTraceTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseTraceTypeDef


def get_value() -> ConverseTraceTypeDef:
    return {
        "guardrail": ...,
    }


# ConverseTraceTypeDef definition

class ConverseTraceTypeDef(TypedDict):
    guardrail: NotRequired[GuardrailTraceAssessmentTypeDef],  # (1)
    promptRouter: NotRequired[PromptRouterTraceTypeDef],  # (2)
  1. See GuardrailTraceAssessmentTypeDef
  2. See PromptRouterTraceTypeDef

ContentBlockTypeDef#

# ContentBlockTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ContentBlockTypeDef


def get_value() -> ContentBlockTypeDef:
    return {
        "text": ...,
    }


# ContentBlockTypeDef definition

class ContentBlockTypeDef(TypedDict):
    text: NotRequired[str],
    image: NotRequired[ImageBlockUnionTypeDef],  # (1)
    document: NotRequired[DocumentBlockUnionTypeDef],  # (2)
    video: NotRequired[VideoBlockUnionTypeDef],  # (3)
    audio: NotRequired[AudioBlockUnionTypeDef],  # (4)
    toolUse: NotRequired[ToolUseBlockUnionTypeDef],  # (5)
    toolResult: NotRequired[ToolResultBlockUnionTypeDef],  # (6)
    guardContent: NotRequired[GuardrailConverseContentBlockUnionTypeDef],  # (7)
    cachePoint: NotRequired[CachePointBlockTypeDef],  # (8)
    reasoningContent: NotRequired[ReasoningContentBlockUnionTypeDef],  # (9)
    citationsContent: NotRequired[CitationsContentBlockUnionTypeDef],  # (10)
    searchResult: NotRequired[SearchResultBlockUnionTypeDef],  # (11)
  1. See ImageBlockUnionTypeDef
  2. See DocumentBlockUnionTypeDef
  3. See VideoBlockUnionTypeDef
  4. See AudioBlockUnionTypeDef
  5. See ToolUseBlockUnionTypeDef
  6. See ToolResultBlockUnionTypeDef
  7. See GuardrailConverseContentBlockUnionTypeDef
  8. See CachePointBlockTypeDef
  9. See ReasoningContentBlockUnionTypeDef
  10. See CitationsContentBlockUnionTypeDef
  11. See SearchResultBlockUnionTypeDef

ConverseStreamMetadataEventTypeDef#

# ConverseStreamMetadataEventTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseStreamMetadataEventTypeDef


def get_value() -> ConverseStreamMetadataEventTypeDef:
    return {
        "usage": ...,
    }


# ConverseStreamMetadataEventTypeDef definition

class ConverseStreamMetadataEventTypeDef(TypedDict):
    usage: TokenUsageTypeDef,  # (1)
    metrics: ConverseStreamMetricsTypeDef,  # (2)
    trace: NotRequired[ConverseStreamTraceTypeDef],  # (3)
    performanceConfig: NotRequired[PerformanceConfigurationTypeDef],  # (4)
    serviceTier: NotRequired[ServiceTierTypeDef],  # (5)
  1. See TokenUsageTypeDef
  2. See ConverseStreamMetricsTypeDef
  3. See ConverseStreamTraceTypeDef
  4. See PerformanceConfigurationTypeDef
  5. See ServiceTierTypeDef

ConverseResponseTypeDef#

# ConverseResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseResponseTypeDef


def get_value() -> ConverseResponseTypeDef:
    return {
        "output": ...,
    }


# ConverseResponseTypeDef definition

class ConverseResponseTypeDef(TypedDict):
    output: ConverseOutputTypeDef,  # (1)
    stopReason: StopReasonType,  # (2)
    usage: TokenUsageTypeDef,  # (3)
    metrics: ConverseMetricsTypeDef,  # (4)
    additionalModelResponseFields: dict[str, Any],
    trace: ConverseTraceTypeDef,  # (5)
    performanceConfig: PerformanceConfigurationTypeDef,  # (6)
    serviceTier: ServiceTierTypeDef,  # (7)
    ResponseMetadata: ResponseMetadataTypeDef,  # (8)
  1. See ConverseOutputTypeDef
  2. See StopReasonType
  3. See TokenUsageTypeDef
  4. See ConverseMetricsTypeDef
  5. See ConverseTraceTypeDef
  6. See PerformanceConfigurationTypeDef
  7. See ServiceTierTypeDef
  8. See ResponseMetadataTypeDef

ConverseStreamOutputTypeDef#

# ConverseStreamOutputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseStreamOutputTypeDef


def get_value() -> ConverseStreamOutputTypeDef:
    return {
        "messageStart": ...,
    }


# ConverseStreamOutputTypeDef definition

class ConverseStreamOutputTypeDef(TypedDict):
    messageStart: NotRequired[MessageStartEventTypeDef],  # (1)
    contentBlockStart: NotRequired[ContentBlockStartEventTypeDef],  # (2)
    contentBlockDelta: NotRequired[ContentBlockDeltaEventTypeDef],  # (3)
    contentBlockStop: NotRequired[ContentBlockStopEventTypeDef],  # (4)
    messageStop: NotRequired[MessageStopEventTypeDef],  # (5)
    metadata: NotRequired[ConverseStreamMetadataEventTypeDef],  # (6)
    internalServerException: NotRequired[InternalServerExceptionTypeDef],  # (7)
    modelStreamErrorException: NotRequired[ModelStreamErrorExceptionTypeDef],  # (8)
    validationException: NotRequired[ValidationExceptionTypeDef],  # (9)
    throttlingException: NotRequired[ThrottlingExceptionTypeDef],  # (10)
    serviceUnavailableException: NotRequired[ServiceUnavailableExceptionTypeDef],  # (11)
  1. See MessageStartEventTypeDef
  2. See ContentBlockStartEventTypeDef
  3. See ContentBlockDeltaEventTypeDef
  4. See ContentBlockStopEventTypeDef
  5. See MessageStopEventTypeDef
  6. See ConverseStreamMetadataEventTypeDef
  7. See InternalServerExceptionTypeDef
  8. See ModelStreamErrorExceptionTypeDef
  9. See ValidationExceptionTypeDef
  10. See ThrottlingExceptionTypeDef
  11. See ServiceUnavailableExceptionTypeDef

MessageTypeDef#

# MessageTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import MessageTypeDef


def get_value() -> MessageTypeDef:
    return {
        "role": ...,
    }


# MessageTypeDef definition

class MessageTypeDef(TypedDict):
    role: ConversationRoleType,  # (1)
    content: Sequence[ContentBlockUnionTypeDef],  # (2)
  1. See ConversationRoleType
  2. See Sequence[ContentBlockUnionTypeDef]

ConverseStreamResponseTypeDef#

# ConverseStreamResponseTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseStreamResponseTypeDef


def get_value() -> ConverseStreamResponseTypeDef:
    return {
        "stream": ...,
    }


# ConverseStreamResponseTypeDef definition

class ConverseStreamResponseTypeDef(TypedDict):
    stream: botocore.eventstream.EventStream[ConverseStreamOutputTypeDef],  # (1)
    ResponseMetadata: ResponseMetadataTypeDef,  # (2)
  1. See EventStream[ConverseStreamOutputTypeDef]
  2. See ResponseMetadataTypeDef

ConverseRequestTypeDef#

# ConverseRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseRequestTypeDef


def get_value() -> ConverseRequestTypeDef:
    return {
        "modelId": ...,
    }


# ConverseRequestTypeDef definition

class ConverseRequestTypeDef(TypedDict):
    modelId: str,
    messages: NotRequired[Sequence[MessageUnionTypeDef]],  # (1)
    system: NotRequired[Sequence[SystemContentBlockTypeDef]],  # (2)
    inferenceConfig: NotRequired[InferenceConfigurationTypeDef],  # (3)
    toolConfig: NotRequired[ToolConfigurationTypeDef],  # (4)
    guardrailConfig: NotRequired[GuardrailConfigurationTypeDef],  # (5)
    additionalModelRequestFields: NotRequired[Mapping[str, Any]],
    promptVariables: NotRequired[Mapping[str, PromptVariableValuesTypeDef]],  # (6)
    additionalModelResponseFieldPaths: NotRequired[Sequence[str]],
    requestMetadata: NotRequired[Mapping[str, str]],
    performanceConfig: NotRequired[PerformanceConfigurationTypeDef],  # (7)
    serviceTier: NotRequired[ServiceTierTypeDef],  # (8)
    outputConfig: NotRequired[OutputConfigTypeDef],  # (9)
  1. See Sequence[MessageUnionTypeDef]
  2. See Sequence[SystemContentBlockTypeDef]
  3. See InferenceConfigurationTypeDef
  4. See ToolConfigurationTypeDef
  5. See GuardrailConfigurationTypeDef
  6. See Mapping[str, PromptVariableValuesTypeDef]
  7. See PerformanceConfigurationTypeDef
  8. See ServiceTierTypeDef
  9. See OutputConfigTypeDef

ConverseStreamRequestTypeDef#

# ConverseStreamRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseStreamRequestTypeDef


def get_value() -> ConverseStreamRequestTypeDef:
    return {
        "modelId": ...,
    }


# ConverseStreamRequestTypeDef definition

class ConverseStreamRequestTypeDef(TypedDict):
    modelId: str,
    messages: NotRequired[Sequence[MessageUnionTypeDef]],  # (1)
    system: NotRequired[Sequence[SystemContentBlockTypeDef]],  # (2)
    inferenceConfig: NotRequired[InferenceConfigurationTypeDef],  # (3)
    toolConfig: NotRequired[ToolConfigurationTypeDef],  # (4)
    guardrailConfig: NotRequired[GuardrailStreamConfigurationTypeDef],  # (5)
    additionalModelRequestFields: NotRequired[Mapping[str, Any]],
    promptVariables: NotRequired[Mapping[str, PromptVariableValuesTypeDef]],  # (6)
    additionalModelResponseFieldPaths: NotRequired[Sequence[str]],
    requestMetadata: NotRequired[Mapping[str, str]],
    performanceConfig: NotRequired[PerformanceConfigurationTypeDef],  # (7)
    serviceTier: NotRequired[ServiceTierTypeDef],  # (8)
    outputConfig: NotRequired[OutputConfigTypeDef],  # (9)
  1. See Sequence[MessageUnionTypeDef]
  2. See Sequence[SystemContentBlockTypeDef]
  3. See InferenceConfigurationTypeDef
  4. See ToolConfigurationTypeDef
  5. See GuardrailStreamConfigurationTypeDef
  6. See Mapping[str, PromptVariableValuesTypeDef]
  7. See PerformanceConfigurationTypeDef
  8. See ServiceTierTypeDef
  9. See OutputConfigTypeDef

ConverseTokensRequestTypeDef#

# ConverseTokensRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import ConverseTokensRequestTypeDef


def get_value() -> ConverseTokensRequestTypeDef:
    return {
        "messages": ...,
    }


# ConverseTokensRequestTypeDef definition

class ConverseTokensRequestTypeDef(TypedDict):
    messages: NotRequired[Sequence[MessageUnionTypeDef]],  # (1)
    system: NotRequired[Sequence[SystemContentBlockTypeDef]],  # (2)
    toolConfig: NotRequired[ToolConfigurationTypeDef],  # (3)
    additionalModelRequestFields: NotRequired[Mapping[str, Any]],
  1. See Sequence[MessageUnionTypeDef]
  2. See Sequence[SystemContentBlockTypeDef]
  3. See ToolConfigurationTypeDef

CountTokensInputTypeDef#

# CountTokensInputTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import CountTokensInputTypeDef


def get_value() -> CountTokensInputTypeDef:
    return {
        "invokeModel": ...,
    }


# CountTokensInputTypeDef definition

class CountTokensInputTypeDef(TypedDict):
    invokeModel: NotRequired[InvokeModelTokensRequestTypeDef],  # (1)
    converse: NotRequired[ConverseTokensRequestTypeDef],  # (2)
  1. See InvokeModelTokensRequestTypeDef
  2. See ConverseTokensRequestTypeDef

CountTokensRequestTypeDef#

# CountTokensRequestTypeDef TypedDict usage example

from mypy_boto3_bedrock_runtime.type_defs import CountTokensRequestTypeDef


def get_value() -> CountTokensRequestTypeDef:
    return {
        "modelId": ...,
    }


# CountTokensRequestTypeDef definition

class CountTokensRequestTypeDef(TypedDict):
    modelId: str,
    input: CountTokensInputTypeDef,  # (1)
  1. See CountTokensInputTypeDef