types-boto3-bedrock-runtime 1.35.71__py3-none-any.whl → 1.35.74__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 +4 -4
- types_boto3_bedrock_runtime/client.py +50 -2
- types_boto3_bedrock_runtime/client.pyi +50 -2
- types_boto3_bedrock_runtime/literals.py +21 -2
- types_boto3_bedrock_runtime/literals.pyi +21 -2
- types_boto3_bedrock_runtime/paginator.py +66 -0
- types_boto3_bedrock_runtime/paginator.pyi +61 -0
- types_boto3_bedrock_runtime/type_defs.py +216 -38
- types_boto3_bedrock_runtime/type_defs.pyi +191 -32
- types_boto3_bedrock_runtime/version.py +1 -1
- {types_boto3_bedrock_runtime-1.35.71.dist-info → types_boto3_bedrock_runtime-1.35.74.dist-info}/METADATA +55 -8
- types_boto3_bedrock_runtime-1.35.74.dist-info/RECORD +18 -0
- types_boto3_bedrock_runtime-1.35.71.dist-info/RECORD +0 -16
- {types_boto3_bedrock_runtime-1.35.71.dist-info → types_boto3_bedrock_runtime-1.35.74.dist-info}/LICENSE +0 -0
- {types_boto3_bedrock_runtime-1.35.71.dist-info → types_boto3_bedrock_runtime-1.35.74.dist-info}/WHEEL +0 -0
- {types_boto3_bedrock_runtime-1.35.71.dist-info → types_boto3_bedrock_runtime-1.35.74.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,
|
|
@@ -37,9 +39,12 @@ from .literals import (
|
|
|
37
39
|
GuardrailStreamProcessingModeType,
|
|
38
40
|
GuardrailTraceType,
|
|
39
41
|
ImageFormatType,
|
|
42
|
+
PerformanceConfigLatencyType,
|
|
43
|
+
SortOrderType,
|
|
40
44
|
StopReasonType,
|
|
41
45
|
ToolResultStatusType,
|
|
42
46
|
TraceType,
|
|
47
|
+
VideoFormatType,
|
|
43
48
|
)
|
|
44
49
|
|
|
45
50
|
if sys.version_info >= (3, 12):
|
|
@@ -51,6 +56,9 @@ else:
|
|
|
51
56
|
__all__ = (
|
|
52
57
|
"ApplyGuardrailRequestRequestTypeDef",
|
|
53
58
|
"ApplyGuardrailResponseTypeDef",
|
|
59
|
+
"AsyncInvokeOutputDataConfigTypeDef",
|
|
60
|
+
"AsyncInvokeS3OutputDataConfigTypeDef",
|
|
61
|
+
"AsyncInvokeSummaryTypeDef",
|
|
54
62
|
"BlobTypeDef",
|
|
55
63
|
"ContentBlockDeltaEventTypeDef",
|
|
56
64
|
"ContentBlockDeltaTypeDef",
|
|
@@ -77,6 +85,8 @@ __all__ = (
|
|
|
77
85
|
"DocumentSourceOutputTypeDef",
|
|
78
86
|
"DocumentSourceTypeDef",
|
|
79
87
|
"DocumentSourceUnionTypeDef",
|
|
88
|
+
"GetAsyncInvokeRequestRequestTypeDef",
|
|
89
|
+
"GetAsyncInvokeResponseTypeDef",
|
|
80
90
|
"GuardrailAssessmentTypeDef",
|
|
81
91
|
"GuardrailConfigurationTypeDef",
|
|
82
92
|
"GuardrailContentBlockTypeDef",
|
|
@@ -118,6 +128,9 @@ __all__ = (
|
|
|
118
128
|
"InvokeModelResponseTypeDef",
|
|
119
129
|
"InvokeModelWithResponseStreamRequestRequestTypeDef",
|
|
120
130
|
"InvokeModelWithResponseStreamResponseTypeDef",
|
|
131
|
+
"ListAsyncInvokesRequestListAsyncInvokesPaginateTypeDef",
|
|
132
|
+
"ListAsyncInvokesRequestRequestTypeDef",
|
|
133
|
+
"ListAsyncInvokesResponseTypeDef",
|
|
121
134
|
"MessageOutputTypeDef",
|
|
122
135
|
"MessageStartEventTypeDef",
|
|
123
136
|
"MessageStopEventTypeDef",
|
|
@@ -125,14 +138,21 @@ __all__ = (
|
|
|
125
138
|
"MessageUnionTypeDef",
|
|
126
139
|
"ModelStreamErrorExceptionTypeDef",
|
|
127
140
|
"ModelTimeoutExceptionTypeDef",
|
|
141
|
+
"PaginatorConfigTypeDef",
|
|
128
142
|
"PayloadPartTypeDef",
|
|
143
|
+
"PerformanceConfigurationTypeDef",
|
|
129
144
|
"PromptVariableValuesTypeDef",
|
|
130
145
|
"ResponseMetadataTypeDef",
|
|
131
146
|
"ResponseStreamTypeDef",
|
|
147
|
+
"S3LocationTypeDef",
|
|
132
148
|
"ServiceUnavailableExceptionTypeDef",
|
|
133
149
|
"SpecificToolChoiceTypeDef",
|
|
150
|
+
"StartAsyncInvokeRequestRequestTypeDef",
|
|
151
|
+
"StartAsyncInvokeResponseTypeDef",
|
|
134
152
|
"SystemContentBlockTypeDef",
|
|
153
|
+
"TagTypeDef",
|
|
135
154
|
"ThrottlingExceptionTypeDef",
|
|
155
|
+
"TimestampTypeDef",
|
|
136
156
|
"TokenUsageTypeDef",
|
|
137
157
|
"ToolChoiceTypeDef",
|
|
138
158
|
"ToolConfigurationTypeDef",
|
|
@@ -151,6 +171,12 @@ __all__ = (
|
|
|
151
171
|
"ToolUseBlockTypeDef",
|
|
152
172
|
"ToolUseBlockUnionTypeDef",
|
|
153
173
|
"ValidationExceptionTypeDef",
|
|
174
|
+
"VideoBlockOutputTypeDef",
|
|
175
|
+
"VideoBlockTypeDef",
|
|
176
|
+
"VideoBlockUnionTypeDef",
|
|
177
|
+
"VideoSourceOutputTypeDef",
|
|
178
|
+
"VideoSourceTypeDef",
|
|
179
|
+
"VideoSourceUnionTypeDef",
|
|
154
180
|
)
|
|
155
181
|
|
|
156
182
|
|
|
@@ -175,6 +201,12 @@ class ResponseMetadataTypeDef(TypedDict):
|
|
|
175
201
|
HostId: NotRequired[str]
|
|
176
202
|
|
|
177
203
|
|
|
204
|
+
class AsyncInvokeS3OutputDataConfigTypeDef(TypedDict):
|
|
205
|
+
s3Uri: str
|
|
206
|
+
kmsKeyId: NotRequired[str]
|
|
207
|
+
bucketOwner: NotRequired[str]
|
|
208
|
+
|
|
209
|
+
|
|
178
210
|
BlobTypeDef = Union[str, bytes, IO[Any], StreamingBody]
|
|
179
211
|
ToolUseBlockDeltaTypeDef = TypedDict(
|
|
180
212
|
"ToolUseBlockDeltaTypeDef",
|
|
@@ -218,6 +250,10 @@ class InferenceConfigurationTypeDef(TypedDict):
|
|
|
218
250
|
stopSequences: NotRequired[Sequence[str]]
|
|
219
251
|
|
|
220
252
|
|
|
253
|
+
class PerformanceConfigurationTypeDef(TypedDict):
|
|
254
|
+
latency: NotRequired[PerformanceConfigLatencyType]
|
|
255
|
+
|
|
256
|
+
|
|
221
257
|
class PromptVariableValuesTypeDef(TypedDict):
|
|
222
258
|
text: NotRequired[str]
|
|
223
259
|
|
|
@@ -278,6 +314,10 @@ DocumentSourceOutputTypeDef = TypedDict(
|
|
|
278
314
|
)
|
|
279
315
|
|
|
280
316
|
|
|
317
|
+
class GetAsyncInvokeRequestRequestTypeDef(TypedDict):
|
|
318
|
+
invocationArn: str
|
|
319
|
+
|
|
320
|
+
|
|
281
321
|
class GuardrailTextBlockTypeDef(TypedDict):
|
|
282
322
|
text: str
|
|
283
323
|
qualifiers: NotRequired[Sequence[GuardrailContentQualifierType]]
|
|
@@ -364,6 +404,15 @@ ImageSourceOutputTypeDef = TypedDict(
|
|
|
364
404
|
)
|
|
365
405
|
|
|
366
406
|
|
|
407
|
+
class PaginatorConfigTypeDef(TypedDict):
|
|
408
|
+
MaxItems: NotRequired[int]
|
|
409
|
+
PageSize: NotRequired[int]
|
|
410
|
+
StartingToken: NotRequired[str]
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
TimestampTypeDef = Union[datetime, str]
|
|
414
|
+
|
|
415
|
+
|
|
367
416
|
class ModelTimeoutExceptionTypeDef(TypedDict):
|
|
368
417
|
message: NotRequired[str]
|
|
369
418
|
|
|
@@ -376,10 +425,20 @@ PayloadPartTypeDef = TypedDict(
|
|
|
376
425
|
)
|
|
377
426
|
|
|
378
427
|
|
|
428
|
+
class S3LocationTypeDef(TypedDict):
|
|
429
|
+
uri: str
|
|
430
|
+
bucketOwner: NotRequired[str]
|
|
431
|
+
|
|
432
|
+
|
|
379
433
|
class SpecificToolChoiceTypeDef(TypedDict):
|
|
380
434
|
name: str
|
|
381
435
|
|
|
382
436
|
|
|
437
|
+
class TagTypeDef(TypedDict):
|
|
438
|
+
key: str
|
|
439
|
+
value: str
|
|
440
|
+
|
|
441
|
+
|
|
383
442
|
class ToolInputSchemaTypeDef(TypedDict):
|
|
384
443
|
json: NotRequired[Mapping[str, Any]]
|
|
385
444
|
|
|
@@ -397,9 +456,19 @@ ToolUseBlockTypeDef = TypedDict(
|
|
|
397
456
|
class InvokeModelResponseTypeDef(TypedDict):
|
|
398
457
|
body: StreamingBody
|
|
399
458
|
contentType: str
|
|
459
|
+
performanceConfigLatency: PerformanceConfigLatencyType
|
|
460
|
+
ResponseMetadata: ResponseMetadataTypeDef
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
class StartAsyncInvokeResponseTypeDef(TypedDict):
|
|
464
|
+
invocationArn: str
|
|
400
465
|
ResponseMetadata: ResponseMetadataTypeDef
|
|
401
466
|
|
|
402
467
|
|
|
468
|
+
class AsyncInvokeOutputDataConfigTypeDef(TypedDict):
|
|
469
|
+
s3OutputDataConfig: NotRequired[AsyncInvokeS3OutputDataConfigTypeDef]
|
|
470
|
+
|
|
471
|
+
|
|
403
472
|
DocumentSourceTypeDef = TypedDict(
|
|
404
473
|
"DocumentSourceTypeDef",
|
|
405
474
|
{
|
|
@@ -422,6 +491,7 @@ class InvokeModelRequestRequestTypeDef(TypedDict):
|
|
|
422
491
|
trace: NotRequired[TraceType]
|
|
423
492
|
guardrailIdentifier: NotRequired[str]
|
|
424
493
|
guardrailVersion: NotRequired[str]
|
|
494
|
+
performanceConfigLatency: NotRequired[PerformanceConfigLatencyType]
|
|
425
495
|
|
|
426
496
|
|
|
427
497
|
class InvokeModelWithResponseStreamRequestRequestTypeDef(TypedDict):
|
|
@@ -432,6 +502,7 @@ class InvokeModelWithResponseStreamRequestRequestTypeDef(TypedDict):
|
|
|
432
502
|
trace: NotRequired[TraceType]
|
|
433
503
|
guardrailIdentifier: NotRequired[str]
|
|
434
504
|
guardrailVersion: NotRequired[str]
|
|
505
|
+
performanceConfigLatency: NotRequired[PerformanceConfigLatencyType]
|
|
435
506
|
|
|
436
507
|
|
|
437
508
|
class ContentBlockDeltaTypeDef(TypedDict):
|
|
@@ -501,6 +572,25 @@ ImageBlockOutputTypeDef = TypedDict(
|
|
|
501
572
|
)
|
|
502
573
|
|
|
503
574
|
|
|
575
|
+
class ListAsyncInvokesRequestListAsyncInvokesPaginateTypeDef(TypedDict):
|
|
576
|
+
submitTimeAfter: NotRequired[TimestampTypeDef]
|
|
577
|
+
submitTimeBefore: NotRequired[TimestampTypeDef]
|
|
578
|
+
statusEquals: NotRequired[AsyncInvokeStatusType]
|
|
579
|
+
sortBy: NotRequired[Literal["SubmissionTime"]]
|
|
580
|
+
sortOrder: NotRequired[SortOrderType]
|
|
581
|
+
PaginationConfig: NotRequired[PaginatorConfigTypeDef]
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
class ListAsyncInvokesRequestRequestTypeDef(TypedDict):
|
|
585
|
+
submitTimeAfter: NotRequired[TimestampTypeDef]
|
|
586
|
+
submitTimeBefore: NotRequired[TimestampTypeDef]
|
|
587
|
+
statusEquals: NotRequired[AsyncInvokeStatusType]
|
|
588
|
+
maxResults: NotRequired[int]
|
|
589
|
+
nextToken: NotRequired[str]
|
|
590
|
+
sortBy: NotRequired[Literal["SubmissionTime"]]
|
|
591
|
+
sortOrder: NotRequired[SortOrderType]
|
|
592
|
+
|
|
593
|
+
|
|
504
594
|
class ResponseStreamTypeDef(TypedDict):
|
|
505
595
|
chunk: NotRequired[PayloadPartTypeDef]
|
|
506
596
|
internalServerException: NotRequired[InternalServerExceptionTypeDef]
|
|
@@ -511,6 +601,20 @@ class ResponseStreamTypeDef(TypedDict):
|
|
|
511
601
|
serviceUnavailableException: NotRequired[ServiceUnavailableExceptionTypeDef]
|
|
512
602
|
|
|
513
603
|
|
|
604
|
+
VideoSourceOutputTypeDef = TypedDict(
|
|
605
|
+
"VideoSourceOutputTypeDef",
|
|
606
|
+
{
|
|
607
|
+
"bytes": NotRequired[bytes],
|
|
608
|
+
"s3Location": NotRequired[S3LocationTypeDef],
|
|
609
|
+
},
|
|
610
|
+
)
|
|
611
|
+
VideoSourceTypeDef = TypedDict(
|
|
612
|
+
"VideoSourceTypeDef",
|
|
613
|
+
{
|
|
614
|
+
"bytes": NotRequired[BlobTypeDef],
|
|
615
|
+
"s3Location": NotRequired[S3LocationTypeDef],
|
|
616
|
+
},
|
|
617
|
+
)
|
|
514
618
|
ToolChoiceTypeDef = TypedDict(
|
|
515
619
|
"ToolChoiceTypeDef",
|
|
516
620
|
{
|
|
@@ -528,6 +632,41 @@ class ToolSpecificationTypeDef(TypedDict):
|
|
|
528
632
|
|
|
529
633
|
|
|
530
634
|
ToolUseBlockUnionTypeDef = Union[ToolUseBlockTypeDef, ToolUseBlockOutputTypeDef]
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
class AsyncInvokeSummaryTypeDef(TypedDict):
|
|
638
|
+
invocationArn: str
|
|
639
|
+
modelArn: str
|
|
640
|
+
submitTime: datetime
|
|
641
|
+
outputDataConfig: AsyncInvokeOutputDataConfigTypeDef
|
|
642
|
+
clientRequestToken: NotRequired[str]
|
|
643
|
+
status: NotRequired[AsyncInvokeStatusType]
|
|
644
|
+
failureMessage: NotRequired[str]
|
|
645
|
+
lastModifiedTime: NotRequired[datetime]
|
|
646
|
+
endTime: NotRequired[datetime]
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
class GetAsyncInvokeResponseTypeDef(TypedDict):
|
|
650
|
+
invocationArn: str
|
|
651
|
+
modelArn: str
|
|
652
|
+
clientRequestToken: str
|
|
653
|
+
status: AsyncInvokeStatusType
|
|
654
|
+
failureMessage: str
|
|
655
|
+
submitTime: datetime
|
|
656
|
+
lastModifiedTime: datetime
|
|
657
|
+
endTime: datetime
|
|
658
|
+
outputDataConfig: AsyncInvokeOutputDataConfigTypeDef
|
|
659
|
+
ResponseMetadata: ResponseMetadataTypeDef
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
class StartAsyncInvokeRequestRequestTypeDef(TypedDict):
|
|
663
|
+
modelId: str
|
|
664
|
+
modelInput: Mapping[str, Any]
|
|
665
|
+
outputDataConfig: AsyncInvokeOutputDataConfigTypeDef
|
|
666
|
+
clientRequestToken: NotRequired[str]
|
|
667
|
+
tags: NotRequired[Sequence[TagTypeDef]]
|
|
668
|
+
|
|
669
|
+
|
|
531
670
|
DocumentSourceUnionTypeDef = Union[DocumentSourceTypeDef, DocumentSourceOutputTypeDef]
|
|
532
671
|
ImageSourceUnionTypeDef = Union[ImageSourceTypeDef, ImageSourceOutputTypeDef]
|
|
533
672
|
|
|
@@ -559,23 +698,33 @@ class GuardrailInvocationMetricsTypeDef(TypedDict):
|
|
|
559
698
|
guardrailCoverage: NotRequired[GuardrailCoverageTypeDef]
|
|
560
699
|
|
|
561
700
|
|
|
562
|
-
class ToolResultContentBlockOutputTypeDef(TypedDict):
|
|
563
|
-
json: NotRequired[Dict[str, Any]]
|
|
564
|
-
text: NotRequired[str]
|
|
565
|
-
image: NotRequired[ImageBlockOutputTypeDef]
|
|
566
|
-
document: NotRequired[DocumentBlockOutputTypeDef]
|
|
567
|
-
|
|
568
|
-
|
|
569
701
|
class InvokeModelWithResponseStreamResponseTypeDef(TypedDict):
|
|
570
702
|
body: "EventStream[ResponseStreamTypeDef]"
|
|
571
703
|
contentType: str
|
|
704
|
+
performanceConfigLatency: PerformanceConfigLatencyType
|
|
572
705
|
ResponseMetadata: ResponseMetadataTypeDef
|
|
573
706
|
|
|
574
707
|
|
|
708
|
+
VideoBlockOutputTypeDef = TypedDict(
|
|
709
|
+
"VideoBlockOutputTypeDef",
|
|
710
|
+
{
|
|
711
|
+
"format": VideoFormatType,
|
|
712
|
+
"source": VideoSourceOutputTypeDef,
|
|
713
|
+
},
|
|
714
|
+
)
|
|
715
|
+
VideoSourceUnionTypeDef = Union[VideoSourceTypeDef, VideoSourceOutputTypeDef]
|
|
716
|
+
|
|
717
|
+
|
|
575
718
|
class ToolTypeDef(TypedDict):
|
|
576
719
|
toolSpec: NotRequired[ToolSpecificationTypeDef]
|
|
577
720
|
|
|
578
721
|
|
|
722
|
+
class ListAsyncInvokesResponseTypeDef(TypedDict):
|
|
723
|
+
asyncInvokeSummaries: List[AsyncInvokeSummaryTypeDef]
|
|
724
|
+
ResponseMetadata: ResponseMetadataTypeDef
|
|
725
|
+
nextToken: NotRequired[str]
|
|
726
|
+
|
|
727
|
+
|
|
579
728
|
DocumentBlockTypeDef = TypedDict(
|
|
580
729
|
"DocumentBlockTypeDef",
|
|
581
730
|
{
|
|
@@ -605,10 +754,21 @@ class GuardrailAssessmentTypeDef(TypedDict):
|
|
|
605
754
|
invocationMetrics: NotRequired[GuardrailInvocationMetricsTypeDef]
|
|
606
755
|
|
|
607
756
|
|
|
608
|
-
class
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
757
|
+
class ToolResultContentBlockOutputTypeDef(TypedDict):
|
|
758
|
+
json: NotRequired[Dict[str, Any]]
|
|
759
|
+
text: NotRequired[str]
|
|
760
|
+
image: NotRequired[ImageBlockOutputTypeDef]
|
|
761
|
+
document: NotRequired[DocumentBlockOutputTypeDef]
|
|
762
|
+
video: NotRequired[VideoBlockOutputTypeDef]
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
VideoBlockTypeDef = TypedDict(
|
|
766
|
+
"VideoBlockTypeDef",
|
|
767
|
+
{
|
|
768
|
+
"format": VideoFormatType,
|
|
769
|
+
"source": VideoSourceUnionTypeDef,
|
|
770
|
+
},
|
|
771
|
+
)
|
|
612
772
|
|
|
613
773
|
|
|
614
774
|
class ToolConfigurationTypeDef(TypedDict):
|
|
@@ -640,10 +800,28 @@ class GuardrailTraceAssessmentTypeDef(TypedDict):
|
|
|
640
800
|
outputAssessments: NotRequired[Dict[str, List[GuardrailAssessmentTypeDef]]]
|
|
641
801
|
|
|
642
802
|
|
|
803
|
+
class ToolResultBlockOutputTypeDef(TypedDict):
|
|
804
|
+
toolUseId: str
|
|
805
|
+
content: List[ToolResultContentBlockOutputTypeDef]
|
|
806
|
+
status: NotRequired[ToolResultStatusType]
|
|
807
|
+
|
|
808
|
+
|
|
809
|
+
VideoBlockUnionTypeDef = Union[VideoBlockTypeDef, VideoBlockOutputTypeDef]
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
class ConverseStreamTraceTypeDef(TypedDict):
|
|
813
|
+
guardrail: NotRequired[GuardrailTraceAssessmentTypeDef]
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
class ConverseTraceTypeDef(TypedDict):
|
|
817
|
+
guardrail: NotRequired[GuardrailTraceAssessmentTypeDef]
|
|
818
|
+
|
|
819
|
+
|
|
643
820
|
class ContentBlockOutputTypeDef(TypedDict):
|
|
644
821
|
text: NotRequired[str]
|
|
645
822
|
image: NotRequired[ImageBlockOutputTypeDef]
|
|
646
823
|
document: NotRequired[DocumentBlockOutputTypeDef]
|
|
824
|
+
video: NotRequired[VideoBlockOutputTypeDef]
|
|
647
825
|
toolUse: NotRequired[ToolUseBlockOutputTypeDef]
|
|
648
826
|
toolResult: NotRequired[ToolResultBlockOutputTypeDef]
|
|
649
827
|
guardContent: NotRequired[GuardrailConverseContentBlockOutputTypeDef]
|
|
@@ -654,14 +832,14 @@ class ToolResultContentBlockTypeDef(TypedDict):
|
|
|
654
832
|
text: NotRequired[str]
|
|
655
833
|
image: NotRequired[ImageBlockUnionTypeDef]
|
|
656
834
|
document: NotRequired[DocumentBlockUnionTypeDef]
|
|
835
|
+
video: NotRequired[VideoBlockUnionTypeDef]
|
|
657
836
|
|
|
658
837
|
|
|
659
|
-
class
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
guardrail: NotRequired[GuardrailTraceAssessmentTypeDef]
|
|
838
|
+
class ConverseStreamMetadataEventTypeDef(TypedDict):
|
|
839
|
+
usage: TokenUsageTypeDef
|
|
840
|
+
metrics: ConverseStreamMetricsTypeDef
|
|
841
|
+
trace: NotRequired[ConverseStreamTraceTypeDef]
|
|
842
|
+
performanceConfig: NotRequired[PerformanceConfigurationTypeDef]
|
|
665
843
|
|
|
666
844
|
|
|
667
845
|
class MessageOutputTypeDef(TypedDict):
|
|
@@ -674,22 +852,6 @@ ToolResultContentBlockUnionTypeDef = Union[
|
|
|
674
852
|
]
|
|
675
853
|
|
|
676
854
|
|
|
677
|
-
class ConverseStreamMetadataEventTypeDef(TypedDict):
|
|
678
|
-
usage: TokenUsageTypeDef
|
|
679
|
-
metrics: ConverseStreamMetricsTypeDef
|
|
680
|
-
trace: NotRequired[ConverseStreamTraceTypeDef]
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
class ConverseOutputTypeDef(TypedDict):
|
|
684
|
-
message: NotRequired[MessageOutputTypeDef]
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
class ToolResultBlockTypeDef(TypedDict):
|
|
688
|
-
toolUseId: str
|
|
689
|
-
content: Sequence[ToolResultContentBlockUnionTypeDef]
|
|
690
|
-
status: NotRequired[ToolResultStatusType]
|
|
691
|
-
|
|
692
|
-
|
|
693
855
|
class ConverseStreamOutputTypeDef(TypedDict):
|
|
694
856
|
messageStart: NotRequired[MessageStartEventTypeDef]
|
|
695
857
|
contentBlockStart: NotRequired[ContentBlockStartEventTypeDef]
|
|
@@ -704,6 +866,21 @@ class ConverseStreamOutputTypeDef(TypedDict):
|
|
|
704
866
|
serviceUnavailableException: NotRequired[ServiceUnavailableExceptionTypeDef]
|
|
705
867
|
|
|
706
868
|
|
|
869
|
+
class ConverseOutputTypeDef(TypedDict):
|
|
870
|
+
message: NotRequired[MessageOutputTypeDef]
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
class ToolResultBlockTypeDef(TypedDict):
|
|
874
|
+
toolUseId: str
|
|
875
|
+
content: Sequence[ToolResultContentBlockUnionTypeDef]
|
|
876
|
+
status: NotRequired[ToolResultStatusType]
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
class ConverseStreamResponseTypeDef(TypedDict):
|
|
880
|
+
stream: "EventStream[ConverseStreamOutputTypeDef]"
|
|
881
|
+
ResponseMetadata: ResponseMetadataTypeDef
|
|
882
|
+
|
|
883
|
+
|
|
707
884
|
class ConverseResponseTypeDef(TypedDict):
|
|
708
885
|
output: ConverseOutputTypeDef
|
|
709
886
|
stopReason: StopReasonType
|
|
@@ -711,21 +888,18 @@ class ConverseResponseTypeDef(TypedDict):
|
|
|
711
888
|
metrics: ConverseMetricsTypeDef
|
|
712
889
|
additionalModelResponseFields: Dict[str, Any]
|
|
713
890
|
trace: ConverseTraceTypeDef
|
|
891
|
+
performanceConfig: PerformanceConfigurationTypeDef
|
|
714
892
|
ResponseMetadata: ResponseMetadataTypeDef
|
|
715
893
|
|
|
716
894
|
|
|
717
895
|
ToolResultBlockUnionTypeDef = Union[ToolResultBlockTypeDef, ToolResultBlockOutputTypeDef]
|
|
718
896
|
|
|
719
897
|
|
|
720
|
-
class ConverseStreamResponseTypeDef(TypedDict):
|
|
721
|
-
stream: "EventStream[ConverseStreamOutputTypeDef]"
|
|
722
|
-
ResponseMetadata: ResponseMetadataTypeDef
|
|
723
|
-
|
|
724
|
-
|
|
725
898
|
class ContentBlockTypeDef(TypedDict):
|
|
726
899
|
text: NotRequired[str]
|
|
727
900
|
image: NotRequired[ImageBlockUnionTypeDef]
|
|
728
901
|
document: NotRequired[DocumentBlockUnionTypeDef]
|
|
902
|
+
video: NotRequired[VideoBlockUnionTypeDef]
|
|
729
903
|
toolUse: NotRequired[ToolUseBlockUnionTypeDef]
|
|
730
904
|
toolResult: NotRequired[ToolResultBlockUnionTypeDef]
|
|
731
905
|
guardContent: NotRequired[GuardrailConverseContentBlockUnionTypeDef]
|
|
@@ -749,6 +923,8 @@ class ConverseStreamRequestRequestTypeDef(TypedDict):
|
|
|
749
923
|
additionalModelRequestFields: NotRequired[Mapping[str, Any]]
|
|
750
924
|
promptVariables: NotRequired[Mapping[str, PromptVariableValuesTypeDef]]
|
|
751
925
|
additionalModelResponseFieldPaths: NotRequired[Sequence[str]]
|
|
926
|
+
requestMetadata: NotRequired[Mapping[str, str]]
|
|
927
|
+
performanceConfig: NotRequired[PerformanceConfigurationTypeDef]
|
|
752
928
|
|
|
753
929
|
|
|
754
930
|
MessageUnionTypeDef = Union[MessageTypeDef, MessageOutputTypeDef]
|
|
@@ -764,3 +940,5 @@ class ConverseRequestRequestTypeDef(TypedDict):
|
|
|
764
940
|
additionalModelRequestFields: NotRequired[Mapping[str, Any]]
|
|
765
941
|
promptVariables: NotRequired[Mapping[str, PromptVariableValuesTypeDef]]
|
|
766
942
|
additionalModelResponseFieldPaths: NotRequired[Sequence[str]]
|
|
943
|
+
requestMetadata: NotRequired[Mapping[str, str]]
|
|
944
|
+
performanceConfig: NotRequired[PerformanceConfigurationTypeDef]
|