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)
]
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)
]
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)
]
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)
]
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)
]
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)
]
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)
]
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)
]
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)
]
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)
]
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)
]
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)
]
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)
]
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)
]
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)
]
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)
]
- See MessageTypeDef
- See MessageOutputTypeDef
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],
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],
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],
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)
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],
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],
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,
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: str,
guardrailVersion: str,
trace: NotRequired[GuardrailTraceType], # (1)
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)
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],
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],
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)
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]],
- 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: str,
guardrailVersion: str,
trace: NotRequired[GuardrailTraceType], # (1)
streamProcessingMode: NotRequired[GuardrailStreamProcessingModeType], # (2)
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],
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],
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,
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)
- 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],
- See GuardrailContentFilterTypeType
- See GuardrailContentFilterConfidenceType
- See GuardrailContentFilterStrengthType
- 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],
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)
- 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)
- 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],
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],
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],
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],
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],
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],
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],
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,
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],
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)
ResponseMetadata: ResponseMetadataTypeDef, # (2)
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)
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)
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],
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)
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)
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)
reasoningContent: NotRequired[ReasoningContentBlockDeltaTypeDef], # (2)
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)
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)
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)
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)
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)
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)
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)
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)
- 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)
- 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)
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)
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)
- See
List[GuardrailCustomWordTypeDef]
- 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)
- See
List[GuardrailPiiEntityFilterTypeDef]
- 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)
- 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)
- See BidirectionalOutputPayloadPartTypeDef
- See InternalServerExceptionTypeDef
- See ModelStreamErrorExceptionTypeDef
- See ValidationExceptionTypeDef
- See ThrottlingExceptionTypeDef
- See ModelTimeoutExceptionTypeDef
- See ServiceUnavailableExceptionTypeDef
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)
- See AsyncInvokeStatusType
- See SortAsyncInvocationByType
- See SortOrderType
- 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)
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)
- See PayloadPartTypeDef
- See InternalServerExceptionTypeDef
- See ModelStreamErrorExceptionTypeDef
- See ValidationExceptionTypeDef
- See ThrottlingExceptionTypeDef
- See ModelTimeoutExceptionTypeDef
- 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],
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],
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)
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],
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],
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)
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)
- See AsyncInvokeOutputDataConfigTypeDef
- See
Sequence[TagTypeDef]
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)
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)
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,
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,
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):
format: DocumentFormatType, # (1)
name: str,
source: DocumentSourceOutputTypeDef, # (2)
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)
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)
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)
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)
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)
- See
EventStream[InvokeModelWithBidirectionalStreamOutputTypeDef]
- See ResponseMetadataTypeDef
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)
ResponseMetadata: ResponseMetadataTypeDef, # (3)
- See
EventStream[ResponseStreamTypeDef]
- See PerformanceConfigLatencyType
- 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)
cachePoint: NotRequired[CachePointBlockTypeDef], # (2)
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],
- See
List[AsyncInvokeSummaryTypeDef]
- See ResponseMetadataTypeDef
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)
- 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)
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)
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):
format: DocumentFormatType, # (1)
name: str,
source: DocumentSourceUnionTypeDef, # (2)
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)
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)
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)
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)
invocationMetrics: NotRequired[GuardrailInvocationMetricsTypeDef], # (6)
- See GuardrailTopicPolicyAssessmentTypeDef
- See GuardrailContentPolicyAssessmentTypeDef
- See GuardrailWordPolicyAssessmentTypeDef
- See GuardrailSensitiveInformationPolicyAssessmentTypeDef
- See GuardrailContextualGroundingPolicyAssessmentTypeDef
- See GuardrailInvocationMetricsTypeDef
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)
- See
Sequence[ToolTypeDef]
- 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)
- See GuardrailContentSourceType
- See
Sequence[GuardrailContentBlockTypeDef]
- See GuardrailOutputScopeType
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)
- See
List[ToolResultContentBlockOutputTypeDef]
- 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)
- See GuardrailUsageTypeDef
- See GuardrailActionType
- See
List[GuardrailOutputContentTypeDef]
- See
List[GuardrailAssessmentTypeDef]
- See GuardrailCoverageTypeDef
- 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],
- See
Dict[str, GuardrailAssessmentTypeDef]
- See
Dict[str, List[GuardrailAssessmentTypeDef]]
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)
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)
toolUse: NotRequired[ToolUseBlockOutputTypeDef], # (4)
toolResult: NotRequired[ToolResultBlockOutputTypeDef], # (5)
guardContent: NotRequired[GuardrailConverseContentBlockOutputTypeDef], # (6)
cachePoint: NotRequired[CachePointBlockTypeDef], # (7)
reasoningContent: NotRequired[ReasoningContentBlockOutputTypeDef], # (8)
- See ImageBlockOutputTypeDef
- See DocumentBlockOutputTypeDef
- See VideoBlockOutputTypeDef
- See ToolUseBlockOutputTypeDef
- See ToolResultBlockOutputTypeDef
- See GuardrailConverseContentBlockOutputTypeDef
- See CachePointBlockTypeDef
- See ReasoningContentBlockOutputTypeDef
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)
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)
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)
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)
- See ConversationRoleType
- See
List[ContentBlockOutputTypeDef]
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)
- See TokenUsageTypeDef
- See ConverseStreamMetricsTypeDef
- See ConverseStreamTraceTypeDef
- See PerformanceConfigurationTypeDef
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)
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)
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)
- See
Sequence[ToolResultContentBlockUnionTypeDef]
- See ToolResultStatusType
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)
- See MessageStartEventTypeDef
- See ContentBlockStartEventTypeDef
- See ContentBlockDeltaEventTypeDef
- See ContentBlockStopEventTypeDef
- See MessageStopEventTypeDef
- See ConverseStreamMetadataEventTypeDef
- See InternalServerExceptionTypeDef
- See ModelStreamErrorExceptionTypeDef
- See ValidationExceptionTypeDef
- See ThrottlingExceptionTypeDef
- See ServiceUnavailableExceptionTypeDef
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)
ResponseMetadata: ResponseMetadataTypeDef, # (7)
- See ConverseOutputTypeDef
- See StopReasonType
- See TokenUsageTypeDef
- See ConverseMetricsTypeDef
- See ConverseTraceTypeDef
- See PerformanceConfigurationTypeDef
- See ResponseMetadataTypeDef
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)
- See
EventStream[ConverseStreamOutputTypeDef]
- See ResponseMetadataTypeDef
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)
toolUse: NotRequired[ToolUseBlockUnionTypeDef], # (4)
toolResult: NotRequired[ToolResultBlockUnionTypeDef], # (5)
guardContent: NotRequired[GuardrailConverseContentBlockUnionTypeDef], # (6)
cachePoint: NotRequired[CachePointBlockTypeDef], # (7)
reasoningContent: NotRequired[ReasoningContentBlockUnionTypeDef], # (8)
- See ImageBlockUnionTypeDef
- See DocumentBlockUnionTypeDef
- See VideoBlockUnionTypeDef
- See ToolUseBlockUnionTypeDef
- See ToolResultBlockUnionTypeDef
- See GuardrailConverseContentBlockUnionTypeDef
- See CachePointBlockTypeDef
- See ReasoningContentBlockUnionTypeDef
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)
- See ConversationRoleType
- See
Sequence[ContentBlockUnionTypeDef]
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)
- See
Sequence[MessageUnionTypeDef]
- See
Sequence[SystemContentBlockTypeDef]
- See InferenceConfigurationTypeDef
- See ToolConfigurationTypeDef
- See GuardrailConfigurationTypeDef
- See
Mapping[str, PromptVariableValuesTypeDef]
- See PerformanceConfigurationTypeDef
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)
- See
Sequence[MessageUnionTypeDef]
- See
Sequence[SystemContentBlockTypeDef]
- See InferenceConfigurationTypeDef
- See ToolConfigurationTypeDef
- See GuardrailStreamConfigurationTypeDef
- See
Mapping[str, PromptVariableValuesTypeDef]
- See PerformanceConfigurationTypeDef