types-boto3-bedrock-runtime 1.35.73__py3-none-any.whl → 1.35.75__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/__init__.py +5 -1
- types_boto3_bedrock_runtime/__init__.pyi +5 -1
- types_boto3_bedrock_runtime/__main__.py +3 -3
- types_boto3_bedrock_runtime/client.py +50 -2
- types_boto3_bedrock_runtime/client.pyi +50 -2
- types_boto3_bedrock_runtime/literals.py +22 -2
- types_boto3_bedrock_runtime/literals.pyi +22 -2
- types_boto3_bedrock_runtime/paginator.py +66 -0
- types_boto3_bedrock_runtime/paginator.pyi +61 -0
- types_boto3_bedrock_runtime/type_defs.py +303 -59
- types_boto3_bedrock_runtime/type_defs.pyi +272 -52
- types_boto3_bedrock_runtime/version.py +1 -1
- {types_boto3_bedrock_runtime-1.35.73.dist-info → types_boto3_bedrock_runtime-1.35.75.dist-info}/METADATA +26 -5
- types_boto3_bedrock_runtime-1.35.75.dist-info/RECORD +18 -0
- types_boto3_bedrock_runtime-1.35.73.dist-info/RECORD +0 -16
- {types_boto3_bedrock_runtime-1.35.73.dist-info → types_boto3_bedrock_runtime-1.35.75.dist-info}/LICENSE +0 -0
- {types_boto3_bedrock_runtime-1.35.73.dist-info → types_boto3_bedrock_runtime-1.35.75.dist-info}/WHEEL +0 -0
- {types_boto3_bedrock_runtime-1.35.73.dist-info → types_boto3_bedrock_runtime-1.35.75.dist-info}/top_level.txt +0 -0
|
@@ -15,12 +15,14 @@ Copyright 2024 Vlad Emelianov
|
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
17
|
import sys
|
|
18
|
+
from datetime import datetime
|
|
18
19
|
from typing import IO, Any, Dict, List, Mapping, Sequence, Union
|
|
19
20
|
|
|
20
21
|
from botocore.eventstream import EventStream
|
|
21
22
|
from botocore.response import StreamingBody
|
|
22
23
|
|
|
23
24
|
from .literals import (
|
|
25
|
+
AsyncInvokeStatusType,
|
|
24
26
|
ConversationRoleType,
|
|
25
27
|
DocumentFormatType,
|
|
26
28
|
GuardrailActionType,
|
|
@@ -32,15 +34,19 @@ from .literals import (
|
|
|
32
34
|
GuardrailContextualGroundingFilterTypeType,
|
|
33
35
|
GuardrailContextualGroundingPolicyActionType,
|
|
34
36
|
GuardrailConverseContentQualifierType,
|
|
37
|
+
GuardrailConverseImageFormatType,
|
|
38
|
+
GuardrailImageFormatType,
|
|
35
39
|
GuardrailPiiEntityTypeType,
|
|
36
40
|
GuardrailSensitiveInformationPolicyActionType,
|
|
37
41
|
GuardrailStreamProcessingModeType,
|
|
38
42
|
GuardrailTraceType,
|
|
39
43
|
ImageFormatType,
|
|
40
44
|
PerformanceConfigLatencyType,
|
|
45
|
+
SortOrderType,
|
|
41
46
|
StopReasonType,
|
|
42
47
|
ToolResultStatusType,
|
|
43
48
|
TraceType,
|
|
49
|
+
VideoFormatType,
|
|
44
50
|
)
|
|
45
51
|
|
|
46
52
|
if sys.version_info >= (3, 12):
|
|
@@ -52,6 +58,9 @@ else:
|
|
|
52
58
|
__all__ = (
|
|
53
59
|
"ApplyGuardrailRequestRequestTypeDef",
|
|
54
60
|
"ApplyGuardrailResponseTypeDef",
|
|
61
|
+
"AsyncInvokeOutputDataConfigTypeDef",
|
|
62
|
+
"AsyncInvokeS3OutputDataConfigTypeDef",
|
|
63
|
+
"AsyncInvokeSummaryTypeDef",
|
|
55
64
|
"BlobTypeDef",
|
|
56
65
|
"ContentBlockDeltaEventTypeDef",
|
|
57
66
|
"ContentBlockDeltaTypeDef",
|
|
@@ -78,6 +87,8 @@ __all__ = (
|
|
|
78
87
|
"DocumentSourceOutputTypeDef",
|
|
79
88
|
"DocumentSourceTypeDef",
|
|
80
89
|
"DocumentSourceUnionTypeDef",
|
|
90
|
+
"GetAsyncInvokeRequestRequestTypeDef",
|
|
91
|
+
"GetAsyncInvokeResponseTypeDef",
|
|
81
92
|
"GuardrailAssessmentTypeDef",
|
|
82
93
|
"GuardrailConfigurationTypeDef",
|
|
83
94
|
"GuardrailContentBlockTypeDef",
|
|
@@ -88,11 +99,20 @@ __all__ = (
|
|
|
88
99
|
"GuardrailConverseContentBlockOutputTypeDef",
|
|
89
100
|
"GuardrailConverseContentBlockTypeDef",
|
|
90
101
|
"GuardrailConverseContentBlockUnionTypeDef",
|
|
102
|
+
"GuardrailConverseImageBlockOutputTypeDef",
|
|
103
|
+
"GuardrailConverseImageBlockTypeDef",
|
|
104
|
+
"GuardrailConverseImageBlockUnionTypeDef",
|
|
105
|
+
"GuardrailConverseImageSourceOutputTypeDef",
|
|
106
|
+
"GuardrailConverseImageSourceTypeDef",
|
|
107
|
+
"GuardrailConverseImageSourceUnionTypeDef",
|
|
91
108
|
"GuardrailConverseTextBlockOutputTypeDef",
|
|
92
109
|
"GuardrailConverseTextBlockTypeDef",
|
|
93
110
|
"GuardrailConverseTextBlockUnionTypeDef",
|
|
94
111
|
"GuardrailCoverageTypeDef",
|
|
95
112
|
"GuardrailCustomWordTypeDef",
|
|
113
|
+
"GuardrailImageBlockTypeDef",
|
|
114
|
+
"GuardrailImageCoverageTypeDef",
|
|
115
|
+
"GuardrailImageSourceTypeDef",
|
|
96
116
|
"GuardrailInvocationMetricsTypeDef",
|
|
97
117
|
"GuardrailManagedWordTypeDef",
|
|
98
118
|
"GuardrailOutputContentTypeDef",
|
|
@@ -119,6 +139,9 @@ __all__ = (
|
|
|
119
139
|
"InvokeModelResponseTypeDef",
|
|
120
140
|
"InvokeModelWithResponseStreamRequestRequestTypeDef",
|
|
121
141
|
"InvokeModelWithResponseStreamResponseTypeDef",
|
|
142
|
+
"ListAsyncInvokesRequestListAsyncInvokesPaginateTypeDef",
|
|
143
|
+
"ListAsyncInvokesRequestRequestTypeDef",
|
|
144
|
+
"ListAsyncInvokesResponseTypeDef",
|
|
122
145
|
"MessageOutputTypeDef",
|
|
123
146
|
"MessageStartEventTypeDef",
|
|
124
147
|
"MessageStopEventTypeDef",
|
|
@@ -126,15 +149,22 @@ __all__ = (
|
|
|
126
149
|
"MessageUnionTypeDef",
|
|
127
150
|
"ModelStreamErrorExceptionTypeDef",
|
|
128
151
|
"ModelTimeoutExceptionTypeDef",
|
|
152
|
+
"PaginatorConfigTypeDef",
|
|
129
153
|
"PayloadPartTypeDef",
|
|
130
154
|
"PerformanceConfigurationTypeDef",
|
|
155
|
+
"PromptRouterTraceTypeDef",
|
|
131
156
|
"PromptVariableValuesTypeDef",
|
|
132
157
|
"ResponseMetadataTypeDef",
|
|
133
158
|
"ResponseStreamTypeDef",
|
|
159
|
+
"S3LocationTypeDef",
|
|
134
160
|
"ServiceUnavailableExceptionTypeDef",
|
|
135
161
|
"SpecificToolChoiceTypeDef",
|
|
162
|
+
"StartAsyncInvokeRequestRequestTypeDef",
|
|
163
|
+
"StartAsyncInvokeResponseTypeDef",
|
|
136
164
|
"SystemContentBlockTypeDef",
|
|
165
|
+
"TagTypeDef",
|
|
137
166
|
"ThrottlingExceptionTypeDef",
|
|
167
|
+
"TimestampTypeDef",
|
|
138
168
|
"TokenUsageTypeDef",
|
|
139
169
|
"ToolChoiceTypeDef",
|
|
140
170
|
"ToolConfigurationTypeDef",
|
|
@@ -153,6 +183,12 @@ __all__ = (
|
|
|
153
183
|
"ToolUseBlockTypeDef",
|
|
154
184
|
"ToolUseBlockUnionTypeDef",
|
|
155
185
|
"ValidationExceptionTypeDef",
|
|
186
|
+
"VideoBlockOutputTypeDef",
|
|
187
|
+
"VideoBlockTypeDef",
|
|
188
|
+
"VideoBlockUnionTypeDef",
|
|
189
|
+
"VideoSourceOutputTypeDef",
|
|
190
|
+
"VideoSourceTypeDef",
|
|
191
|
+
"VideoSourceUnionTypeDef",
|
|
156
192
|
)
|
|
157
193
|
|
|
158
194
|
|
|
@@ -177,6 +213,12 @@ class ResponseMetadataTypeDef(TypedDict):
|
|
|
177
213
|
HostId: NotRequired[str]
|
|
178
214
|
|
|
179
215
|
|
|
216
|
+
class AsyncInvokeS3OutputDataConfigTypeDef(TypedDict):
|
|
217
|
+
s3Uri: str
|
|
218
|
+
kmsKeyId: NotRequired[str]
|
|
219
|
+
bucketOwner: NotRequired[str]
|
|
220
|
+
|
|
221
|
+
|
|
180
222
|
BlobTypeDef = Union[str, bytes, IO[Any], StreamingBody]
|
|
181
223
|
ToolUseBlockDeltaTypeDef = TypedDict(
|
|
182
224
|
"ToolUseBlockDeltaTypeDef",
|
|
@@ -276,6 +318,10 @@ class GuardrailStreamConfigurationTypeDef(TypedDict):
|
|
|
276
318
|
streamProcessingMode: NotRequired[GuardrailStreamProcessingModeType]
|
|
277
319
|
|
|
278
320
|
|
|
321
|
+
class PromptRouterTraceTypeDef(TypedDict):
|
|
322
|
+
invokedModelId: NotRequired[str]
|
|
323
|
+
|
|
324
|
+
|
|
279
325
|
DocumentSourceOutputTypeDef = TypedDict(
|
|
280
326
|
"DocumentSourceOutputTypeDef",
|
|
281
327
|
{
|
|
@@ -284,6 +330,10 @@ DocumentSourceOutputTypeDef = TypedDict(
|
|
|
284
330
|
)
|
|
285
331
|
|
|
286
332
|
|
|
333
|
+
class GetAsyncInvokeRequestRequestTypeDef(TypedDict):
|
|
334
|
+
invocationArn: str
|
|
335
|
+
|
|
336
|
+
|
|
287
337
|
class GuardrailTextBlockTypeDef(TypedDict):
|
|
288
338
|
text: str
|
|
289
339
|
qualifiers: NotRequired[Sequence[GuardrailContentQualifierType]]
|
|
@@ -314,11 +364,24 @@ class GuardrailConverseTextBlockOutputTypeDef(TypedDict):
|
|
|
314
364
|
qualifiers: NotRequired[List[GuardrailConverseContentQualifierType]]
|
|
315
365
|
|
|
316
366
|
|
|
367
|
+
GuardrailConverseImageSourceOutputTypeDef = TypedDict(
|
|
368
|
+
"GuardrailConverseImageSourceOutputTypeDef",
|
|
369
|
+
{
|
|
370
|
+
"bytes": NotRequired[bytes],
|
|
371
|
+
},
|
|
372
|
+
)
|
|
373
|
+
|
|
374
|
+
|
|
317
375
|
class GuardrailConverseTextBlockTypeDef(TypedDict):
|
|
318
376
|
text: str
|
|
319
377
|
qualifiers: NotRequired[Sequence[GuardrailConverseContentQualifierType]]
|
|
320
378
|
|
|
321
379
|
|
|
380
|
+
class GuardrailImageCoverageTypeDef(TypedDict):
|
|
381
|
+
guarded: NotRequired[int]
|
|
382
|
+
total: NotRequired[int]
|
|
383
|
+
|
|
384
|
+
|
|
322
385
|
class GuardrailTextCharactersCoverageTypeDef(TypedDict):
|
|
323
386
|
guarded: NotRequired[int]
|
|
324
387
|
total: NotRequired[int]
|
|
@@ -370,6 +433,15 @@ ImageSourceOutputTypeDef = TypedDict(
|
|
|
370
433
|
)
|
|
371
434
|
|
|
372
435
|
|
|
436
|
+
class PaginatorConfigTypeDef(TypedDict):
|
|
437
|
+
MaxItems: NotRequired[int]
|
|
438
|
+
PageSize: NotRequired[int]
|
|
439
|
+
StartingToken: NotRequired[str]
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
TimestampTypeDef = Union[datetime, str]
|
|
443
|
+
|
|
444
|
+
|
|
373
445
|
class ModelTimeoutExceptionTypeDef(TypedDict):
|
|
374
446
|
message: NotRequired[str]
|
|
375
447
|
|
|
@@ -382,10 +454,20 @@ PayloadPartTypeDef = TypedDict(
|
|
|
382
454
|
)
|
|
383
455
|
|
|
384
456
|
|
|
457
|
+
class S3LocationTypeDef(TypedDict):
|
|
458
|
+
uri: str
|
|
459
|
+
bucketOwner: NotRequired[str]
|
|
460
|
+
|
|
461
|
+
|
|
385
462
|
class SpecificToolChoiceTypeDef(TypedDict):
|
|
386
463
|
name: str
|
|
387
464
|
|
|
388
465
|
|
|
466
|
+
class TagTypeDef(TypedDict):
|
|
467
|
+
key: str
|
|
468
|
+
value: str
|
|
469
|
+
|
|
470
|
+
|
|
389
471
|
class ToolInputSchemaTypeDef(TypedDict):
|
|
390
472
|
json: NotRequired[Mapping[str, Any]]
|
|
391
473
|
|
|
@@ -407,12 +489,33 @@ class InvokeModelResponseTypeDef(TypedDict):
|
|
|
407
489
|
ResponseMetadata: ResponseMetadataTypeDef
|
|
408
490
|
|
|
409
491
|
|
|
492
|
+
class StartAsyncInvokeResponseTypeDef(TypedDict):
|
|
493
|
+
invocationArn: str
|
|
494
|
+
ResponseMetadata: ResponseMetadataTypeDef
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
class AsyncInvokeOutputDataConfigTypeDef(TypedDict):
|
|
498
|
+
s3OutputDataConfig: NotRequired[AsyncInvokeS3OutputDataConfigTypeDef]
|
|
499
|
+
|
|
500
|
+
|
|
410
501
|
DocumentSourceTypeDef = TypedDict(
|
|
411
502
|
"DocumentSourceTypeDef",
|
|
412
503
|
{
|
|
413
504
|
"bytes": NotRequired[BlobTypeDef],
|
|
414
505
|
},
|
|
415
506
|
)
|
|
507
|
+
GuardrailConverseImageSourceTypeDef = TypedDict(
|
|
508
|
+
"GuardrailConverseImageSourceTypeDef",
|
|
509
|
+
{
|
|
510
|
+
"bytes": NotRequired[BlobTypeDef],
|
|
511
|
+
},
|
|
512
|
+
)
|
|
513
|
+
GuardrailImageSourceTypeDef = TypedDict(
|
|
514
|
+
"GuardrailImageSourceTypeDef",
|
|
515
|
+
{
|
|
516
|
+
"bytes": NotRequired[BlobTypeDef],
|
|
517
|
+
},
|
|
518
|
+
)
|
|
416
519
|
ImageSourceTypeDef = TypedDict(
|
|
417
520
|
"ImageSourceTypeDef",
|
|
418
521
|
{
|
|
@@ -462,10 +565,6 @@ DocumentBlockOutputTypeDef = TypedDict(
|
|
|
462
565
|
)
|
|
463
566
|
|
|
464
567
|
|
|
465
|
-
class GuardrailContentBlockTypeDef(TypedDict):
|
|
466
|
-
text: NotRequired[GuardrailTextBlockTypeDef]
|
|
467
|
-
|
|
468
|
-
|
|
469
568
|
class GuardrailContentPolicyAssessmentTypeDef(TypedDict):
|
|
470
569
|
filters: List[GuardrailContentFilterTypeDef]
|
|
471
570
|
|
|
@@ -474,10 +573,13 @@ class GuardrailContextualGroundingPolicyAssessmentTypeDef(TypedDict):
|
|
|
474
573
|
filters: NotRequired[List[GuardrailContextualGroundingFilterTypeDef]]
|
|
475
574
|
|
|
476
575
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
576
|
+
GuardrailConverseImageBlockOutputTypeDef = TypedDict(
|
|
577
|
+
"GuardrailConverseImageBlockOutputTypeDef",
|
|
578
|
+
{
|
|
579
|
+
"format": GuardrailConverseImageFormatType,
|
|
580
|
+
"source": GuardrailConverseImageSourceOutputTypeDef,
|
|
581
|
+
},
|
|
582
|
+
)
|
|
481
583
|
GuardrailConverseTextBlockUnionTypeDef = Union[
|
|
482
584
|
GuardrailConverseTextBlockTypeDef, GuardrailConverseTextBlockOutputTypeDef
|
|
483
585
|
]
|
|
@@ -485,6 +587,7 @@ GuardrailConverseTextBlockUnionTypeDef = Union[
|
|
|
485
587
|
|
|
486
588
|
class GuardrailCoverageTypeDef(TypedDict):
|
|
487
589
|
textCharacters: NotRequired[GuardrailTextCharactersCoverageTypeDef]
|
|
590
|
+
images: NotRequired[GuardrailImageCoverageTypeDef]
|
|
488
591
|
|
|
489
592
|
|
|
490
593
|
class GuardrailWordPolicyAssessmentTypeDef(TypedDict):
|
|
@@ -510,6 +613,25 @@ ImageBlockOutputTypeDef = TypedDict(
|
|
|
510
613
|
)
|
|
511
614
|
|
|
512
615
|
|
|
616
|
+
class ListAsyncInvokesRequestListAsyncInvokesPaginateTypeDef(TypedDict):
|
|
617
|
+
submitTimeAfter: NotRequired[TimestampTypeDef]
|
|
618
|
+
submitTimeBefore: NotRequired[TimestampTypeDef]
|
|
619
|
+
statusEquals: NotRequired[AsyncInvokeStatusType]
|
|
620
|
+
sortBy: NotRequired[Literal["SubmissionTime"]]
|
|
621
|
+
sortOrder: NotRequired[SortOrderType]
|
|
622
|
+
PaginationConfig: NotRequired[PaginatorConfigTypeDef]
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
class ListAsyncInvokesRequestRequestTypeDef(TypedDict):
|
|
626
|
+
submitTimeAfter: NotRequired[TimestampTypeDef]
|
|
627
|
+
submitTimeBefore: NotRequired[TimestampTypeDef]
|
|
628
|
+
statusEquals: NotRequired[AsyncInvokeStatusType]
|
|
629
|
+
maxResults: NotRequired[int]
|
|
630
|
+
nextToken: NotRequired[str]
|
|
631
|
+
sortBy: NotRequired[Literal["SubmissionTime"]]
|
|
632
|
+
sortOrder: NotRequired[SortOrderType]
|
|
633
|
+
|
|
634
|
+
|
|
513
635
|
class ResponseStreamTypeDef(TypedDict):
|
|
514
636
|
chunk: NotRequired[PayloadPartTypeDef]
|
|
515
637
|
internalServerException: NotRequired[InternalServerExceptionTypeDef]
|
|
@@ -520,6 +642,20 @@ class ResponseStreamTypeDef(TypedDict):
|
|
|
520
642
|
serviceUnavailableException: NotRequired[ServiceUnavailableExceptionTypeDef]
|
|
521
643
|
|
|
522
644
|
|
|
645
|
+
VideoSourceOutputTypeDef = TypedDict(
|
|
646
|
+
"VideoSourceOutputTypeDef",
|
|
647
|
+
{
|
|
648
|
+
"bytes": NotRequired[bytes],
|
|
649
|
+
"s3Location": NotRequired[S3LocationTypeDef],
|
|
650
|
+
},
|
|
651
|
+
)
|
|
652
|
+
VideoSourceTypeDef = TypedDict(
|
|
653
|
+
"VideoSourceTypeDef",
|
|
654
|
+
{
|
|
655
|
+
"bytes": NotRequired[BlobTypeDef],
|
|
656
|
+
"s3Location": NotRequired[S3LocationTypeDef],
|
|
657
|
+
},
|
|
658
|
+
)
|
|
523
659
|
ToolChoiceTypeDef = TypedDict(
|
|
524
660
|
"ToolChoiceTypeDef",
|
|
525
661
|
{
|
|
@@ -537,7 +673,52 @@ class ToolSpecificationTypeDef(TypedDict):
|
|
|
537
673
|
|
|
538
674
|
|
|
539
675
|
ToolUseBlockUnionTypeDef = Union[ToolUseBlockTypeDef, ToolUseBlockOutputTypeDef]
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
class AsyncInvokeSummaryTypeDef(TypedDict):
|
|
679
|
+
invocationArn: str
|
|
680
|
+
modelArn: str
|
|
681
|
+
submitTime: datetime
|
|
682
|
+
outputDataConfig: AsyncInvokeOutputDataConfigTypeDef
|
|
683
|
+
clientRequestToken: NotRequired[str]
|
|
684
|
+
status: NotRequired[AsyncInvokeStatusType]
|
|
685
|
+
failureMessage: NotRequired[str]
|
|
686
|
+
lastModifiedTime: NotRequired[datetime]
|
|
687
|
+
endTime: NotRequired[datetime]
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
class GetAsyncInvokeResponseTypeDef(TypedDict):
|
|
691
|
+
invocationArn: str
|
|
692
|
+
modelArn: str
|
|
693
|
+
clientRequestToken: str
|
|
694
|
+
status: AsyncInvokeStatusType
|
|
695
|
+
failureMessage: str
|
|
696
|
+
submitTime: datetime
|
|
697
|
+
lastModifiedTime: datetime
|
|
698
|
+
endTime: datetime
|
|
699
|
+
outputDataConfig: AsyncInvokeOutputDataConfigTypeDef
|
|
700
|
+
ResponseMetadata: ResponseMetadataTypeDef
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
class StartAsyncInvokeRequestRequestTypeDef(TypedDict):
|
|
704
|
+
modelId: str
|
|
705
|
+
modelInput: Mapping[str, Any]
|
|
706
|
+
outputDataConfig: AsyncInvokeOutputDataConfigTypeDef
|
|
707
|
+
clientRequestToken: NotRequired[str]
|
|
708
|
+
tags: NotRequired[Sequence[TagTypeDef]]
|
|
709
|
+
|
|
710
|
+
|
|
540
711
|
DocumentSourceUnionTypeDef = Union[DocumentSourceTypeDef, DocumentSourceOutputTypeDef]
|
|
712
|
+
GuardrailConverseImageSourceUnionTypeDef = Union[
|
|
713
|
+
GuardrailConverseImageSourceTypeDef, GuardrailConverseImageSourceOutputTypeDef
|
|
714
|
+
]
|
|
715
|
+
GuardrailImageBlockTypeDef = TypedDict(
|
|
716
|
+
"GuardrailImageBlockTypeDef",
|
|
717
|
+
{
|
|
718
|
+
"format": GuardrailImageFormatType,
|
|
719
|
+
"source": GuardrailImageSourceTypeDef,
|
|
720
|
+
},
|
|
721
|
+
)
|
|
541
722
|
ImageSourceUnionTypeDef = Union[ImageSourceTypeDef, ImageSourceOutputTypeDef]
|
|
542
723
|
|
|
543
724
|
|
|
@@ -551,15 +732,9 @@ class ContentBlockStartEventTypeDef(TypedDict):
|
|
|
551
732
|
contentBlockIndex: int
|
|
552
733
|
|
|
553
734
|
|
|
554
|
-
class
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
source: GuardrailContentSourceType
|
|
558
|
-
content: Sequence[GuardrailContentBlockTypeDef]
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
class GuardrailConverseContentBlockTypeDef(TypedDict):
|
|
562
|
-
text: NotRequired[GuardrailConverseTextBlockUnionTypeDef]
|
|
735
|
+
class GuardrailConverseContentBlockOutputTypeDef(TypedDict):
|
|
736
|
+
text: NotRequired[GuardrailConverseTextBlockOutputTypeDef]
|
|
737
|
+
image: NotRequired[GuardrailConverseImageBlockOutputTypeDef]
|
|
563
738
|
|
|
564
739
|
|
|
565
740
|
class GuardrailInvocationMetricsTypeDef(TypedDict):
|
|
@@ -568,13 +743,6 @@ class GuardrailInvocationMetricsTypeDef(TypedDict):
|
|
|
568
743
|
guardrailCoverage: NotRequired[GuardrailCoverageTypeDef]
|
|
569
744
|
|
|
570
745
|
|
|
571
|
-
class ToolResultContentBlockOutputTypeDef(TypedDict):
|
|
572
|
-
json: NotRequired[Dict[str, Any]]
|
|
573
|
-
text: NotRequired[str]
|
|
574
|
-
image: NotRequired[ImageBlockOutputTypeDef]
|
|
575
|
-
document: NotRequired[DocumentBlockOutputTypeDef]
|
|
576
|
-
|
|
577
|
-
|
|
578
746
|
class InvokeModelWithResponseStreamResponseTypeDef(TypedDict):
|
|
579
747
|
body: "EventStream[ResponseStreamTypeDef]"
|
|
580
748
|
contentType: str
|
|
@@ -582,10 +750,26 @@ class InvokeModelWithResponseStreamResponseTypeDef(TypedDict):
|
|
|
582
750
|
ResponseMetadata: ResponseMetadataTypeDef
|
|
583
751
|
|
|
584
752
|
|
|
753
|
+
VideoBlockOutputTypeDef = TypedDict(
|
|
754
|
+
"VideoBlockOutputTypeDef",
|
|
755
|
+
{
|
|
756
|
+
"format": VideoFormatType,
|
|
757
|
+
"source": VideoSourceOutputTypeDef,
|
|
758
|
+
},
|
|
759
|
+
)
|
|
760
|
+
VideoSourceUnionTypeDef = Union[VideoSourceTypeDef, VideoSourceOutputTypeDef]
|
|
761
|
+
|
|
762
|
+
|
|
585
763
|
class ToolTypeDef(TypedDict):
|
|
586
764
|
toolSpec: NotRequired[ToolSpecificationTypeDef]
|
|
587
765
|
|
|
588
766
|
|
|
767
|
+
class ListAsyncInvokesResponseTypeDef(TypedDict):
|
|
768
|
+
asyncInvokeSummaries: List[AsyncInvokeSummaryTypeDef]
|
|
769
|
+
ResponseMetadata: ResponseMetadataTypeDef
|
|
770
|
+
nextToken: NotRequired[str]
|
|
771
|
+
|
|
772
|
+
|
|
589
773
|
DocumentBlockTypeDef = TypedDict(
|
|
590
774
|
"DocumentBlockTypeDef",
|
|
591
775
|
{
|
|
@@ -594,6 +778,20 @@ DocumentBlockTypeDef = TypedDict(
|
|
|
594
778
|
"source": DocumentSourceUnionTypeDef,
|
|
595
779
|
},
|
|
596
780
|
)
|
|
781
|
+
GuardrailConverseImageBlockTypeDef = TypedDict(
|
|
782
|
+
"GuardrailConverseImageBlockTypeDef",
|
|
783
|
+
{
|
|
784
|
+
"format": GuardrailConverseImageFormatType,
|
|
785
|
+
"source": GuardrailConverseImageSourceUnionTypeDef,
|
|
786
|
+
},
|
|
787
|
+
)
|
|
788
|
+
|
|
789
|
+
|
|
790
|
+
class GuardrailContentBlockTypeDef(TypedDict):
|
|
791
|
+
text: NotRequired[GuardrailTextBlockTypeDef]
|
|
792
|
+
image: NotRequired[GuardrailImageBlockTypeDef]
|
|
793
|
+
|
|
794
|
+
|
|
597
795
|
ImageBlockTypeDef = TypedDict(
|
|
598
796
|
"ImageBlockTypeDef",
|
|
599
797
|
{
|
|
@@ -601,9 +799,6 @@ ImageBlockTypeDef = TypedDict(
|
|
|
601
799
|
"source": ImageSourceUnionTypeDef,
|
|
602
800
|
},
|
|
603
801
|
)
|
|
604
|
-
GuardrailConverseContentBlockUnionTypeDef = Union[
|
|
605
|
-
GuardrailConverseContentBlockTypeDef, GuardrailConverseContentBlockOutputTypeDef
|
|
606
|
-
]
|
|
607
802
|
|
|
608
803
|
|
|
609
804
|
class GuardrailAssessmentTypeDef(TypedDict):
|
|
@@ -615,10 +810,21 @@ class GuardrailAssessmentTypeDef(TypedDict):
|
|
|
615
810
|
invocationMetrics: NotRequired[GuardrailInvocationMetricsTypeDef]
|
|
616
811
|
|
|
617
812
|
|
|
618
|
-
class
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
813
|
+
class ToolResultContentBlockOutputTypeDef(TypedDict):
|
|
814
|
+
json: NotRequired[Dict[str, Any]]
|
|
815
|
+
text: NotRequired[str]
|
|
816
|
+
image: NotRequired[ImageBlockOutputTypeDef]
|
|
817
|
+
document: NotRequired[DocumentBlockOutputTypeDef]
|
|
818
|
+
video: NotRequired[VideoBlockOutputTypeDef]
|
|
819
|
+
|
|
820
|
+
|
|
821
|
+
VideoBlockTypeDef = TypedDict(
|
|
822
|
+
"VideoBlockTypeDef",
|
|
823
|
+
{
|
|
824
|
+
"format": VideoFormatType,
|
|
825
|
+
"source": VideoSourceUnionTypeDef,
|
|
826
|
+
},
|
|
827
|
+
)
|
|
622
828
|
|
|
623
829
|
|
|
624
830
|
class ToolConfigurationTypeDef(TypedDict):
|
|
@@ -627,12 +833,19 @@ class ToolConfigurationTypeDef(TypedDict):
|
|
|
627
833
|
|
|
628
834
|
|
|
629
835
|
DocumentBlockUnionTypeDef = Union[DocumentBlockTypeDef, DocumentBlockOutputTypeDef]
|
|
630
|
-
|
|
836
|
+
GuardrailConverseImageBlockUnionTypeDef = Union[
|
|
837
|
+
GuardrailConverseImageBlockTypeDef, GuardrailConverseImageBlockOutputTypeDef
|
|
838
|
+
]
|
|
631
839
|
|
|
632
840
|
|
|
633
|
-
class
|
|
634
|
-
|
|
635
|
-
|
|
841
|
+
class ApplyGuardrailRequestRequestTypeDef(TypedDict):
|
|
842
|
+
guardrailIdentifier: str
|
|
843
|
+
guardrailVersion: str
|
|
844
|
+
source: GuardrailContentSourceType
|
|
845
|
+
content: Sequence[GuardrailContentBlockTypeDef]
|
|
846
|
+
|
|
847
|
+
|
|
848
|
+
ImageBlockUnionTypeDef = Union[ImageBlockTypeDef, ImageBlockOutputTypeDef]
|
|
636
849
|
|
|
637
850
|
|
|
638
851
|
class ApplyGuardrailResponseTypeDef(TypedDict):
|
|
@@ -650,10 +863,35 @@ class GuardrailTraceAssessmentTypeDef(TypedDict):
|
|
|
650
863
|
outputAssessments: NotRequired[Dict[str, List[GuardrailAssessmentTypeDef]]]
|
|
651
864
|
|
|
652
865
|
|
|
866
|
+
class ToolResultBlockOutputTypeDef(TypedDict):
|
|
867
|
+
toolUseId: str
|
|
868
|
+
content: List[ToolResultContentBlockOutputTypeDef]
|
|
869
|
+
status: NotRequired[ToolResultStatusType]
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
VideoBlockUnionTypeDef = Union[VideoBlockTypeDef, VideoBlockOutputTypeDef]
|
|
873
|
+
|
|
874
|
+
|
|
875
|
+
class GuardrailConverseContentBlockTypeDef(TypedDict):
|
|
876
|
+
text: NotRequired[GuardrailConverseTextBlockUnionTypeDef]
|
|
877
|
+
image: NotRequired[GuardrailConverseImageBlockUnionTypeDef]
|
|
878
|
+
|
|
879
|
+
|
|
880
|
+
class ConverseStreamTraceTypeDef(TypedDict):
|
|
881
|
+
guardrail: NotRequired[GuardrailTraceAssessmentTypeDef]
|
|
882
|
+
promptRouter: NotRequired[PromptRouterTraceTypeDef]
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
class ConverseTraceTypeDef(TypedDict):
|
|
886
|
+
guardrail: NotRequired[GuardrailTraceAssessmentTypeDef]
|
|
887
|
+
promptRouter: NotRequired[PromptRouterTraceTypeDef]
|
|
888
|
+
|
|
889
|
+
|
|
653
890
|
class ContentBlockOutputTypeDef(TypedDict):
|
|
654
891
|
text: NotRequired[str]
|
|
655
892
|
image: NotRequired[ImageBlockOutputTypeDef]
|
|
656
893
|
document: NotRequired[DocumentBlockOutputTypeDef]
|
|
894
|
+
video: NotRequired[VideoBlockOutputTypeDef]
|
|
657
895
|
toolUse: NotRequired[ToolUseBlockOutputTypeDef]
|
|
658
896
|
toolResult: NotRequired[ToolResultBlockOutputTypeDef]
|
|
659
897
|
guardContent: NotRequired[GuardrailConverseContentBlockOutputTypeDef]
|
|
@@ -664,14 +902,19 @@ class ToolResultContentBlockTypeDef(TypedDict):
|
|
|
664
902
|
text: NotRequired[str]
|
|
665
903
|
image: NotRequired[ImageBlockUnionTypeDef]
|
|
666
904
|
document: NotRequired[DocumentBlockUnionTypeDef]
|
|
905
|
+
video: NotRequired[VideoBlockUnionTypeDef]
|
|
667
906
|
|
|
668
907
|
|
|
669
|
-
|
|
670
|
-
|
|
908
|
+
GuardrailConverseContentBlockUnionTypeDef = Union[
|
|
909
|
+
GuardrailConverseContentBlockTypeDef, GuardrailConverseContentBlockOutputTypeDef
|
|
910
|
+
]
|
|
671
911
|
|
|
672
912
|
|
|
673
|
-
class
|
|
674
|
-
|
|
913
|
+
class ConverseStreamMetadataEventTypeDef(TypedDict):
|
|
914
|
+
usage: TokenUsageTypeDef
|
|
915
|
+
metrics: ConverseStreamMetricsTypeDef
|
|
916
|
+
trace: NotRequired[ConverseStreamTraceTypeDef]
|
|
917
|
+
performanceConfig: NotRequired[PerformanceConfigurationTypeDef]
|
|
675
918
|
|
|
676
919
|
|
|
677
920
|
class MessageOutputTypeDef(TypedDict):
|
|
@@ -684,21 +927,9 @@ ToolResultContentBlockUnionTypeDef = Union[
|
|
|
684
927
|
]
|
|
685
928
|
|
|
686
929
|
|
|
687
|
-
class
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
trace: NotRequired[ConverseStreamTraceTypeDef]
|
|
691
|
-
performanceConfig: NotRequired[PerformanceConfigurationTypeDef]
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
class ConverseOutputTypeDef(TypedDict):
|
|
695
|
-
message: NotRequired[MessageOutputTypeDef]
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
class ToolResultBlockTypeDef(TypedDict):
|
|
699
|
-
toolUseId: str
|
|
700
|
-
content: Sequence[ToolResultContentBlockUnionTypeDef]
|
|
701
|
-
status: NotRequired[ToolResultStatusType]
|
|
930
|
+
class SystemContentBlockTypeDef(TypedDict):
|
|
931
|
+
text: NotRequired[str]
|
|
932
|
+
guardContent: NotRequired[GuardrailConverseContentBlockUnionTypeDef]
|
|
702
933
|
|
|
703
934
|
|
|
704
935
|
class ConverseStreamOutputTypeDef(TypedDict):
|
|
@@ -715,6 +946,21 @@ class ConverseStreamOutputTypeDef(TypedDict):
|
|
|
715
946
|
serviceUnavailableException: NotRequired[ServiceUnavailableExceptionTypeDef]
|
|
716
947
|
|
|
717
948
|
|
|
949
|
+
class ConverseOutputTypeDef(TypedDict):
|
|
950
|
+
message: NotRequired[MessageOutputTypeDef]
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
class ToolResultBlockTypeDef(TypedDict):
|
|
954
|
+
toolUseId: str
|
|
955
|
+
content: Sequence[ToolResultContentBlockUnionTypeDef]
|
|
956
|
+
status: NotRequired[ToolResultStatusType]
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
class ConverseStreamResponseTypeDef(TypedDict):
|
|
960
|
+
stream: "EventStream[ConverseStreamOutputTypeDef]"
|
|
961
|
+
ResponseMetadata: ResponseMetadataTypeDef
|
|
962
|
+
|
|
963
|
+
|
|
718
964
|
class ConverseResponseTypeDef(TypedDict):
|
|
719
965
|
output: ConverseOutputTypeDef
|
|
720
966
|
stopReason: StopReasonType
|
|
@@ -729,15 +975,11 @@ class ConverseResponseTypeDef(TypedDict):
|
|
|
729
975
|
ToolResultBlockUnionTypeDef = Union[ToolResultBlockTypeDef, ToolResultBlockOutputTypeDef]
|
|
730
976
|
|
|
731
977
|
|
|
732
|
-
class ConverseStreamResponseTypeDef(TypedDict):
|
|
733
|
-
stream: "EventStream[ConverseStreamOutputTypeDef]"
|
|
734
|
-
ResponseMetadata: ResponseMetadataTypeDef
|
|
735
|
-
|
|
736
|
-
|
|
737
978
|
class ContentBlockTypeDef(TypedDict):
|
|
738
979
|
text: NotRequired[str]
|
|
739
980
|
image: NotRequired[ImageBlockUnionTypeDef]
|
|
740
981
|
document: NotRequired[DocumentBlockUnionTypeDef]
|
|
982
|
+
video: NotRequired[VideoBlockUnionTypeDef]
|
|
741
983
|
toolUse: NotRequired[ToolUseBlockUnionTypeDef]
|
|
742
984
|
toolResult: NotRequired[ToolResultBlockUnionTypeDef]
|
|
743
985
|
guardContent: NotRequired[GuardrailConverseContentBlockUnionTypeDef]
|
|
@@ -761,6 +1003,7 @@ class ConverseStreamRequestRequestTypeDef(TypedDict):
|
|
|
761
1003
|
additionalModelRequestFields: NotRequired[Mapping[str, Any]]
|
|
762
1004
|
promptVariables: NotRequired[Mapping[str, PromptVariableValuesTypeDef]]
|
|
763
1005
|
additionalModelResponseFieldPaths: NotRequired[Sequence[str]]
|
|
1006
|
+
requestMetadata: NotRequired[Mapping[str, str]]
|
|
764
1007
|
performanceConfig: NotRequired[PerformanceConfigurationTypeDef]
|
|
765
1008
|
|
|
766
1009
|
|
|
@@ -777,4 +1020,5 @@ class ConverseRequestRequestTypeDef(TypedDict):
|
|
|
777
1020
|
additionalModelRequestFields: NotRequired[Mapping[str, Any]]
|
|
778
1021
|
promptVariables: NotRequired[Mapping[str, PromptVariableValuesTypeDef]]
|
|
779
1022
|
additionalModelResponseFieldPaths: NotRequired[Sequence[str]]
|
|
1023
|
+
requestMetadata: NotRequired[Mapping[str, str]]
|
|
780
1024
|
performanceConfig: NotRequired[PerformanceConfigurationTypeDef]
|