types-boto3-bedrock-runtime 1.40.61__py3-none-any.whl → 1.40.76__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 +4 -4
- types_boto3_bedrock_runtime/client.py +14 -18
- types_boto3_bedrock_runtime/client.pyi +14 -18
- types_boto3_bedrock_runtime/literals.py +5 -0
- types_boto3_bedrock_runtime/literals.pyi +5 -0
- types_boto3_bedrock_runtime/type_defs.py +120 -64
- types_boto3_bedrock_runtime/type_defs.pyi +116 -61
- types_boto3_bedrock_runtime/version.py +1 -1
- {types_boto3_bedrock_runtime-1.40.61.dist-info → types_boto3_bedrock_runtime-1.40.76.dist-info}/METADATA +11 -25
- types_boto3_bedrock_runtime-1.40.76.dist-info/RECORD +18 -0
- types_boto3_bedrock_runtime-1.40.61.dist-info/RECORD +0 -18
- {types_boto3_bedrock_runtime-1.40.61.dist-info → types_boto3_bedrock_runtime-1.40.76.dist-info}/WHEEL +0 -0
- {types_boto3_bedrock_runtime-1.40.61.dist-info → types_boto3_bedrock_runtime-1.40.76.dist-info}/licenses/LICENSE +0 -0
- {types_boto3_bedrock_runtime-1.40.61.dist-info → types_boto3_bedrock_runtime-1.40.76.dist-info}/top_level.txt +0 -0
|
@@ -17,6 +17,7 @@ Usage::
|
|
|
17
17
|
from __future__ import annotations
|
|
18
18
|
|
|
19
19
|
import sys
|
|
20
|
+
from collections.abc import Mapping, Sequence
|
|
20
21
|
from datetime import datetime
|
|
21
22
|
from typing import IO, Any, Union
|
|
22
23
|
|
|
@@ -49,19 +50,15 @@ from .literals import (
|
|
|
49
50
|
GuardrailWordPolicyActionType,
|
|
50
51
|
ImageFormatType,
|
|
51
52
|
PerformanceConfigLatencyType,
|
|
53
|
+
ServiceTierTypeType,
|
|
52
54
|
SortOrderType,
|
|
53
55
|
StopReasonType,
|
|
54
56
|
ToolResultStatusType,
|
|
57
|
+
ToolUseTypeType,
|
|
55
58
|
TraceType,
|
|
56
59
|
VideoFormatType,
|
|
57
60
|
)
|
|
58
61
|
|
|
59
|
-
if sys.version_info >= (3, 9):
|
|
60
|
-
from builtins import dict as Dict
|
|
61
|
-
from builtins import list as List
|
|
62
|
-
from collections.abc import Mapping, Sequence
|
|
63
|
-
else:
|
|
64
|
-
from typing import Dict, List, Mapping, Sequence
|
|
65
62
|
if sys.version_info >= (3, 12):
|
|
66
63
|
from typing import Literal, NotRequired, TypedDict
|
|
67
64
|
else:
|
|
@@ -217,11 +214,13 @@ __all__ = (
|
|
|
217
214
|
"ResponseMetadataTypeDef",
|
|
218
215
|
"ResponseStreamTypeDef",
|
|
219
216
|
"S3LocationTypeDef",
|
|
217
|
+
"ServiceTierTypeDef",
|
|
220
218
|
"ServiceUnavailableExceptionTypeDef",
|
|
221
219
|
"SpecificToolChoiceTypeDef",
|
|
222
220
|
"StartAsyncInvokeRequestTypeDef",
|
|
223
221
|
"StartAsyncInvokeResponseTypeDef",
|
|
224
222
|
"SystemContentBlockTypeDef",
|
|
223
|
+
"SystemToolTypeDef",
|
|
225
224
|
"TagTypeDef",
|
|
226
225
|
"ThrottlingExceptionTypeDef",
|
|
227
226
|
"TimestampTypeDef",
|
|
@@ -229,7 +228,9 @@ __all__ = (
|
|
|
229
228
|
"ToolChoiceTypeDef",
|
|
230
229
|
"ToolConfigurationTypeDef",
|
|
231
230
|
"ToolInputSchemaTypeDef",
|
|
231
|
+
"ToolResultBlockDeltaTypeDef",
|
|
232
232
|
"ToolResultBlockOutputTypeDef",
|
|
233
|
+
"ToolResultBlockStartTypeDef",
|
|
233
234
|
"ToolResultBlockTypeDef",
|
|
234
235
|
"ToolResultBlockUnionTypeDef",
|
|
235
236
|
"ToolResultContentBlockOutputTypeDef",
|
|
@@ -249,6 +250,7 @@ __all__ = (
|
|
|
249
250
|
"VideoSourceOutputTypeDef",
|
|
250
251
|
"VideoSourceTypeDef",
|
|
251
252
|
"VideoSourceUnionTypeDef",
|
|
253
|
+
"WebLocationTypeDef",
|
|
252
254
|
)
|
|
253
255
|
|
|
254
256
|
|
|
@@ -271,7 +273,7 @@ class GuardrailUsageTypeDef(TypedDict):
|
|
|
271
273
|
class ResponseMetadataTypeDef(TypedDict):
|
|
272
274
|
RequestId: str
|
|
273
275
|
HTTPStatusCode: int
|
|
274
|
-
HTTPHeaders:
|
|
276
|
+
HTTPHeaders: dict[str, str]
|
|
275
277
|
RetryAttempts: int
|
|
276
278
|
HostId: NotRequired[str]
|
|
277
279
|
|
|
@@ -319,6 +321,11 @@ class DocumentPageLocationTypeDef(TypedDict):
|
|
|
319
321
|
end: NotRequired[int]
|
|
320
322
|
|
|
321
323
|
|
|
324
|
+
class WebLocationTypeDef(TypedDict):
|
|
325
|
+
url: NotRequired[str]
|
|
326
|
+
domain: NotRequired[str]
|
|
327
|
+
|
|
328
|
+
|
|
322
329
|
class CitationSourceContentTypeDef(TypedDict):
|
|
323
330
|
text: NotRequired[str]
|
|
324
331
|
|
|
@@ -337,6 +344,10 @@ class ReasoningContentBlockDeltaTypeDef(TypedDict):
|
|
|
337
344
|
signature: NotRequired[str]
|
|
338
345
|
|
|
339
346
|
|
|
347
|
+
class ToolResultBlockDeltaTypeDef(TypedDict):
|
|
348
|
+
text: NotRequired[str]
|
|
349
|
+
|
|
350
|
+
|
|
340
351
|
ToolUseBlockDeltaTypeDef = TypedDict(
|
|
341
352
|
"ToolUseBlockDeltaTypeDef",
|
|
342
353
|
{
|
|
@@ -348,14 +359,26 @@ ToolUseBlockOutputTypeDef = TypedDict(
|
|
|
348
359
|
{
|
|
349
360
|
"toolUseId": str,
|
|
350
361
|
"name": str,
|
|
351
|
-
"input":
|
|
362
|
+
"input": dict[str, Any],
|
|
363
|
+
"type": NotRequired[ToolUseTypeType],
|
|
364
|
+
},
|
|
365
|
+
)
|
|
366
|
+
ToolResultBlockStartTypeDef = TypedDict(
|
|
367
|
+
"ToolResultBlockStartTypeDef",
|
|
368
|
+
{
|
|
369
|
+
"toolUseId": str,
|
|
370
|
+
"type": NotRequired[str],
|
|
371
|
+
"status": NotRequired[ToolResultStatusType],
|
|
372
|
+
},
|
|
373
|
+
)
|
|
374
|
+
ToolUseBlockStartTypeDef = TypedDict(
|
|
375
|
+
"ToolUseBlockStartTypeDef",
|
|
376
|
+
{
|
|
377
|
+
"toolUseId": str,
|
|
378
|
+
"name": str,
|
|
379
|
+
"type": NotRequired[ToolUseTypeType],
|
|
352
380
|
},
|
|
353
381
|
)
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
class ToolUseBlockStartTypeDef(TypedDict):
|
|
357
|
-
toolUseId: str
|
|
358
|
-
name: str
|
|
359
382
|
|
|
360
383
|
|
|
361
384
|
class ContentBlockStopEventTypeDef(TypedDict):
|
|
@@ -387,6 +410,14 @@ class PromptVariableValuesTypeDef(TypedDict):
|
|
|
387
410
|
text: NotRequired[str]
|
|
388
411
|
|
|
389
412
|
|
|
413
|
+
ServiceTierTypeDef = TypedDict(
|
|
414
|
+
"ServiceTierTypeDef",
|
|
415
|
+
{
|
|
416
|
+
"type": ServiceTierTypeType,
|
|
417
|
+
},
|
|
418
|
+
)
|
|
419
|
+
|
|
420
|
+
|
|
390
421
|
class TokenUsageTypeDef(TypedDict):
|
|
391
422
|
inputTokens: int
|
|
392
423
|
outputTokens: int
|
|
@@ -409,7 +440,7 @@ class MessageStartEventTypeDef(TypedDict):
|
|
|
409
440
|
|
|
410
441
|
class MessageStopEventTypeDef(TypedDict):
|
|
411
442
|
stopReason: StopReasonType
|
|
412
|
-
additionalModelResponseFields: NotRequired[
|
|
443
|
+
additionalModelResponseFields: NotRequired[dict[str, Any]]
|
|
413
444
|
|
|
414
445
|
|
|
415
446
|
class ModelStreamErrorExceptionTypeDef(TypedDict):
|
|
@@ -497,7 +528,7 @@ GuardrailContextualGroundingFilterTypeDef = TypedDict(
|
|
|
497
528
|
|
|
498
529
|
class GuardrailConverseTextBlockOutputTypeDef(TypedDict):
|
|
499
530
|
text: str
|
|
500
|
-
qualifiers: NotRequired[
|
|
531
|
+
qualifiers: NotRequired[list[GuardrailConverseContentQualifierType]]
|
|
501
532
|
|
|
502
533
|
|
|
503
534
|
GuardrailConverseImageSourceOutputTypeDef = TypedDict(
|
|
@@ -601,6 +632,10 @@ class TagTypeDef(TypedDict):
|
|
|
601
632
|
value: str
|
|
602
633
|
|
|
603
634
|
|
|
635
|
+
class SystemToolTypeDef(TypedDict):
|
|
636
|
+
name: str
|
|
637
|
+
|
|
638
|
+
|
|
604
639
|
class ToolInputSchemaTypeDef(TypedDict):
|
|
605
640
|
json: NotRequired[Mapping[str, Any]]
|
|
606
641
|
|
|
@@ -611,6 +646,7 @@ ToolUseBlockTypeDef = TypedDict(
|
|
|
611
646
|
"toolUseId": str,
|
|
612
647
|
"name": str,
|
|
613
648
|
"input": Mapping[str, Any],
|
|
649
|
+
"type": NotRequired[ToolUseTypeType],
|
|
614
650
|
},
|
|
615
651
|
)
|
|
616
652
|
|
|
@@ -624,6 +660,7 @@ class InvokeModelResponseTypeDef(TypedDict):
|
|
|
624
660
|
body: StreamingBody
|
|
625
661
|
contentType: str
|
|
626
662
|
performanceConfigLatency: PerformanceConfigLatencyType
|
|
663
|
+
serviceTier: ServiceTierTypeType
|
|
627
664
|
ResponseMetadata: ResponseMetadataTypeDef
|
|
628
665
|
|
|
629
666
|
|
|
@@ -665,6 +702,7 @@ class InvokeModelRequestTypeDef(TypedDict):
|
|
|
665
702
|
guardrailIdentifier: NotRequired[str]
|
|
666
703
|
guardrailVersion: NotRequired[str]
|
|
667
704
|
performanceConfigLatency: NotRequired[PerformanceConfigLatencyType]
|
|
705
|
+
serviceTier: NotRequired[ServiceTierTypeType]
|
|
668
706
|
|
|
669
707
|
|
|
670
708
|
class InvokeModelTokensRequestTypeDef(TypedDict):
|
|
@@ -680,9 +718,11 @@ class InvokeModelWithResponseStreamRequestTypeDef(TypedDict):
|
|
|
680
718
|
guardrailIdentifier: NotRequired[str]
|
|
681
719
|
guardrailVersion: NotRequired[str]
|
|
682
720
|
performanceConfigLatency: NotRequired[PerformanceConfigLatencyType]
|
|
721
|
+
serviceTier: NotRequired[ServiceTierTypeType]
|
|
683
722
|
|
|
684
723
|
|
|
685
724
|
class CitationLocationTypeDef(TypedDict):
|
|
725
|
+
web: NotRequired[WebLocationTypeDef]
|
|
686
726
|
documentChar: NotRequired[DocumentCharLocationTypeDef]
|
|
687
727
|
documentPage: NotRequired[DocumentPageLocationTypeDef]
|
|
688
728
|
documentChunk: NotRequired[DocumentChunkLocationTypeDef]
|
|
@@ -690,6 +730,7 @@ class CitationLocationTypeDef(TypedDict):
|
|
|
690
730
|
|
|
691
731
|
class ContentBlockStartTypeDef(TypedDict):
|
|
692
732
|
toolUse: NotRequired[ToolUseBlockStartTypeDef]
|
|
733
|
+
toolResult: NotRequired[ToolResultBlockStartTypeDef]
|
|
693
734
|
|
|
694
735
|
|
|
695
736
|
DocumentSourceOutputTypeDef = TypedDict(
|
|
@@ -698,7 +739,7 @@ DocumentSourceOutputTypeDef = TypedDict(
|
|
|
698
739
|
"bytes": NotRequired[bytes],
|
|
699
740
|
"s3Location": NotRequired[S3LocationTypeDef],
|
|
700
741
|
"text": NotRequired[str],
|
|
701
|
-
"content": NotRequired[
|
|
742
|
+
"content": NotRequired[list[DocumentContentBlockTypeDef]],
|
|
702
743
|
},
|
|
703
744
|
)
|
|
704
745
|
DocumentSourceTypeDef = TypedDict(
|
|
@@ -742,30 +783,30 @@ GuardrailAutomatedReasoningLogicWarningTypeDef = TypedDict(
|
|
|
742
783
|
"GuardrailAutomatedReasoningLogicWarningTypeDef",
|
|
743
784
|
{
|
|
744
785
|
"type": NotRequired[GuardrailAutomatedReasoningLogicWarningTypeType],
|
|
745
|
-
"premises": NotRequired[
|
|
746
|
-
"claims": NotRequired[
|
|
786
|
+
"premises": NotRequired[list[GuardrailAutomatedReasoningStatementTypeDef]],
|
|
787
|
+
"claims": NotRequired[list[GuardrailAutomatedReasoningStatementTypeDef]],
|
|
747
788
|
},
|
|
748
789
|
)
|
|
749
790
|
|
|
750
791
|
|
|
751
792
|
class GuardrailAutomatedReasoningScenarioTypeDef(TypedDict):
|
|
752
|
-
statements: NotRequired[
|
|
793
|
+
statements: NotRequired[list[GuardrailAutomatedReasoningStatementTypeDef]]
|
|
753
794
|
|
|
754
795
|
|
|
755
796
|
class GuardrailAutomatedReasoningTranslationTypeDef(TypedDict):
|
|
756
|
-
premises: NotRequired[
|
|
757
|
-
claims: NotRequired[
|
|
758
|
-
untranslatedPremises: NotRequired[
|
|
759
|
-
untranslatedClaims: NotRequired[
|
|
797
|
+
premises: NotRequired[list[GuardrailAutomatedReasoningStatementTypeDef]]
|
|
798
|
+
claims: NotRequired[list[GuardrailAutomatedReasoningStatementTypeDef]]
|
|
799
|
+
untranslatedPremises: NotRequired[list[GuardrailAutomatedReasoningInputTextReferenceTypeDef]]
|
|
800
|
+
untranslatedClaims: NotRequired[list[GuardrailAutomatedReasoningInputTextReferenceTypeDef]]
|
|
760
801
|
confidence: NotRequired[float]
|
|
761
802
|
|
|
762
803
|
|
|
763
804
|
class GuardrailContentPolicyAssessmentTypeDef(TypedDict):
|
|
764
|
-
filters:
|
|
805
|
+
filters: list[GuardrailContentFilterTypeDef]
|
|
765
806
|
|
|
766
807
|
|
|
767
808
|
class GuardrailContextualGroundingPolicyAssessmentTypeDef(TypedDict):
|
|
768
|
-
filters: NotRequired[
|
|
809
|
+
filters: NotRequired[list[GuardrailContextualGroundingFilterTypeDef]]
|
|
769
810
|
|
|
770
811
|
|
|
771
812
|
GuardrailConverseImageBlockOutputTypeDef = TypedDict(
|
|
@@ -786,17 +827,17 @@ class GuardrailCoverageTypeDef(TypedDict):
|
|
|
786
827
|
|
|
787
828
|
|
|
788
829
|
class GuardrailWordPolicyAssessmentTypeDef(TypedDict):
|
|
789
|
-
customWords:
|
|
790
|
-
managedWordLists:
|
|
830
|
+
customWords: list[GuardrailCustomWordTypeDef]
|
|
831
|
+
managedWordLists: list[GuardrailManagedWordTypeDef]
|
|
791
832
|
|
|
792
833
|
|
|
793
834
|
class GuardrailSensitiveInformationPolicyAssessmentTypeDef(TypedDict):
|
|
794
|
-
piiEntities:
|
|
795
|
-
regexes:
|
|
835
|
+
piiEntities: list[GuardrailPiiEntityFilterTypeDef]
|
|
836
|
+
regexes: list[GuardrailRegexFilterTypeDef]
|
|
796
837
|
|
|
797
838
|
|
|
798
839
|
class GuardrailTopicPolicyAssessmentTypeDef(TypedDict):
|
|
799
|
-
topics:
|
|
840
|
+
topics: list[GuardrailTopicTypeDef]
|
|
800
841
|
|
|
801
842
|
|
|
802
843
|
class InvokeModelWithBidirectionalStreamOutputTypeDef(TypedDict):
|
|
@@ -918,7 +959,7 @@ GuardrailImageBlockTypeDef = TypedDict(
|
|
|
918
959
|
|
|
919
960
|
class CitationOutputTypeDef(TypedDict):
|
|
920
961
|
title: NotRequired[str]
|
|
921
|
-
sourceContent: NotRequired[
|
|
962
|
+
sourceContent: NotRequired[list[CitationSourceContentTypeDef]]
|
|
922
963
|
location: NotRequired[CitationLocationTypeDef]
|
|
923
964
|
|
|
924
965
|
|
|
@@ -930,7 +971,7 @@ class CitationTypeDef(TypedDict):
|
|
|
930
971
|
|
|
931
972
|
class CitationsDeltaTypeDef(TypedDict):
|
|
932
973
|
title: NotRequired[str]
|
|
933
|
-
sourceContent: NotRequired[
|
|
974
|
+
sourceContent: NotRequired[list[CitationSourceContentDeltaTypeDef]]
|
|
934
975
|
location: NotRequired[CitationLocationTypeDef]
|
|
935
976
|
|
|
936
977
|
|
|
@@ -970,13 +1011,13 @@ VideoSourceUnionTypeDef = Union[VideoSourceTypeDef, VideoSourceOutputTypeDef]
|
|
|
970
1011
|
|
|
971
1012
|
class GuardrailAutomatedReasoningImpossibleFindingTypeDef(TypedDict):
|
|
972
1013
|
translation: NotRequired[GuardrailAutomatedReasoningTranslationTypeDef]
|
|
973
|
-
contradictingRules: NotRequired[
|
|
1014
|
+
contradictingRules: NotRequired[list[GuardrailAutomatedReasoningRuleTypeDef]]
|
|
974
1015
|
logicWarning: NotRequired[GuardrailAutomatedReasoningLogicWarningTypeDef]
|
|
975
1016
|
|
|
976
1017
|
|
|
977
1018
|
class GuardrailAutomatedReasoningInvalidFindingTypeDef(TypedDict):
|
|
978
1019
|
translation: NotRequired[GuardrailAutomatedReasoningTranslationTypeDef]
|
|
979
|
-
contradictingRules: NotRequired[
|
|
1020
|
+
contradictingRules: NotRequired[list[GuardrailAutomatedReasoningRuleTypeDef]]
|
|
980
1021
|
logicWarning: NotRequired[GuardrailAutomatedReasoningLogicWarningTypeDef]
|
|
981
1022
|
|
|
982
1023
|
|
|
@@ -988,13 +1029,13 @@ class GuardrailAutomatedReasoningSatisfiableFindingTypeDef(TypedDict):
|
|
|
988
1029
|
|
|
989
1030
|
|
|
990
1031
|
class GuardrailAutomatedReasoningTranslationOptionTypeDef(TypedDict):
|
|
991
|
-
translations: NotRequired[
|
|
1032
|
+
translations: NotRequired[list[GuardrailAutomatedReasoningTranslationTypeDef]]
|
|
992
1033
|
|
|
993
1034
|
|
|
994
1035
|
class GuardrailAutomatedReasoningValidFindingTypeDef(TypedDict):
|
|
995
1036
|
translation: NotRequired[GuardrailAutomatedReasoningTranslationTypeDef]
|
|
996
1037
|
claimsTrueScenario: NotRequired[GuardrailAutomatedReasoningScenarioTypeDef]
|
|
997
|
-
supportingRules: NotRequired[
|
|
1038
|
+
supportingRules: NotRequired[list[GuardrailAutomatedReasoningRuleTypeDef]]
|
|
998
1039
|
logicWarning: NotRequired[GuardrailAutomatedReasoningLogicWarningTypeDef]
|
|
999
1040
|
|
|
1000
1041
|
|
|
@@ -1018,6 +1059,7 @@ class InvokeModelWithResponseStreamResponseTypeDef(TypedDict):
|
|
|
1018
1059
|
body: EventStream[ResponseStreamTypeDef]
|
|
1019
1060
|
contentType: str
|
|
1020
1061
|
performanceConfigLatency: PerformanceConfigLatencyType
|
|
1062
|
+
serviceTier: ServiceTierTypeType
|
|
1021
1063
|
ResponseMetadata: ResponseMetadataTypeDef
|
|
1022
1064
|
|
|
1023
1065
|
|
|
@@ -1028,11 +1070,12 @@ ReasoningContentBlockUnionTypeDef = Union[
|
|
|
1028
1070
|
|
|
1029
1071
|
class ToolTypeDef(TypedDict):
|
|
1030
1072
|
toolSpec: NotRequired[ToolSpecificationTypeDef]
|
|
1073
|
+
systemTool: NotRequired[SystemToolTypeDef]
|
|
1031
1074
|
cachePoint: NotRequired[CachePointBlockTypeDef]
|
|
1032
1075
|
|
|
1033
1076
|
|
|
1034
1077
|
class ListAsyncInvokesResponseTypeDef(TypedDict):
|
|
1035
|
-
asyncInvokeSummaries:
|
|
1078
|
+
asyncInvokeSummaries: list[AsyncInvokeSummaryTypeDef]
|
|
1036
1079
|
ResponseMetadata: ResponseMetadataTypeDef
|
|
1037
1080
|
nextToken: NotRequired[str]
|
|
1038
1081
|
|
|
@@ -1057,8 +1100,8 @@ class GuardrailContentBlockTypeDef(TypedDict):
|
|
|
1057
1100
|
|
|
1058
1101
|
|
|
1059
1102
|
class CitationsContentBlockOutputTypeDef(TypedDict):
|
|
1060
|
-
content: NotRequired[
|
|
1061
|
-
citations: NotRequired[
|
|
1103
|
+
content: NotRequired[list[CitationGeneratedContentTypeDef]]
|
|
1104
|
+
citations: NotRequired[list[CitationOutputTypeDef]]
|
|
1062
1105
|
|
|
1063
1106
|
|
|
1064
1107
|
CitationUnionTypeDef = Union[CitationTypeDef, CitationOutputTypeDef]
|
|
@@ -1067,6 +1110,7 @@ CitationUnionTypeDef = Union[CitationTypeDef, CitationOutputTypeDef]
|
|
|
1067
1110
|
class ContentBlockDeltaTypeDef(TypedDict):
|
|
1068
1111
|
text: NotRequired[str]
|
|
1069
1112
|
toolUse: NotRequired[ToolUseBlockDeltaTypeDef]
|
|
1113
|
+
toolResult: NotRequired[list[ToolResultBlockDeltaTypeDef]]
|
|
1070
1114
|
reasoningContent: NotRequired[ReasoningContentBlockDeltaTypeDef]
|
|
1071
1115
|
citation: NotRequired[CitationsDeltaTypeDef]
|
|
1072
1116
|
|
|
@@ -1091,7 +1135,7 @@ ImageBlockTypeDef = TypedDict(
|
|
|
1091
1135
|
|
|
1092
1136
|
|
|
1093
1137
|
class ToolResultContentBlockOutputTypeDef(TypedDict):
|
|
1094
|
-
json: NotRequired[
|
|
1138
|
+
json: NotRequired[dict[str, Any]]
|
|
1095
1139
|
text: NotRequired[str]
|
|
1096
1140
|
image: NotRequired[ImageBlockOutputTypeDef]
|
|
1097
1141
|
document: NotRequired[DocumentBlockOutputTypeDef]
|
|
@@ -1108,8 +1152,8 @@ VideoBlockTypeDef = TypedDict(
|
|
|
1108
1152
|
|
|
1109
1153
|
|
|
1110
1154
|
class GuardrailAutomatedReasoningTranslationAmbiguousFindingTypeDef(TypedDict):
|
|
1111
|
-
options: NotRequired[
|
|
1112
|
-
differenceScenarios: NotRequired[
|
|
1155
|
+
options: NotRequired[list[GuardrailAutomatedReasoningTranslationOptionTypeDef]]
|
|
1156
|
+
differenceScenarios: NotRequired[list[GuardrailAutomatedReasoningScenarioTypeDef]]
|
|
1113
1157
|
|
|
1114
1158
|
|
|
1115
1159
|
class ToolConfigurationTypeDef(TypedDict):
|
|
@@ -1142,14 +1186,15 @@ class ContentBlockDeltaEventTypeDef(TypedDict):
|
|
|
1142
1186
|
|
|
1143
1187
|
DocumentBlockUnionTypeDef = Union[DocumentBlockTypeDef, DocumentBlockOutputTypeDef]
|
|
1144
1188
|
ImageBlockUnionTypeDef = Union[ImageBlockTypeDef, ImageBlockOutputTypeDef]
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1189
|
+
ToolResultBlockOutputTypeDef = TypedDict(
|
|
1190
|
+
"ToolResultBlockOutputTypeDef",
|
|
1191
|
+
{
|
|
1192
|
+
"toolUseId": str,
|
|
1193
|
+
"content": list[ToolResultContentBlockOutputTypeDef],
|
|
1194
|
+
"status": NotRequired[ToolResultStatusType],
|
|
1195
|
+
"type": NotRequired[str],
|
|
1196
|
+
},
|
|
1197
|
+
)
|
|
1153
1198
|
VideoBlockUnionTypeDef = Union[VideoBlockTypeDef, VideoBlockOutputTypeDef]
|
|
1154
1199
|
|
|
1155
1200
|
|
|
@@ -1159,8 +1204,8 @@ class GuardrailAutomatedReasoningFindingTypeDef(TypedDict):
|
|
|
1159
1204
|
satisfiable: NotRequired[GuardrailAutomatedReasoningSatisfiableFindingTypeDef]
|
|
1160
1205
|
impossible: NotRequired[GuardrailAutomatedReasoningImpossibleFindingTypeDef]
|
|
1161
1206
|
translationAmbiguous: NotRequired[GuardrailAutomatedReasoningTranslationAmbiguousFindingTypeDef]
|
|
1162
|
-
tooComplex: NotRequired[
|
|
1163
|
-
noTranslations: NotRequired[
|
|
1207
|
+
tooComplex: NotRequired[dict[str, Any]]
|
|
1208
|
+
noTranslations: NotRequired[dict[str, Any]]
|
|
1164
1209
|
|
|
1165
1210
|
|
|
1166
1211
|
class GuardrailConverseContentBlockTypeDef(TypedDict):
|
|
@@ -1195,7 +1240,7 @@ class ToolResultContentBlockTypeDef(TypedDict):
|
|
|
1195
1240
|
|
|
1196
1241
|
|
|
1197
1242
|
class GuardrailAutomatedReasoningPolicyAssessmentTypeDef(TypedDict):
|
|
1198
|
-
findings: NotRequired[
|
|
1243
|
+
findings: NotRequired[list[GuardrailAutomatedReasoningFindingTypeDef]]
|
|
1199
1244
|
|
|
1200
1245
|
|
|
1201
1246
|
GuardrailConverseContentBlockUnionTypeDef = Union[
|
|
@@ -1205,7 +1250,7 @@ GuardrailConverseContentBlockUnionTypeDef = Union[
|
|
|
1205
1250
|
|
|
1206
1251
|
class MessageOutputTypeDef(TypedDict):
|
|
1207
1252
|
role: ConversationRoleType
|
|
1208
|
-
content:
|
|
1253
|
+
content: list[ContentBlockOutputTypeDef]
|
|
1209
1254
|
|
|
1210
1255
|
|
|
1211
1256
|
ToolResultContentBlockUnionTypeDef = Union[
|
|
@@ -1233,26 +1278,31 @@ class ConverseOutputTypeDef(TypedDict):
|
|
|
1233
1278
|
message: NotRequired[MessageOutputTypeDef]
|
|
1234
1279
|
|
|
1235
1280
|
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1281
|
+
ToolResultBlockTypeDef = TypedDict(
|
|
1282
|
+
"ToolResultBlockTypeDef",
|
|
1283
|
+
{
|
|
1284
|
+
"toolUseId": str,
|
|
1285
|
+
"content": Sequence[ToolResultContentBlockUnionTypeDef],
|
|
1286
|
+
"status": NotRequired[ToolResultStatusType],
|
|
1287
|
+
"type": NotRequired[str],
|
|
1288
|
+
},
|
|
1289
|
+
)
|
|
1240
1290
|
|
|
1241
1291
|
|
|
1242
1292
|
class ApplyGuardrailResponseTypeDef(TypedDict):
|
|
1243
1293
|
usage: GuardrailUsageTypeDef
|
|
1244
1294
|
action: GuardrailActionType
|
|
1245
1295
|
actionReason: str
|
|
1246
|
-
outputs:
|
|
1247
|
-
assessments:
|
|
1296
|
+
outputs: list[GuardrailOutputContentTypeDef]
|
|
1297
|
+
assessments: list[GuardrailAssessmentTypeDef]
|
|
1248
1298
|
guardrailCoverage: GuardrailCoverageTypeDef
|
|
1249
1299
|
ResponseMetadata: ResponseMetadataTypeDef
|
|
1250
1300
|
|
|
1251
1301
|
|
|
1252
1302
|
class GuardrailTraceAssessmentTypeDef(TypedDict):
|
|
1253
|
-
modelOutput: NotRequired[
|
|
1254
|
-
inputAssessment: NotRequired[
|
|
1255
|
-
outputAssessments: NotRequired[
|
|
1303
|
+
modelOutput: NotRequired[list[str]]
|
|
1304
|
+
inputAssessment: NotRequired[dict[str, GuardrailAssessmentTypeDef]]
|
|
1305
|
+
outputAssessments: NotRequired[dict[str, list[GuardrailAssessmentTypeDef]]]
|
|
1256
1306
|
actionReason: NotRequired[str]
|
|
1257
1307
|
|
|
1258
1308
|
|
|
@@ -1287,6 +1337,7 @@ class ConverseStreamMetadataEventTypeDef(TypedDict):
|
|
|
1287
1337
|
metrics: ConverseStreamMetricsTypeDef
|
|
1288
1338
|
trace: NotRequired[ConverseStreamTraceTypeDef]
|
|
1289
1339
|
performanceConfig: NotRequired[PerformanceConfigurationTypeDef]
|
|
1340
|
+
serviceTier: NotRequired[ServiceTierTypeDef]
|
|
1290
1341
|
|
|
1291
1342
|
|
|
1292
1343
|
class ConverseResponseTypeDef(TypedDict):
|
|
@@ -1294,9 +1345,10 @@ class ConverseResponseTypeDef(TypedDict):
|
|
|
1294
1345
|
stopReason: StopReasonType
|
|
1295
1346
|
usage: TokenUsageTypeDef
|
|
1296
1347
|
metrics: ConverseMetricsTypeDef
|
|
1297
|
-
additionalModelResponseFields:
|
|
1348
|
+
additionalModelResponseFields: dict[str, Any]
|
|
1298
1349
|
trace: ConverseTraceTypeDef
|
|
1299
1350
|
performanceConfig: PerformanceConfigurationTypeDef
|
|
1351
|
+
serviceTier: ServiceTierTypeDef
|
|
1300
1352
|
ResponseMetadata: ResponseMetadataTypeDef
|
|
1301
1353
|
|
|
1302
1354
|
|
|
@@ -1342,6 +1394,7 @@ class ConverseRequestTypeDef(TypedDict):
|
|
|
1342
1394
|
additionalModelResponseFieldPaths: NotRequired[Sequence[str]]
|
|
1343
1395
|
requestMetadata: NotRequired[Mapping[str, str]]
|
|
1344
1396
|
performanceConfig: NotRequired[PerformanceConfigurationTypeDef]
|
|
1397
|
+
serviceTier: NotRequired[ServiceTierTypeDef]
|
|
1345
1398
|
|
|
1346
1399
|
|
|
1347
1400
|
class ConverseStreamRequestTypeDef(TypedDict):
|
|
@@ -1356,11 +1409,14 @@ class ConverseStreamRequestTypeDef(TypedDict):
|
|
|
1356
1409
|
additionalModelResponseFieldPaths: NotRequired[Sequence[str]]
|
|
1357
1410
|
requestMetadata: NotRequired[Mapping[str, str]]
|
|
1358
1411
|
performanceConfig: NotRequired[PerformanceConfigurationTypeDef]
|
|
1412
|
+
serviceTier: NotRequired[ServiceTierTypeDef]
|
|
1359
1413
|
|
|
1360
1414
|
|
|
1361
1415
|
class ConverseTokensRequestTypeDef(TypedDict):
|
|
1362
1416
|
messages: NotRequired[Sequence[MessageUnionTypeDef]]
|
|
1363
1417
|
system: NotRequired[Sequence[SystemContentBlockTypeDef]]
|
|
1418
|
+
toolConfig: NotRequired[ToolConfigurationTypeDef]
|
|
1419
|
+
additionalModelRequestFields: NotRequired[Mapping[str, Any]]
|
|
1364
1420
|
|
|
1365
1421
|
|
|
1366
1422
|
class CountTokensInputTypeDef(TypedDict):
|