types-boto3-bedrock-runtime 1.40.0__py3-none-any.whl → 1.40.14__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- types_boto3_bedrock_runtime/__main__.py +3 -3
- types_boto3_bedrock_runtime/client.py +12 -0
- types_boto3_bedrock_runtime/client.pyi +12 -0
- types_boto3_bedrock_runtime/literals.py +5 -0
- types_boto3_bedrock_runtime/literals.pyi +5 -0
- types_boto3_bedrock_runtime/type_defs.py +193 -59
- types_boto3_bedrock_runtime/type_defs.pyi +173 -57
- types_boto3_bedrock_runtime/version.py +1 -1
- {types_boto3_bedrock_runtime-1.40.0.dist-info → types_boto3_bedrock_runtime-1.40.14.dist-info}/METADATA +4 -4
- types_boto3_bedrock_runtime-1.40.14.dist-info/RECORD +18 -0
- types_boto3_bedrock_runtime-1.40.0.dist-info/RECORD +0 -18
- {types_boto3_bedrock_runtime-1.40.0.dist-info → types_boto3_bedrock_runtime-1.40.14.dist-info}/WHEEL +0 -0
- {types_boto3_bedrock_runtime-1.40.0.dist-info → types_boto3_bedrock_runtime-1.40.14.dist-info}/licenses/LICENSE +0 -0
- {types_boto3_bedrock_runtime-1.40.0.dist-info → types_boto3_bedrock_runtime-1.40.14.dist-info}/top_level.txt +0 -0
|
@@ -12,8 +12,8 @@ def print_info() -> None:
|
|
|
12
12
|
Print package info to stdout.
|
|
13
13
|
"""
|
|
14
14
|
sys.stdout.write(
|
|
15
|
-
"Type annotations for boto3 BedrockRuntime 1.40.
|
|
16
|
-
"Version: 1.40.
|
|
15
|
+
"Type annotations for boto3 BedrockRuntime 1.40.14\n"
|
|
16
|
+
"Version: 1.40.14\n"
|
|
17
17
|
"Builder version: 8.11.0\n"
|
|
18
18
|
"Docs: https://youtype.github.io/types_boto3_docs/types_boto3_bedrock_runtime//\n"
|
|
19
19
|
"Boto3 docs: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-runtime.html#bedrockruntime\n"
|
|
@@ -26,7 +26,7 @@ def print_version() -> None:
|
|
|
26
26
|
"""
|
|
27
27
|
Print package version to stdout.
|
|
28
28
|
"""
|
|
29
|
-
sys.stdout.write("1.40.
|
|
29
|
+
sys.stdout.write("1.40.14\n")
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
def main() -> None:
|
|
@@ -33,6 +33,8 @@ from .type_defs import (
|
|
|
33
33
|
ConverseResponseTypeDef,
|
|
34
34
|
ConverseStreamRequestTypeDef,
|
|
35
35
|
ConverseStreamResponseTypeDef,
|
|
36
|
+
CountTokensRequestTypeDef,
|
|
37
|
+
CountTokensResponseTypeDef,
|
|
36
38
|
GetAsyncInvokeRequestTypeDef,
|
|
37
39
|
GetAsyncInvokeResponseTypeDef,
|
|
38
40
|
InvokeModelRequestTypeDef,
|
|
@@ -141,6 +143,16 @@ class BedrockRuntimeClient(BaseClient):
|
|
|
141
143
|
[Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_bedrock_runtime/client/#converse_stream)
|
|
142
144
|
"""
|
|
143
145
|
|
|
146
|
+
def count_tokens(
|
|
147
|
+
self, **kwargs: Unpack[CountTokensRequestTypeDef]
|
|
148
|
+
) -> CountTokensResponseTypeDef:
|
|
149
|
+
"""
|
|
150
|
+
Returns the token count for a given inference request.
|
|
151
|
+
|
|
152
|
+
[Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-runtime/client/count_tokens.html)
|
|
153
|
+
[Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_bedrock_runtime/client/#count_tokens)
|
|
154
|
+
"""
|
|
155
|
+
|
|
144
156
|
def get_async_invoke(
|
|
145
157
|
self, **kwargs: Unpack[GetAsyncInvokeRequestTypeDef]
|
|
146
158
|
) -> GetAsyncInvokeResponseTypeDef:
|
|
@@ -33,6 +33,8 @@ from .type_defs import (
|
|
|
33
33
|
ConverseResponseTypeDef,
|
|
34
34
|
ConverseStreamRequestTypeDef,
|
|
35
35
|
ConverseStreamResponseTypeDef,
|
|
36
|
+
CountTokensRequestTypeDef,
|
|
37
|
+
CountTokensResponseTypeDef,
|
|
36
38
|
GetAsyncInvokeRequestTypeDef,
|
|
37
39
|
GetAsyncInvokeResponseTypeDef,
|
|
38
40
|
InvokeModelRequestTypeDef,
|
|
@@ -138,6 +140,16 @@ class BedrockRuntimeClient(BaseClient):
|
|
|
138
140
|
[Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_bedrock_runtime/client/#converse_stream)
|
|
139
141
|
"""
|
|
140
142
|
|
|
143
|
+
def count_tokens(
|
|
144
|
+
self, **kwargs: Unpack[CountTokensRequestTypeDef]
|
|
145
|
+
) -> CountTokensResponseTypeDef:
|
|
146
|
+
"""
|
|
147
|
+
Returns the token count for a given inference request.
|
|
148
|
+
|
|
149
|
+
[Show boto3 documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-runtime/client/count_tokens.html)
|
|
150
|
+
[Show types-boto3 documentation](https://youtype.github.io/types_boto3_docs/types_boto3_bedrock_runtime/client/#count_tokens)
|
|
151
|
+
"""
|
|
152
|
+
|
|
141
153
|
def get_async_invoke(
|
|
142
154
|
self, **kwargs: Unpack[GetAsyncInvokeRequestTypeDef]
|
|
143
155
|
) -> GetAsyncInvokeResponseTypeDef:
|
|
@@ -29,6 +29,7 @@ __all__ = (
|
|
|
29
29
|
"ConversationRoleType",
|
|
30
30
|
"DocumentFormatType",
|
|
31
31
|
"GuardrailActionType",
|
|
32
|
+
"GuardrailAutomatedReasoningLogicWarningTypeType",
|
|
32
33
|
"GuardrailContentFilterConfidenceType",
|
|
33
34
|
"GuardrailContentFilterStrengthType",
|
|
34
35
|
"GuardrailContentFilterTypeType",
|
|
@@ -69,6 +70,7 @@ CachePointTypeType = Literal["default"]
|
|
|
69
70
|
ConversationRoleType = Literal["assistant", "user"]
|
|
70
71
|
DocumentFormatType = Literal["csv", "doc", "docx", "html", "md", "pdf", "txt", "xls", "xlsx"]
|
|
71
72
|
GuardrailActionType = Literal["GUARDRAIL_INTERVENED", "NONE"]
|
|
73
|
+
GuardrailAutomatedReasoningLogicWarningTypeType = Literal["ALWAYS_FALSE", "ALWAYS_TRUE"]
|
|
72
74
|
GuardrailContentFilterConfidenceType = Literal["HIGH", "LOW", "MEDIUM", "NONE"]
|
|
73
75
|
GuardrailContentFilterStrengthType = Literal["HIGH", "LOW", "MEDIUM", "NONE"]
|
|
74
76
|
GuardrailContentFilterTypeType = Literal[
|
|
@@ -167,6 +169,7 @@ ServiceName = Literal[
|
|
|
167
169
|
"appstream",
|
|
168
170
|
"appsync",
|
|
169
171
|
"apptest",
|
|
172
|
+
"arc-region-switch",
|
|
170
173
|
"arc-zonal-shift",
|
|
171
174
|
"artifact",
|
|
172
175
|
"athena",
|
|
@@ -178,8 +181,10 @@ ServiceName = Literal[
|
|
|
178
181
|
"backup-gateway",
|
|
179
182
|
"backupsearch",
|
|
180
183
|
"batch",
|
|
184
|
+
"bcm-dashboards",
|
|
181
185
|
"bcm-data-exports",
|
|
182
186
|
"bcm-pricing-calculator",
|
|
187
|
+
"bcm-recommended-actions",
|
|
183
188
|
"bedrock",
|
|
184
189
|
"bedrock-agent",
|
|
185
190
|
"bedrock-agent-runtime",
|
|
@@ -28,6 +28,7 @@ __all__ = (
|
|
|
28
28
|
"ConversationRoleType",
|
|
29
29
|
"DocumentFormatType",
|
|
30
30
|
"GuardrailActionType",
|
|
31
|
+
"GuardrailAutomatedReasoningLogicWarningTypeType",
|
|
31
32
|
"GuardrailContentFilterConfidenceType",
|
|
32
33
|
"GuardrailContentFilterStrengthType",
|
|
33
34
|
"GuardrailContentFilterTypeType",
|
|
@@ -67,6 +68,7 @@ CachePointTypeType = Literal["default"]
|
|
|
67
68
|
ConversationRoleType = Literal["assistant", "user"]
|
|
68
69
|
DocumentFormatType = Literal["csv", "doc", "docx", "html", "md", "pdf", "txt", "xls", "xlsx"]
|
|
69
70
|
GuardrailActionType = Literal["GUARDRAIL_INTERVENED", "NONE"]
|
|
71
|
+
GuardrailAutomatedReasoningLogicWarningTypeType = Literal["ALWAYS_FALSE", "ALWAYS_TRUE"]
|
|
70
72
|
GuardrailContentFilterConfidenceType = Literal["HIGH", "LOW", "MEDIUM", "NONE"]
|
|
71
73
|
GuardrailContentFilterStrengthType = Literal["HIGH", "LOW", "MEDIUM", "NONE"]
|
|
72
74
|
GuardrailContentFilterTypeType = Literal[
|
|
@@ -165,6 +167,7 @@ ServiceName = Literal[
|
|
|
165
167
|
"appstream",
|
|
166
168
|
"appsync",
|
|
167
169
|
"apptest",
|
|
170
|
+
"arc-region-switch",
|
|
168
171
|
"arc-zonal-shift",
|
|
169
172
|
"artifact",
|
|
170
173
|
"athena",
|
|
@@ -176,8 +179,10 @@ ServiceName = Literal[
|
|
|
176
179
|
"backup-gateway",
|
|
177
180
|
"backupsearch",
|
|
178
181
|
"batch",
|
|
182
|
+
"bcm-dashboards",
|
|
179
183
|
"bcm-data-exports",
|
|
180
184
|
"bcm-pricing-calculator",
|
|
185
|
+
"bcm-recommended-actions",
|
|
181
186
|
"bedrock",
|
|
182
187
|
"bedrock-agent",
|
|
183
188
|
"bedrock-agent-runtime",
|
|
@@ -28,6 +28,7 @@ from .literals import (
|
|
|
28
28
|
ConversationRoleType,
|
|
29
29
|
DocumentFormatType,
|
|
30
30
|
GuardrailActionType,
|
|
31
|
+
GuardrailAutomatedReasoningLogicWarningTypeType,
|
|
31
32
|
GuardrailContentFilterConfidenceType,
|
|
32
33
|
GuardrailContentFilterStrengthType,
|
|
33
34
|
GuardrailContentFilterTypeType,
|
|
@@ -107,7 +108,11 @@ __all__ = (
|
|
|
107
108
|
"ConverseStreamRequestTypeDef",
|
|
108
109
|
"ConverseStreamResponseTypeDef",
|
|
109
110
|
"ConverseStreamTraceTypeDef",
|
|
111
|
+
"ConverseTokensRequestTypeDef",
|
|
110
112
|
"ConverseTraceTypeDef",
|
|
113
|
+
"CountTokensInputTypeDef",
|
|
114
|
+
"CountTokensRequestTypeDef",
|
|
115
|
+
"CountTokensResponseTypeDef",
|
|
111
116
|
"DocumentBlockOutputTypeDef",
|
|
112
117
|
"DocumentBlockTypeDef",
|
|
113
118
|
"DocumentBlockUnionTypeDef",
|
|
@@ -121,6 +126,20 @@ __all__ = (
|
|
|
121
126
|
"GetAsyncInvokeRequestTypeDef",
|
|
122
127
|
"GetAsyncInvokeResponseTypeDef",
|
|
123
128
|
"GuardrailAssessmentTypeDef",
|
|
129
|
+
"GuardrailAutomatedReasoningFindingTypeDef",
|
|
130
|
+
"GuardrailAutomatedReasoningImpossibleFindingTypeDef",
|
|
131
|
+
"GuardrailAutomatedReasoningInputTextReferenceTypeDef",
|
|
132
|
+
"GuardrailAutomatedReasoningInvalidFindingTypeDef",
|
|
133
|
+
"GuardrailAutomatedReasoningLogicWarningTypeDef",
|
|
134
|
+
"GuardrailAutomatedReasoningPolicyAssessmentTypeDef",
|
|
135
|
+
"GuardrailAutomatedReasoningRuleTypeDef",
|
|
136
|
+
"GuardrailAutomatedReasoningSatisfiableFindingTypeDef",
|
|
137
|
+
"GuardrailAutomatedReasoningScenarioTypeDef",
|
|
138
|
+
"GuardrailAutomatedReasoningStatementTypeDef",
|
|
139
|
+
"GuardrailAutomatedReasoningTranslationAmbiguousFindingTypeDef",
|
|
140
|
+
"GuardrailAutomatedReasoningTranslationOptionTypeDef",
|
|
141
|
+
"GuardrailAutomatedReasoningTranslationTypeDef",
|
|
142
|
+
"GuardrailAutomatedReasoningValidFindingTypeDef",
|
|
124
143
|
"GuardrailConfigurationTypeDef",
|
|
125
144
|
"GuardrailContentBlockTypeDef",
|
|
126
145
|
"GuardrailContentFilterTypeDef",
|
|
@@ -168,6 +187,7 @@ __all__ = (
|
|
|
168
187
|
"InternalServerExceptionTypeDef",
|
|
169
188
|
"InvokeModelRequestTypeDef",
|
|
170
189
|
"InvokeModelResponseTypeDef",
|
|
190
|
+
"InvokeModelTokensRequestTypeDef",
|
|
171
191
|
"InvokeModelWithBidirectionalStreamInputTypeDef",
|
|
172
192
|
"InvokeModelWithBidirectionalStreamOutputTypeDef",
|
|
173
193
|
"InvokeModelWithBidirectionalStreamRequestTypeDef",
|
|
@@ -244,6 +264,8 @@ class GuardrailUsageTypeDef(TypedDict):
|
|
|
244
264
|
sensitiveInformationPolicyFreeUnits: int
|
|
245
265
|
contextualGroundingPolicyUnits: int
|
|
246
266
|
contentPolicyImageUnits: NotRequired[int]
|
|
267
|
+
automatedReasoningPolicyUnits: NotRequired[int]
|
|
268
|
+
automatedReasoningPolicies: NotRequired[int]
|
|
247
269
|
|
|
248
270
|
|
|
249
271
|
class ResponseMetadataTypeDef(TypedDict):
|
|
@@ -432,6 +454,20 @@ class GetAsyncInvokeRequestTypeDef(TypedDict):
|
|
|
432
454
|
invocationArn: str
|
|
433
455
|
|
|
434
456
|
|
|
457
|
+
class GuardrailAutomatedReasoningRuleTypeDef(TypedDict):
|
|
458
|
+
identifier: NotRequired[str]
|
|
459
|
+
policyVersionArn: NotRequired[str]
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
class GuardrailAutomatedReasoningInputTextReferenceTypeDef(TypedDict):
|
|
463
|
+
text: NotRequired[str]
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
class GuardrailAutomatedReasoningStatementTypeDef(TypedDict):
|
|
467
|
+
logic: NotRequired[str]
|
|
468
|
+
naturalLanguage: NotRequired[str]
|
|
469
|
+
|
|
470
|
+
|
|
435
471
|
class GuardrailTextBlockTypeDef(TypedDict):
|
|
436
472
|
text: str
|
|
437
473
|
qualifiers: NotRequired[Sequence[GuardrailContentQualifierType]]
|
|
@@ -579,6 +615,11 @@ ToolUseBlockTypeDef = TypedDict(
|
|
|
579
615
|
)
|
|
580
616
|
|
|
581
617
|
|
|
618
|
+
class CountTokensResponseTypeDef(TypedDict):
|
|
619
|
+
inputTokens: int
|
|
620
|
+
ResponseMetadata: ResponseMetadataTypeDef
|
|
621
|
+
|
|
622
|
+
|
|
582
623
|
class InvokeModelResponseTypeDef(TypedDict):
|
|
583
624
|
body: StreamingBody
|
|
584
625
|
contentType: str
|
|
@@ -626,6 +667,10 @@ class InvokeModelRequestTypeDef(TypedDict):
|
|
|
626
667
|
performanceConfigLatency: NotRequired[PerformanceConfigLatencyType]
|
|
627
668
|
|
|
628
669
|
|
|
670
|
+
class InvokeModelTokensRequestTypeDef(TypedDict):
|
|
671
|
+
body: BlobTypeDef
|
|
672
|
+
|
|
673
|
+
|
|
629
674
|
class InvokeModelWithResponseStreamRequestTypeDef(TypedDict):
|
|
630
675
|
modelId: str
|
|
631
676
|
body: NotRequired[BlobTypeDef]
|
|
@@ -693,6 +738,26 @@ VideoSourceTypeDef = TypedDict(
|
|
|
693
738
|
"s3Location": NotRequired[S3LocationTypeDef],
|
|
694
739
|
},
|
|
695
740
|
)
|
|
741
|
+
GuardrailAutomatedReasoningLogicWarningTypeDef = TypedDict(
|
|
742
|
+
"GuardrailAutomatedReasoningLogicWarningTypeDef",
|
|
743
|
+
{
|
|
744
|
+
"type": NotRequired[GuardrailAutomatedReasoningLogicWarningTypeType],
|
|
745
|
+
"premises": NotRequired[List[GuardrailAutomatedReasoningStatementTypeDef]],
|
|
746
|
+
"claims": NotRequired[List[GuardrailAutomatedReasoningStatementTypeDef]],
|
|
747
|
+
},
|
|
748
|
+
)
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
class GuardrailAutomatedReasoningScenarioTypeDef(TypedDict):
|
|
752
|
+
statements: NotRequired[List[GuardrailAutomatedReasoningStatementTypeDef]]
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
class GuardrailAutomatedReasoningTranslationTypeDef(TypedDict):
|
|
756
|
+
premises: NotRequired[List[GuardrailAutomatedReasoningStatementTypeDef]]
|
|
757
|
+
claims: NotRequired[List[GuardrailAutomatedReasoningStatementTypeDef]]
|
|
758
|
+
untranslatedPremises: NotRequired[List[GuardrailAutomatedReasoningInputTextReferenceTypeDef]]
|
|
759
|
+
untranslatedClaims: NotRequired[List[GuardrailAutomatedReasoningInputTextReferenceTypeDef]]
|
|
760
|
+
confidence: NotRequired[float]
|
|
696
761
|
|
|
697
762
|
|
|
698
763
|
class GuardrailContentPolicyAssessmentTypeDef(TypedDict):
|
|
@@ -903,6 +968,36 @@ VideoBlockOutputTypeDef = TypedDict(
|
|
|
903
968
|
VideoSourceUnionTypeDef = Union[VideoSourceTypeDef, VideoSourceOutputTypeDef]
|
|
904
969
|
|
|
905
970
|
|
|
971
|
+
class GuardrailAutomatedReasoningImpossibleFindingTypeDef(TypedDict):
|
|
972
|
+
translation: NotRequired[GuardrailAutomatedReasoningTranslationTypeDef]
|
|
973
|
+
contradictingRules: NotRequired[List[GuardrailAutomatedReasoningRuleTypeDef]]
|
|
974
|
+
logicWarning: NotRequired[GuardrailAutomatedReasoningLogicWarningTypeDef]
|
|
975
|
+
|
|
976
|
+
|
|
977
|
+
class GuardrailAutomatedReasoningInvalidFindingTypeDef(TypedDict):
|
|
978
|
+
translation: NotRequired[GuardrailAutomatedReasoningTranslationTypeDef]
|
|
979
|
+
contradictingRules: NotRequired[List[GuardrailAutomatedReasoningRuleTypeDef]]
|
|
980
|
+
logicWarning: NotRequired[GuardrailAutomatedReasoningLogicWarningTypeDef]
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
class GuardrailAutomatedReasoningSatisfiableFindingTypeDef(TypedDict):
|
|
984
|
+
translation: NotRequired[GuardrailAutomatedReasoningTranslationTypeDef]
|
|
985
|
+
claimsTrueScenario: NotRequired[GuardrailAutomatedReasoningScenarioTypeDef]
|
|
986
|
+
claimsFalseScenario: NotRequired[GuardrailAutomatedReasoningScenarioTypeDef]
|
|
987
|
+
logicWarning: NotRequired[GuardrailAutomatedReasoningLogicWarningTypeDef]
|
|
988
|
+
|
|
989
|
+
|
|
990
|
+
class GuardrailAutomatedReasoningTranslationOptionTypeDef(TypedDict):
|
|
991
|
+
translations: NotRequired[List[GuardrailAutomatedReasoningTranslationTypeDef]]
|
|
992
|
+
|
|
993
|
+
|
|
994
|
+
class GuardrailAutomatedReasoningValidFindingTypeDef(TypedDict):
|
|
995
|
+
translation: NotRequired[GuardrailAutomatedReasoningTranslationTypeDef]
|
|
996
|
+
claimsTrueScenario: NotRequired[GuardrailAutomatedReasoningScenarioTypeDef]
|
|
997
|
+
supportingRules: NotRequired[List[GuardrailAutomatedReasoningRuleTypeDef]]
|
|
998
|
+
logicWarning: NotRequired[GuardrailAutomatedReasoningLogicWarningTypeDef]
|
|
999
|
+
|
|
1000
|
+
|
|
906
1001
|
class GuardrailConverseContentBlockOutputTypeDef(TypedDict):
|
|
907
1002
|
text: NotRequired[GuardrailConverseTextBlockOutputTypeDef]
|
|
908
1003
|
image: NotRequired[GuardrailConverseImageBlockOutputTypeDef]
|
|
@@ -1012,13 +1107,9 @@ VideoBlockTypeDef = TypedDict(
|
|
|
1012
1107
|
)
|
|
1013
1108
|
|
|
1014
1109
|
|
|
1015
|
-
class
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
wordPolicy: NotRequired[GuardrailWordPolicyAssessmentTypeDef]
|
|
1019
|
-
sensitiveInformationPolicy: NotRequired[GuardrailSensitiveInformationPolicyAssessmentTypeDef]
|
|
1020
|
-
contextualGroundingPolicy: NotRequired[GuardrailContextualGroundingPolicyAssessmentTypeDef]
|
|
1021
|
-
invocationMetrics: NotRequired[GuardrailInvocationMetricsTypeDef]
|
|
1110
|
+
class GuardrailAutomatedReasoningTranslationAmbiguousFindingTypeDef(TypedDict):
|
|
1111
|
+
options: NotRequired[List[GuardrailAutomatedReasoningTranslationOptionTypeDef]]
|
|
1112
|
+
differenceScenarios: NotRequired[List[GuardrailAutomatedReasoningScenarioTypeDef]]
|
|
1022
1113
|
|
|
1023
1114
|
|
|
1024
1115
|
class ToolConfigurationTypeDef(TypedDict):
|
|
@@ -1062,21 +1153,14 @@ class ToolResultBlockOutputTypeDef(TypedDict):
|
|
|
1062
1153
|
VideoBlockUnionTypeDef = Union[VideoBlockTypeDef, VideoBlockOutputTypeDef]
|
|
1063
1154
|
|
|
1064
1155
|
|
|
1065
|
-
class
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
class GuardrailTraceAssessmentTypeDef(TypedDict):
|
|
1076
|
-
modelOutput: NotRequired[List[str]]
|
|
1077
|
-
inputAssessment: NotRequired[Dict[str, GuardrailAssessmentTypeDef]]
|
|
1078
|
-
outputAssessments: NotRequired[Dict[str, List[GuardrailAssessmentTypeDef]]]
|
|
1079
|
-
actionReason: NotRequired[str]
|
|
1156
|
+
class GuardrailAutomatedReasoningFindingTypeDef(TypedDict):
|
|
1157
|
+
valid: NotRequired[GuardrailAutomatedReasoningValidFindingTypeDef]
|
|
1158
|
+
invalid: NotRequired[GuardrailAutomatedReasoningInvalidFindingTypeDef]
|
|
1159
|
+
satisfiable: NotRequired[GuardrailAutomatedReasoningSatisfiableFindingTypeDef]
|
|
1160
|
+
impossible: NotRequired[GuardrailAutomatedReasoningImpossibleFindingTypeDef]
|
|
1161
|
+
translationAmbiguous: NotRequired[GuardrailAutomatedReasoningTranslationAmbiguousFindingTypeDef]
|
|
1162
|
+
tooComplex: NotRequired[Dict[str, Any]]
|
|
1163
|
+
noTranslations: NotRequired[Dict[str, Any]]
|
|
1080
1164
|
|
|
1081
1165
|
|
|
1082
1166
|
class GuardrailConverseContentBlockTypeDef(TypedDict):
|
|
@@ -1110,14 +1194,8 @@ class ToolResultContentBlockTypeDef(TypedDict):
|
|
|
1110
1194
|
video: NotRequired[VideoBlockUnionTypeDef]
|
|
1111
1195
|
|
|
1112
1196
|
|
|
1113
|
-
class
|
|
1114
|
-
|
|
1115
|
-
promptRouter: NotRequired[PromptRouterTraceTypeDef]
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
class ConverseTraceTypeDef(TypedDict):
|
|
1119
|
-
guardrail: NotRequired[GuardrailTraceAssessmentTypeDef]
|
|
1120
|
-
promptRouter: NotRequired[PromptRouterTraceTypeDef]
|
|
1197
|
+
class GuardrailAutomatedReasoningPolicyAssessmentTypeDef(TypedDict):
|
|
1198
|
+
findings: NotRequired[List[GuardrailAutomatedReasoningFindingTypeDef]]
|
|
1121
1199
|
|
|
1122
1200
|
|
|
1123
1201
|
GuardrailConverseContentBlockUnionTypeDef = Union[
|
|
@@ -1135,11 +1213,14 @@ ToolResultContentBlockUnionTypeDef = Union[
|
|
|
1135
1213
|
]
|
|
1136
1214
|
|
|
1137
1215
|
|
|
1138
|
-
class
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1216
|
+
class GuardrailAssessmentTypeDef(TypedDict):
|
|
1217
|
+
topicPolicy: NotRequired[GuardrailTopicPolicyAssessmentTypeDef]
|
|
1218
|
+
contentPolicy: NotRequired[GuardrailContentPolicyAssessmentTypeDef]
|
|
1219
|
+
wordPolicy: NotRequired[GuardrailWordPolicyAssessmentTypeDef]
|
|
1220
|
+
sensitiveInformationPolicy: NotRequired[GuardrailSensitiveInformationPolicyAssessmentTypeDef]
|
|
1221
|
+
contextualGroundingPolicy: NotRequired[GuardrailContextualGroundingPolicyAssessmentTypeDef]
|
|
1222
|
+
automatedReasoningPolicy: NotRequired[GuardrailAutomatedReasoningPolicyAssessmentTypeDef]
|
|
1223
|
+
invocationMetrics: NotRequired[GuardrailInvocationMetricsTypeDef]
|
|
1143
1224
|
|
|
1144
1225
|
|
|
1145
1226
|
class SystemContentBlockTypeDef(TypedDict):
|
|
@@ -1158,37 +1239,34 @@ class ToolResultBlockTypeDef(TypedDict):
|
|
|
1158
1239
|
status: NotRequired[ToolResultStatusType]
|
|
1159
1240
|
|
|
1160
1241
|
|
|
1161
|
-
class
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
modelStreamErrorException: NotRequired[ModelStreamErrorExceptionTypeDef]
|
|
1170
|
-
validationException: NotRequired[ValidationExceptionTypeDef]
|
|
1171
|
-
throttlingException: NotRequired[ThrottlingExceptionTypeDef]
|
|
1172
|
-
serviceUnavailableException: NotRequired[ServiceUnavailableExceptionTypeDef]
|
|
1242
|
+
class ApplyGuardrailResponseTypeDef(TypedDict):
|
|
1243
|
+
usage: GuardrailUsageTypeDef
|
|
1244
|
+
action: GuardrailActionType
|
|
1245
|
+
actionReason: str
|
|
1246
|
+
outputs: List[GuardrailOutputContentTypeDef]
|
|
1247
|
+
assessments: List[GuardrailAssessmentTypeDef]
|
|
1248
|
+
guardrailCoverage: GuardrailCoverageTypeDef
|
|
1249
|
+
ResponseMetadata: ResponseMetadataTypeDef
|
|
1173
1250
|
|
|
1174
1251
|
|
|
1175
|
-
class
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
additionalModelResponseFields: Dict[str, Any]
|
|
1181
|
-
trace: ConverseTraceTypeDef
|
|
1182
|
-
performanceConfig: PerformanceConfigurationTypeDef
|
|
1183
|
-
ResponseMetadata: ResponseMetadataTypeDef
|
|
1252
|
+
class GuardrailTraceAssessmentTypeDef(TypedDict):
|
|
1253
|
+
modelOutput: NotRequired[List[str]]
|
|
1254
|
+
inputAssessment: NotRequired[Dict[str, GuardrailAssessmentTypeDef]]
|
|
1255
|
+
outputAssessments: NotRequired[Dict[str, List[GuardrailAssessmentTypeDef]]]
|
|
1256
|
+
actionReason: NotRequired[str]
|
|
1184
1257
|
|
|
1185
1258
|
|
|
1186
1259
|
ToolResultBlockUnionTypeDef = Union[ToolResultBlockTypeDef, ToolResultBlockOutputTypeDef]
|
|
1187
1260
|
|
|
1188
1261
|
|
|
1189
|
-
class
|
|
1190
|
-
|
|
1191
|
-
|
|
1262
|
+
class ConverseStreamTraceTypeDef(TypedDict):
|
|
1263
|
+
guardrail: NotRequired[GuardrailTraceAssessmentTypeDef]
|
|
1264
|
+
promptRouter: NotRequired[PromptRouterTraceTypeDef]
|
|
1265
|
+
|
|
1266
|
+
|
|
1267
|
+
class ConverseTraceTypeDef(TypedDict):
|
|
1268
|
+
guardrail: NotRequired[GuardrailTraceAssessmentTypeDef]
|
|
1269
|
+
promptRouter: NotRequired[PromptRouterTraceTypeDef]
|
|
1192
1270
|
|
|
1193
1271
|
|
|
1194
1272
|
class ContentBlockTypeDef(TypedDict):
|
|
@@ -1204,14 +1282,51 @@ class ContentBlockTypeDef(TypedDict):
|
|
|
1204
1282
|
citationsContent: NotRequired[CitationsContentBlockUnionTypeDef]
|
|
1205
1283
|
|
|
1206
1284
|
|
|
1285
|
+
class ConverseStreamMetadataEventTypeDef(TypedDict):
|
|
1286
|
+
usage: TokenUsageTypeDef
|
|
1287
|
+
metrics: ConverseStreamMetricsTypeDef
|
|
1288
|
+
trace: NotRequired[ConverseStreamTraceTypeDef]
|
|
1289
|
+
performanceConfig: NotRequired[PerformanceConfigurationTypeDef]
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
class ConverseResponseTypeDef(TypedDict):
|
|
1293
|
+
output: ConverseOutputTypeDef
|
|
1294
|
+
stopReason: StopReasonType
|
|
1295
|
+
usage: TokenUsageTypeDef
|
|
1296
|
+
metrics: ConverseMetricsTypeDef
|
|
1297
|
+
additionalModelResponseFields: Dict[str, Any]
|
|
1298
|
+
trace: ConverseTraceTypeDef
|
|
1299
|
+
performanceConfig: PerformanceConfigurationTypeDef
|
|
1300
|
+
ResponseMetadata: ResponseMetadataTypeDef
|
|
1301
|
+
|
|
1302
|
+
|
|
1207
1303
|
ContentBlockUnionTypeDef = Union[ContentBlockTypeDef, ContentBlockOutputTypeDef]
|
|
1208
1304
|
|
|
1209
1305
|
|
|
1306
|
+
class ConverseStreamOutputTypeDef(TypedDict):
|
|
1307
|
+
messageStart: NotRequired[MessageStartEventTypeDef]
|
|
1308
|
+
contentBlockStart: NotRequired[ContentBlockStartEventTypeDef]
|
|
1309
|
+
contentBlockDelta: NotRequired[ContentBlockDeltaEventTypeDef]
|
|
1310
|
+
contentBlockStop: NotRequired[ContentBlockStopEventTypeDef]
|
|
1311
|
+
messageStop: NotRequired[MessageStopEventTypeDef]
|
|
1312
|
+
metadata: NotRequired[ConverseStreamMetadataEventTypeDef]
|
|
1313
|
+
internalServerException: NotRequired[InternalServerExceptionTypeDef]
|
|
1314
|
+
modelStreamErrorException: NotRequired[ModelStreamErrorExceptionTypeDef]
|
|
1315
|
+
validationException: NotRequired[ValidationExceptionTypeDef]
|
|
1316
|
+
throttlingException: NotRequired[ThrottlingExceptionTypeDef]
|
|
1317
|
+
serviceUnavailableException: NotRequired[ServiceUnavailableExceptionTypeDef]
|
|
1318
|
+
|
|
1319
|
+
|
|
1210
1320
|
class MessageTypeDef(TypedDict):
|
|
1211
1321
|
role: ConversationRoleType
|
|
1212
1322
|
content: Sequence[ContentBlockUnionTypeDef]
|
|
1213
1323
|
|
|
1214
1324
|
|
|
1325
|
+
class ConverseStreamResponseTypeDef(TypedDict):
|
|
1326
|
+
stream: EventStream[ConverseStreamOutputTypeDef]
|
|
1327
|
+
ResponseMetadata: ResponseMetadataTypeDef
|
|
1328
|
+
|
|
1329
|
+
|
|
1215
1330
|
MessageUnionTypeDef = Union[MessageTypeDef, MessageOutputTypeDef]
|
|
1216
1331
|
|
|
1217
1332
|
|
|
@@ -1241,3 +1356,22 @@ class ConverseStreamRequestTypeDef(TypedDict):
|
|
|
1241
1356
|
additionalModelResponseFieldPaths: NotRequired[Sequence[str]]
|
|
1242
1357
|
requestMetadata: NotRequired[Mapping[str, str]]
|
|
1243
1358
|
performanceConfig: NotRequired[PerformanceConfigurationTypeDef]
|
|
1359
|
+
|
|
1360
|
+
|
|
1361
|
+
class ConverseTokensRequestTypeDef(TypedDict):
|
|
1362
|
+
messages: NotRequired[Sequence[MessageUnionTypeDef]]
|
|
1363
|
+
system: NotRequired[Sequence[SystemContentBlockTypeDef]]
|
|
1364
|
+
|
|
1365
|
+
|
|
1366
|
+
class CountTokensInputTypeDef(TypedDict):
|
|
1367
|
+
invokeModel: NotRequired[InvokeModelTokensRequestTypeDef]
|
|
1368
|
+
converse: NotRequired[ConverseTokensRequestTypeDef]
|
|
1369
|
+
|
|
1370
|
+
|
|
1371
|
+
CountTokensRequestTypeDef = TypedDict(
|
|
1372
|
+
"CountTokensRequestTypeDef",
|
|
1373
|
+
{
|
|
1374
|
+
"modelId": str,
|
|
1375
|
+
"input": CountTokensInputTypeDef,
|
|
1376
|
+
},
|
|
1377
|
+
)
|
|
@@ -28,6 +28,7 @@ from .literals import (
|
|
|
28
28
|
ConversationRoleType,
|
|
29
29
|
DocumentFormatType,
|
|
30
30
|
GuardrailActionType,
|
|
31
|
+
GuardrailAutomatedReasoningLogicWarningTypeType,
|
|
31
32
|
GuardrailContentFilterConfidenceType,
|
|
32
33
|
GuardrailContentFilterStrengthType,
|
|
33
34
|
GuardrailContentFilterTypeType,
|
|
@@ -106,7 +107,11 @@ __all__ = (
|
|
|
106
107
|
"ConverseStreamRequestTypeDef",
|
|
107
108
|
"ConverseStreamResponseTypeDef",
|
|
108
109
|
"ConverseStreamTraceTypeDef",
|
|
110
|
+
"ConverseTokensRequestTypeDef",
|
|
109
111
|
"ConverseTraceTypeDef",
|
|
112
|
+
"CountTokensInputTypeDef",
|
|
113
|
+
"CountTokensRequestTypeDef",
|
|
114
|
+
"CountTokensResponseTypeDef",
|
|
110
115
|
"DocumentBlockOutputTypeDef",
|
|
111
116
|
"DocumentBlockTypeDef",
|
|
112
117
|
"DocumentBlockUnionTypeDef",
|
|
@@ -120,6 +125,20 @@ __all__ = (
|
|
|
120
125
|
"GetAsyncInvokeRequestTypeDef",
|
|
121
126
|
"GetAsyncInvokeResponseTypeDef",
|
|
122
127
|
"GuardrailAssessmentTypeDef",
|
|
128
|
+
"GuardrailAutomatedReasoningFindingTypeDef",
|
|
129
|
+
"GuardrailAutomatedReasoningImpossibleFindingTypeDef",
|
|
130
|
+
"GuardrailAutomatedReasoningInputTextReferenceTypeDef",
|
|
131
|
+
"GuardrailAutomatedReasoningInvalidFindingTypeDef",
|
|
132
|
+
"GuardrailAutomatedReasoningLogicWarningTypeDef",
|
|
133
|
+
"GuardrailAutomatedReasoningPolicyAssessmentTypeDef",
|
|
134
|
+
"GuardrailAutomatedReasoningRuleTypeDef",
|
|
135
|
+
"GuardrailAutomatedReasoningSatisfiableFindingTypeDef",
|
|
136
|
+
"GuardrailAutomatedReasoningScenarioTypeDef",
|
|
137
|
+
"GuardrailAutomatedReasoningStatementTypeDef",
|
|
138
|
+
"GuardrailAutomatedReasoningTranslationAmbiguousFindingTypeDef",
|
|
139
|
+
"GuardrailAutomatedReasoningTranslationOptionTypeDef",
|
|
140
|
+
"GuardrailAutomatedReasoningTranslationTypeDef",
|
|
141
|
+
"GuardrailAutomatedReasoningValidFindingTypeDef",
|
|
123
142
|
"GuardrailConfigurationTypeDef",
|
|
124
143
|
"GuardrailContentBlockTypeDef",
|
|
125
144
|
"GuardrailContentFilterTypeDef",
|
|
@@ -167,6 +186,7 @@ __all__ = (
|
|
|
167
186
|
"InternalServerExceptionTypeDef",
|
|
168
187
|
"InvokeModelRequestTypeDef",
|
|
169
188
|
"InvokeModelResponseTypeDef",
|
|
189
|
+
"InvokeModelTokensRequestTypeDef",
|
|
170
190
|
"InvokeModelWithBidirectionalStreamInputTypeDef",
|
|
171
191
|
"InvokeModelWithBidirectionalStreamOutputTypeDef",
|
|
172
192
|
"InvokeModelWithBidirectionalStreamRequestTypeDef",
|
|
@@ -241,6 +261,8 @@ class GuardrailUsageTypeDef(TypedDict):
|
|
|
241
261
|
sensitiveInformationPolicyFreeUnits: int
|
|
242
262
|
contextualGroundingPolicyUnits: int
|
|
243
263
|
contentPolicyImageUnits: NotRequired[int]
|
|
264
|
+
automatedReasoningPolicyUnits: NotRequired[int]
|
|
265
|
+
automatedReasoningPolicies: NotRequired[int]
|
|
244
266
|
|
|
245
267
|
class ResponseMetadataTypeDef(TypedDict):
|
|
246
268
|
RequestId: str
|
|
@@ -395,6 +417,17 @@ class S3LocationTypeDef(TypedDict):
|
|
|
395
417
|
class GetAsyncInvokeRequestTypeDef(TypedDict):
|
|
396
418
|
invocationArn: str
|
|
397
419
|
|
|
420
|
+
class GuardrailAutomatedReasoningRuleTypeDef(TypedDict):
|
|
421
|
+
identifier: NotRequired[str]
|
|
422
|
+
policyVersionArn: NotRequired[str]
|
|
423
|
+
|
|
424
|
+
class GuardrailAutomatedReasoningInputTextReferenceTypeDef(TypedDict):
|
|
425
|
+
text: NotRequired[str]
|
|
426
|
+
|
|
427
|
+
class GuardrailAutomatedReasoningStatementTypeDef(TypedDict):
|
|
428
|
+
logic: NotRequired[str]
|
|
429
|
+
naturalLanguage: NotRequired[str]
|
|
430
|
+
|
|
398
431
|
class GuardrailTextBlockTypeDef(TypedDict):
|
|
399
432
|
text: str
|
|
400
433
|
qualifiers: NotRequired[Sequence[GuardrailContentQualifierType]]
|
|
@@ -523,6 +556,10 @@ ToolUseBlockTypeDef = TypedDict(
|
|
|
523
556
|
},
|
|
524
557
|
)
|
|
525
558
|
|
|
559
|
+
class CountTokensResponseTypeDef(TypedDict):
|
|
560
|
+
inputTokens: int
|
|
561
|
+
ResponseMetadata: ResponseMetadataTypeDef
|
|
562
|
+
|
|
526
563
|
class InvokeModelResponseTypeDef(TypedDict):
|
|
527
564
|
body: StreamingBody
|
|
528
565
|
contentType: str
|
|
@@ -565,6 +602,9 @@ class InvokeModelRequestTypeDef(TypedDict):
|
|
|
565
602
|
guardrailVersion: NotRequired[str]
|
|
566
603
|
performanceConfigLatency: NotRequired[PerformanceConfigLatencyType]
|
|
567
604
|
|
|
605
|
+
class InvokeModelTokensRequestTypeDef(TypedDict):
|
|
606
|
+
body: BlobTypeDef
|
|
607
|
+
|
|
568
608
|
class InvokeModelWithResponseStreamRequestTypeDef(TypedDict):
|
|
569
609
|
modelId: str
|
|
570
610
|
body: NotRequired[BlobTypeDef]
|
|
@@ -629,6 +669,24 @@ VideoSourceTypeDef = TypedDict(
|
|
|
629
669
|
"s3Location": NotRequired[S3LocationTypeDef],
|
|
630
670
|
},
|
|
631
671
|
)
|
|
672
|
+
GuardrailAutomatedReasoningLogicWarningTypeDef = TypedDict(
|
|
673
|
+
"GuardrailAutomatedReasoningLogicWarningTypeDef",
|
|
674
|
+
{
|
|
675
|
+
"type": NotRequired[GuardrailAutomatedReasoningLogicWarningTypeType],
|
|
676
|
+
"premises": NotRequired[List[GuardrailAutomatedReasoningStatementTypeDef]],
|
|
677
|
+
"claims": NotRequired[List[GuardrailAutomatedReasoningStatementTypeDef]],
|
|
678
|
+
},
|
|
679
|
+
)
|
|
680
|
+
|
|
681
|
+
class GuardrailAutomatedReasoningScenarioTypeDef(TypedDict):
|
|
682
|
+
statements: NotRequired[List[GuardrailAutomatedReasoningStatementTypeDef]]
|
|
683
|
+
|
|
684
|
+
class GuardrailAutomatedReasoningTranslationTypeDef(TypedDict):
|
|
685
|
+
premises: NotRequired[List[GuardrailAutomatedReasoningStatementTypeDef]]
|
|
686
|
+
claims: NotRequired[List[GuardrailAutomatedReasoningStatementTypeDef]]
|
|
687
|
+
untranslatedPremises: NotRequired[List[GuardrailAutomatedReasoningInputTextReferenceTypeDef]]
|
|
688
|
+
untranslatedClaims: NotRequired[List[GuardrailAutomatedReasoningInputTextReferenceTypeDef]]
|
|
689
|
+
confidence: NotRequired[float]
|
|
632
690
|
|
|
633
691
|
class GuardrailContentPolicyAssessmentTypeDef(TypedDict):
|
|
634
692
|
filters: List[GuardrailContentFilterTypeDef]
|
|
@@ -812,6 +870,31 @@ VideoBlockOutputTypeDef = TypedDict(
|
|
|
812
870
|
)
|
|
813
871
|
VideoSourceUnionTypeDef = Union[VideoSourceTypeDef, VideoSourceOutputTypeDef]
|
|
814
872
|
|
|
873
|
+
class GuardrailAutomatedReasoningImpossibleFindingTypeDef(TypedDict):
|
|
874
|
+
translation: NotRequired[GuardrailAutomatedReasoningTranslationTypeDef]
|
|
875
|
+
contradictingRules: NotRequired[List[GuardrailAutomatedReasoningRuleTypeDef]]
|
|
876
|
+
logicWarning: NotRequired[GuardrailAutomatedReasoningLogicWarningTypeDef]
|
|
877
|
+
|
|
878
|
+
class GuardrailAutomatedReasoningInvalidFindingTypeDef(TypedDict):
|
|
879
|
+
translation: NotRequired[GuardrailAutomatedReasoningTranslationTypeDef]
|
|
880
|
+
contradictingRules: NotRequired[List[GuardrailAutomatedReasoningRuleTypeDef]]
|
|
881
|
+
logicWarning: NotRequired[GuardrailAutomatedReasoningLogicWarningTypeDef]
|
|
882
|
+
|
|
883
|
+
class GuardrailAutomatedReasoningSatisfiableFindingTypeDef(TypedDict):
|
|
884
|
+
translation: NotRequired[GuardrailAutomatedReasoningTranslationTypeDef]
|
|
885
|
+
claimsTrueScenario: NotRequired[GuardrailAutomatedReasoningScenarioTypeDef]
|
|
886
|
+
claimsFalseScenario: NotRequired[GuardrailAutomatedReasoningScenarioTypeDef]
|
|
887
|
+
logicWarning: NotRequired[GuardrailAutomatedReasoningLogicWarningTypeDef]
|
|
888
|
+
|
|
889
|
+
class GuardrailAutomatedReasoningTranslationOptionTypeDef(TypedDict):
|
|
890
|
+
translations: NotRequired[List[GuardrailAutomatedReasoningTranslationTypeDef]]
|
|
891
|
+
|
|
892
|
+
class GuardrailAutomatedReasoningValidFindingTypeDef(TypedDict):
|
|
893
|
+
translation: NotRequired[GuardrailAutomatedReasoningTranslationTypeDef]
|
|
894
|
+
claimsTrueScenario: NotRequired[GuardrailAutomatedReasoningScenarioTypeDef]
|
|
895
|
+
supportingRules: NotRequired[List[GuardrailAutomatedReasoningRuleTypeDef]]
|
|
896
|
+
logicWarning: NotRequired[GuardrailAutomatedReasoningLogicWarningTypeDef]
|
|
897
|
+
|
|
815
898
|
class GuardrailConverseContentBlockOutputTypeDef(TypedDict):
|
|
816
899
|
text: NotRequired[GuardrailConverseTextBlockOutputTypeDef]
|
|
817
900
|
image: NotRequired[GuardrailConverseImageBlockOutputTypeDef]
|
|
@@ -905,13 +988,9 @@ VideoBlockTypeDef = TypedDict(
|
|
|
905
988
|
},
|
|
906
989
|
)
|
|
907
990
|
|
|
908
|
-
class
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
wordPolicy: NotRequired[GuardrailWordPolicyAssessmentTypeDef]
|
|
912
|
-
sensitiveInformationPolicy: NotRequired[GuardrailSensitiveInformationPolicyAssessmentTypeDef]
|
|
913
|
-
contextualGroundingPolicy: NotRequired[GuardrailContextualGroundingPolicyAssessmentTypeDef]
|
|
914
|
-
invocationMetrics: NotRequired[GuardrailInvocationMetricsTypeDef]
|
|
991
|
+
class GuardrailAutomatedReasoningTranslationAmbiguousFindingTypeDef(TypedDict):
|
|
992
|
+
options: NotRequired[List[GuardrailAutomatedReasoningTranslationOptionTypeDef]]
|
|
993
|
+
differenceScenarios: NotRequired[List[GuardrailAutomatedReasoningScenarioTypeDef]]
|
|
915
994
|
|
|
916
995
|
class ToolConfigurationTypeDef(TypedDict):
|
|
917
996
|
tools: Sequence[ToolTypeDef]
|
|
@@ -946,20 +1025,14 @@ class ToolResultBlockOutputTypeDef(TypedDict):
|
|
|
946
1025
|
|
|
947
1026
|
VideoBlockUnionTypeDef = Union[VideoBlockTypeDef, VideoBlockOutputTypeDef]
|
|
948
1027
|
|
|
949
|
-
class
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
class GuardrailTraceAssessmentTypeDef(TypedDict):
|
|
959
|
-
modelOutput: NotRequired[List[str]]
|
|
960
|
-
inputAssessment: NotRequired[Dict[str, GuardrailAssessmentTypeDef]]
|
|
961
|
-
outputAssessments: NotRequired[Dict[str, List[GuardrailAssessmentTypeDef]]]
|
|
962
|
-
actionReason: NotRequired[str]
|
|
1028
|
+
class GuardrailAutomatedReasoningFindingTypeDef(TypedDict):
|
|
1029
|
+
valid: NotRequired[GuardrailAutomatedReasoningValidFindingTypeDef]
|
|
1030
|
+
invalid: NotRequired[GuardrailAutomatedReasoningInvalidFindingTypeDef]
|
|
1031
|
+
satisfiable: NotRequired[GuardrailAutomatedReasoningSatisfiableFindingTypeDef]
|
|
1032
|
+
impossible: NotRequired[GuardrailAutomatedReasoningImpossibleFindingTypeDef]
|
|
1033
|
+
translationAmbiguous: NotRequired[GuardrailAutomatedReasoningTranslationAmbiguousFindingTypeDef]
|
|
1034
|
+
tooComplex: NotRequired[Dict[str, Any]]
|
|
1035
|
+
noTranslations: NotRequired[Dict[str, Any]]
|
|
963
1036
|
|
|
964
1037
|
class GuardrailConverseContentBlockTypeDef(TypedDict):
|
|
965
1038
|
text: NotRequired[GuardrailConverseTextBlockUnionTypeDef]
|
|
@@ -988,13 +1061,8 @@ class ToolResultContentBlockTypeDef(TypedDict):
|
|
|
988
1061
|
document: NotRequired[DocumentBlockUnionTypeDef]
|
|
989
1062
|
video: NotRequired[VideoBlockUnionTypeDef]
|
|
990
1063
|
|
|
991
|
-
class
|
|
992
|
-
|
|
993
|
-
promptRouter: NotRequired[PromptRouterTraceTypeDef]
|
|
994
|
-
|
|
995
|
-
class ConverseTraceTypeDef(TypedDict):
|
|
996
|
-
guardrail: NotRequired[GuardrailTraceAssessmentTypeDef]
|
|
997
|
-
promptRouter: NotRequired[PromptRouterTraceTypeDef]
|
|
1064
|
+
class GuardrailAutomatedReasoningPolicyAssessmentTypeDef(TypedDict):
|
|
1065
|
+
findings: NotRequired[List[GuardrailAutomatedReasoningFindingTypeDef]]
|
|
998
1066
|
|
|
999
1067
|
GuardrailConverseContentBlockUnionTypeDef = Union[
|
|
1000
1068
|
GuardrailConverseContentBlockTypeDef, GuardrailConverseContentBlockOutputTypeDef
|
|
@@ -1008,11 +1076,14 @@ ToolResultContentBlockUnionTypeDef = Union[
|
|
|
1008
1076
|
ToolResultContentBlockTypeDef, ToolResultContentBlockOutputTypeDef
|
|
1009
1077
|
]
|
|
1010
1078
|
|
|
1011
|
-
class
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1079
|
+
class GuardrailAssessmentTypeDef(TypedDict):
|
|
1080
|
+
topicPolicy: NotRequired[GuardrailTopicPolicyAssessmentTypeDef]
|
|
1081
|
+
contentPolicy: NotRequired[GuardrailContentPolicyAssessmentTypeDef]
|
|
1082
|
+
wordPolicy: NotRequired[GuardrailWordPolicyAssessmentTypeDef]
|
|
1083
|
+
sensitiveInformationPolicy: NotRequired[GuardrailSensitiveInformationPolicyAssessmentTypeDef]
|
|
1084
|
+
contextualGroundingPolicy: NotRequired[GuardrailContextualGroundingPolicyAssessmentTypeDef]
|
|
1085
|
+
automatedReasoningPolicy: NotRequired[GuardrailAutomatedReasoningPolicyAssessmentTypeDef]
|
|
1086
|
+
invocationMetrics: NotRequired[GuardrailInvocationMetricsTypeDef]
|
|
1016
1087
|
|
|
1017
1088
|
class SystemContentBlockTypeDef(TypedDict):
|
|
1018
1089
|
text: NotRequired[str]
|
|
@@ -1027,34 +1098,30 @@ class ToolResultBlockTypeDef(TypedDict):
|
|
|
1027
1098
|
content: Sequence[ToolResultContentBlockUnionTypeDef]
|
|
1028
1099
|
status: NotRequired[ToolResultStatusType]
|
|
1029
1100
|
|
|
1030
|
-
class
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
internalServerException: NotRequired[InternalServerExceptionTypeDef]
|
|
1038
|
-
modelStreamErrorException: NotRequired[ModelStreamErrorExceptionTypeDef]
|
|
1039
|
-
validationException: NotRequired[ValidationExceptionTypeDef]
|
|
1040
|
-
throttlingException: NotRequired[ThrottlingExceptionTypeDef]
|
|
1041
|
-
serviceUnavailableException: NotRequired[ServiceUnavailableExceptionTypeDef]
|
|
1042
|
-
|
|
1043
|
-
class ConverseResponseTypeDef(TypedDict):
|
|
1044
|
-
output: ConverseOutputTypeDef
|
|
1045
|
-
stopReason: StopReasonType
|
|
1046
|
-
usage: TokenUsageTypeDef
|
|
1047
|
-
metrics: ConverseMetricsTypeDef
|
|
1048
|
-
additionalModelResponseFields: Dict[str, Any]
|
|
1049
|
-
trace: ConverseTraceTypeDef
|
|
1050
|
-
performanceConfig: PerformanceConfigurationTypeDef
|
|
1101
|
+
class ApplyGuardrailResponseTypeDef(TypedDict):
|
|
1102
|
+
usage: GuardrailUsageTypeDef
|
|
1103
|
+
action: GuardrailActionType
|
|
1104
|
+
actionReason: str
|
|
1105
|
+
outputs: List[GuardrailOutputContentTypeDef]
|
|
1106
|
+
assessments: List[GuardrailAssessmentTypeDef]
|
|
1107
|
+
guardrailCoverage: GuardrailCoverageTypeDef
|
|
1051
1108
|
ResponseMetadata: ResponseMetadataTypeDef
|
|
1052
1109
|
|
|
1110
|
+
class GuardrailTraceAssessmentTypeDef(TypedDict):
|
|
1111
|
+
modelOutput: NotRequired[List[str]]
|
|
1112
|
+
inputAssessment: NotRequired[Dict[str, GuardrailAssessmentTypeDef]]
|
|
1113
|
+
outputAssessments: NotRequired[Dict[str, List[GuardrailAssessmentTypeDef]]]
|
|
1114
|
+
actionReason: NotRequired[str]
|
|
1115
|
+
|
|
1053
1116
|
ToolResultBlockUnionTypeDef = Union[ToolResultBlockTypeDef, ToolResultBlockOutputTypeDef]
|
|
1054
1117
|
|
|
1055
|
-
class
|
|
1056
|
-
|
|
1057
|
-
|
|
1118
|
+
class ConverseStreamTraceTypeDef(TypedDict):
|
|
1119
|
+
guardrail: NotRequired[GuardrailTraceAssessmentTypeDef]
|
|
1120
|
+
promptRouter: NotRequired[PromptRouterTraceTypeDef]
|
|
1121
|
+
|
|
1122
|
+
class ConverseTraceTypeDef(TypedDict):
|
|
1123
|
+
guardrail: NotRequired[GuardrailTraceAssessmentTypeDef]
|
|
1124
|
+
promptRouter: NotRequired[PromptRouterTraceTypeDef]
|
|
1058
1125
|
|
|
1059
1126
|
class ContentBlockTypeDef(TypedDict):
|
|
1060
1127
|
text: NotRequired[str]
|
|
@@ -1068,12 +1135,45 @@ class ContentBlockTypeDef(TypedDict):
|
|
|
1068
1135
|
reasoningContent: NotRequired[ReasoningContentBlockUnionTypeDef]
|
|
1069
1136
|
citationsContent: NotRequired[CitationsContentBlockUnionTypeDef]
|
|
1070
1137
|
|
|
1138
|
+
class ConverseStreamMetadataEventTypeDef(TypedDict):
|
|
1139
|
+
usage: TokenUsageTypeDef
|
|
1140
|
+
metrics: ConverseStreamMetricsTypeDef
|
|
1141
|
+
trace: NotRequired[ConverseStreamTraceTypeDef]
|
|
1142
|
+
performanceConfig: NotRequired[PerformanceConfigurationTypeDef]
|
|
1143
|
+
|
|
1144
|
+
class ConverseResponseTypeDef(TypedDict):
|
|
1145
|
+
output: ConverseOutputTypeDef
|
|
1146
|
+
stopReason: StopReasonType
|
|
1147
|
+
usage: TokenUsageTypeDef
|
|
1148
|
+
metrics: ConverseMetricsTypeDef
|
|
1149
|
+
additionalModelResponseFields: Dict[str, Any]
|
|
1150
|
+
trace: ConverseTraceTypeDef
|
|
1151
|
+
performanceConfig: PerformanceConfigurationTypeDef
|
|
1152
|
+
ResponseMetadata: ResponseMetadataTypeDef
|
|
1153
|
+
|
|
1071
1154
|
ContentBlockUnionTypeDef = Union[ContentBlockTypeDef, ContentBlockOutputTypeDef]
|
|
1072
1155
|
|
|
1156
|
+
class ConverseStreamOutputTypeDef(TypedDict):
|
|
1157
|
+
messageStart: NotRequired[MessageStartEventTypeDef]
|
|
1158
|
+
contentBlockStart: NotRequired[ContentBlockStartEventTypeDef]
|
|
1159
|
+
contentBlockDelta: NotRequired[ContentBlockDeltaEventTypeDef]
|
|
1160
|
+
contentBlockStop: NotRequired[ContentBlockStopEventTypeDef]
|
|
1161
|
+
messageStop: NotRequired[MessageStopEventTypeDef]
|
|
1162
|
+
metadata: NotRequired[ConverseStreamMetadataEventTypeDef]
|
|
1163
|
+
internalServerException: NotRequired[InternalServerExceptionTypeDef]
|
|
1164
|
+
modelStreamErrorException: NotRequired[ModelStreamErrorExceptionTypeDef]
|
|
1165
|
+
validationException: NotRequired[ValidationExceptionTypeDef]
|
|
1166
|
+
throttlingException: NotRequired[ThrottlingExceptionTypeDef]
|
|
1167
|
+
serviceUnavailableException: NotRequired[ServiceUnavailableExceptionTypeDef]
|
|
1168
|
+
|
|
1073
1169
|
class MessageTypeDef(TypedDict):
|
|
1074
1170
|
role: ConversationRoleType
|
|
1075
1171
|
content: Sequence[ContentBlockUnionTypeDef]
|
|
1076
1172
|
|
|
1173
|
+
class ConverseStreamResponseTypeDef(TypedDict):
|
|
1174
|
+
stream: EventStream[ConverseStreamOutputTypeDef]
|
|
1175
|
+
ResponseMetadata: ResponseMetadataTypeDef
|
|
1176
|
+
|
|
1077
1177
|
MessageUnionTypeDef = Union[MessageTypeDef, MessageOutputTypeDef]
|
|
1078
1178
|
|
|
1079
1179
|
class ConverseRequestTypeDef(TypedDict):
|
|
@@ -1101,3 +1201,19 @@ class ConverseStreamRequestTypeDef(TypedDict):
|
|
|
1101
1201
|
additionalModelResponseFieldPaths: NotRequired[Sequence[str]]
|
|
1102
1202
|
requestMetadata: NotRequired[Mapping[str, str]]
|
|
1103
1203
|
performanceConfig: NotRequired[PerformanceConfigurationTypeDef]
|
|
1204
|
+
|
|
1205
|
+
class ConverseTokensRequestTypeDef(TypedDict):
|
|
1206
|
+
messages: NotRequired[Sequence[MessageUnionTypeDef]]
|
|
1207
|
+
system: NotRequired[Sequence[SystemContentBlockTypeDef]]
|
|
1208
|
+
|
|
1209
|
+
class CountTokensInputTypeDef(TypedDict):
|
|
1210
|
+
invokeModel: NotRequired[InvokeModelTokensRequestTypeDef]
|
|
1211
|
+
converse: NotRequired[ConverseTokensRequestTypeDef]
|
|
1212
|
+
|
|
1213
|
+
CountTokensRequestTypeDef = TypedDict(
|
|
1214
|
+
"CountTokensRequestTypeDef",
|
|
1215
|
+
{
|
|
1216
|
+
"modelId": str,
|
|
1217
|
+
"input": CountTokensInputTypeDef,
|
|
1218
|
+
},
|
|
1219
|
+
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: types-boto3-bedrock-runtime
|
|
3
|
-
Version: 1.40.
|
|
4
|
-
Summary: Type annotations for boto3 BedrockRuntime 1.40.
|
|
3
|
+
Version: 1.40.14
|
|
4
|
+
Summary: Type annotations for boto3 BedrockRuntime 1.40.14 service generated with mypy-boto3-builder 8.11.0
|
|
5
5
|
Home-page: https://github.com/youtype/mypy_boto3_builder
|
|
6
6
|
Author: Vlad Emelianov
|
|
7
7
|
Author-email: vlad.emelianov.nz@gmail.com
|
|
@@ -57,7 +57,7 @@ Dynamic: summary
|
|
|
57
57
|

|
|
58
58
|
|
|
59
59
|
Type annotations for
|
|
60
|
-
[boto3 BedrockRuntime 1.40.
|
|
60
|
+
[boto3 BedrockRuntime 1.40.14](https://pypi.org/project/boto3/) compatible with
|
|
61
61
|
[VSCode](https://code.visualstudio.com/),
|
|
62
62
|
[PyCharm](https://www.jetbrains.com/pycharm/),
|
|
63
63
|
[Emacs](https://www.gnu.org/software/emacs/),
|
|
@@ -119,7 +119,7 @@ You can generate type annotations for `boto3` package locally with
|
|
|
119
119
|
isolation.
|
|
120
120
|
|
|
121
121
|
1. Run mypy-boto3-builder in your package root directory:
|
|
122
|
-
`uvx --with 'boto3==1.40.
|
|
122
|
+
`uvx --with 'boto3==1.40.14' mypy-boto3-builder`
|
|
123
123
|
2. Select `boto3` AWS SDK.
|
|
124
124
|
3. Add `BedrockRuntime` service.
|
|
125
125
|
4. Use provided commands to install generated packages.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
types_boto3_bedrock_runtime/__init__.py,sha256=yVTpBudgQiZdF0pSNhAE-1xbRZSFBHRcN9lRoforRqk,774
|
|
2
|
+
types_boto3_bedrock_runtime/__init__.pyi,sha256=FTe8oZW7DRJdbaUR0zeqYoUvSJbUFsNGBllLTCZwU4k,773
|
|
3
|
+
types_boto3_bedrock_runtime/__main__.py,sha256=p-7caw5O-nGdm3UlJLlEJZqaouztzu-pbP-JIoenJQU,1015
|
|
4
|
+
types_boto3_bedrock_runtime/client.py,sha256=W4o6UKl_m5Sp3uic5eq5BKlFpTxd1LCfif0vB2B-aR8,10098
|
|
5
|
+
types_boto3_bedrock_runtime/client.pyi,sha256=nIshacSA3Qn0Ukg5X7ump-P5PDf3OG653bVeoX9IrcY,10095
|
|
6
|
+
types_boto3_bedrock_runtime/literals.py,sha256=_tniWvo8bt7_gPGy7IEPVra5vCHmXaJp3PPGmoy5IFQ,13515
|
|
7
|
+
types_boto3_bedrock_runtime/literals.pyi,sha256=IX-C0MjrOkwg7lNEf9_Y6G1J3SyoAIPkiIbkWZYtY0U,13513
|
|
8
|
+
types_boto3_bedrock_runtime/paginator.py,sha256=5Jxr9RrOJKN9XVbJReCbUJpJopBTa6lkmC2vmFjI2nQ,2194
|
|
9
|
+
types_boto3_bedrock_runtime/paginator.pyi,sha256=63nEmXrjk6YpFdjbM7HiTP4pBDClAUG2z9KGCvvqdpw,2190
|
|
10
|
+
types_boto3_bedrock_runtime/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
types_boto3_bedrock_runtime/type_defs.py,sha256=vFIVx8TFLFEHx_-L2WMKcuHMBVZox09lkcqFV_g7m1U,42769
|
|
12
|
+
types_boto3_bedrock_runtime/type_defs.pyi,sha256=9zceXr2VJi1RHfjEjCfA7i_XMQldu17StIS1KE6BS2w,42611
|
|
13
|
+
types_boto3_bedrock_runtime/version.py,sha256=yx4TXfA7frT22svKZb5oIUbOh_laGJb51_7cJeePnRs,93
|
|
14
|
+
types_boto3_bedrock_runtime-1.40.14.dist-info/licenses/LICENSE,sha256=4jNgB8jJbXtUVJkeygwhUQi--6lAG8DIisfE-h_RiUU,1070
|
|
15
|
+
types_boto3_bedrock_runtime-1.40.14.dist-info/METADATA,sha256=JgS6fZ9VzBpxSiuugaYMHi9NLdT1_JOA-edPPAdXxh0,15400
|
|
16
|
+
types_boto3_bedrock_runtime-1.40.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
17
|
+
types_boto3_bedrock_runtime-1.40.14.dist-info/top_level.txt,sha256=vs95SHzu94rM38mmauihzrtfinMIBV-tKDaYSV0eMww,28
|
|
18
|
+
types_boto3_bedrock_runtime-1.40.14.dist-info/RECORD,,
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
types_boto3_bedrock_runtime/__init__.py,sha256=yVTpBudgQiZdF0pSNhAE-1xbRZSFBHRcN9lRoforRqk,774
|
|
2
|
-
types_boto3_bedrock_runtime/__init__.pyi,sha256=FTe8oZW7DRJdbaUR0zeqYoUvSJbUFsNGBllLTCZwU4k,773
|
|
3
|
-
types_boto3_bedrock_runtime/__main__.py,sha256=SlV7rFKS-A6V60JHUMWeNbDvE3YwFGu-UO1PkNBRjK0,1012
|
|
4
|
-
types_boto3_bedrock_runtime/client.py,sha256=kjTKseKd8WybYKk-4ru6mPPvb6MHaw7YFAc9ZIu2sMw,9543
|
|
5
|
-
types_boto3_bedrock_runtime/client.pyi,sha256=yVHUXcX9AsgS6HIVuTp4olrDWJ8c_x5rtihDhBwG_DE,9540
|
|
6
|
-
types_boto3_bedrock_runtime/literals.py,sha256=dCDbIFfiosedKNHKg8NOkBzop9xLOD1a-TRgl4MkdvM,13293
|
|
7
|
-
types_boto3_bedrock_runtime/literals.pyi,sha256=E_7K74jSTa_388G-NXmQ0QzlH3mGHOKC2HtPSAqoG8M,13291
|
|
8
|
-
types_boto3_bedrock_runtime/paginator.py,sha256=5Jxr9RrOJKN9XVbJReCbUJpJopBTa6lkmC2vmFjI2nQ,2194
|
|
9
|
-
types_boto3_bedrock_runtime/paginator.pyi,sha256=63nEmXrjk6YpFdjbM7HiTP4pBDClAUG2z9KGCvvqdpw,2190
|
|
10
|
-
types_boto3_bedrock_runtime/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
types_boto3_bedrock_runtime/type_defs.py,sha256=5AsEk2TfZic7xQ0NCzL2Y-CIsaThT4jEo38tCg3G6S8,37075
|
|
12
|
-
types_boto3_bedrock_runtime/type_defs.pyi,sha256=ZNoNznEY8oxVPRbKmnpfA0iVODbON4nADDaAgo9xJe0,36935
|
|
13
|
-
types_boto3_bedrock_runtime/version.py,sha256=52Sk0XpA8tC09WfcAI6nm69vLa0ysg1C33ACO_NFSwc,92
|
|
14
|
-
types_boto3_bedrock_runtime-1.40.0.dist-info/licenses/LICENSE,sha256=4jNgB8jJbXtUVJkeygwhUQi--6lAG8DIisfE-h_RiUU,1070
|
|
15
|
-
types_boto3_bedrock_runtime-1.40.0.dist-info/METADATA,sha256=gF1GDDesT99iGj6jIIJA5ot3-9whU3jgQmMw8Id1AbY,15396
|
|
16
|
-
types_boto3_bedrock_runtime-1.40.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
17
|
-
types_boto3_bedrock_runtime-1.40.0.dist-info/top_level.txt,sha256=vs95SHzu94rM38mmauihzrtfinMIBV-tKDaYSV0eMww,28
|
|
18
|
-
types_boto3_bedrock_runtime-1.40.0.dist-info/RECORD,,
|
{types_boto3_bedrock_runtime-1.40.0.dist-info → types_boto3_bedrock_runtime-1.40.14.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|