types-boto3-bedrock-runtime 1.35.73__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 +3 -3
- types_boto3_bedrock_runtime/client.py +50 -2
- types_boto3_bedrock_runtime/client.pyi +50 -2
- types_boto3_bedrock_runtime/literals.py +16 -2
- types_boto3_bedrock_runtime/literals.pyi +16 -2
- types_boto3_bedrock_runtime/paginator.py +66 -0
- types_boto3_bedrock_runtime/paginator.pyi +61 -0
- types_boto3_bedrock_runtime/type_defs.py +203 -39
- types_boto3_bedrock_runtime/type_defs.pyi +179 -33
- types_boto3_bedrock_runtime/version.py +1 -1
- {types_boto3_bedrock_runtime-1.35.73.dist-info → types_boto3_bedrock_runtime-1.35.74.dist-info}/METADATA +26 -5
- types_boto3_bedrock_runtime-1.35.74.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.74.dist-info}/LICENSE +0 -0
- {types_boto3_bedrock_runtime-1.35.73.dist-info → types_boto3_bedrock_runtime-1.35.74.dist-info}/WHEEL +0 -0
- {types_boto3_bedrock_runtime-1.35.73.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,
|
|
@@ -38,9 +40,11 @@ from .literals import (
|
|
|
38
40
|
GuardrailTraceType,
|
|
39
41
|
ImageFormatType,
|
|
40
42
|
PerformanceConfigLatencyType,
|
|
43
|
+
SortOrderType,
|
|
41
44
|
StopReasonType,
|
|
42
45
|
ToolResultStatusType,
|
|
43
46
|
TraceType,
|
|
47
|
+
VideoFormatType,
|
|
44
48
|
)
|
|
45
49
|
|
|
46
50
|
if sys.version_info >= (3, 12):
|
|
@@ -52,6 +56,9 @@ else:
|
|
|
52
56
|
__all__ = (
|
|
53
57
|
"ApplyGuardrailRequestRequestTypeDef",
|
|
54
58
|
"ApplyGuardrailResponseTypeDef",
|
|
59
|
+
"AsyncInvokeOutputDataConfigTypeDef",
|
|
60
|
+
"AsyncInvokeS3OutputDataConfigTypeDef",
|
|
61
|
+
"AsyncInvokeSummaryTypeDef",
|
|
55
62
|
"BlobTypeDef",
|
|
56
63
|
"ContentBlockDeltaEventTypeDef",
|
|
57
64
|
"ContentBlockDeltaTypeDef",
|
|
@@ -78,6 +85,8 @@ __all__ = (
|
|
|
78
85
|
"DocumentSourceOutputTypeDef",
|
|
79
86
|
"DocumentSourceTypeDef",
|
|
80
87
|
"DocumentSourceUnionTypeDef",
|
|
88
|
+
"GetAsyncInvokeRequestRequestTypeDef",
|
|
89
|
+
"GetAsyncInvokeResponseTypeDef",
|
|
81
90
|
"GuardrailAssessmentTypeDef",
|
|
82
91
|
"GuardrailConfigurationTypeDef",
|
|
83
92
|
"GuardrailContentBlockTypeDef",
|
|
@@ -119,6 +128,9 @@ __all__ = (
|
|
|
119
128
|
"InvokeModelResponseTypeDef",
|
|
120
129
|
"InvokeModelWithResponseStreamRequestRequestTypeDef",
|
|
121
130
|
"InvokeModelWithResponseStreamResponseTypeDef",
|
|
131
|
+
"ListAsyncInvokesRequestListAsyncInvokesPaginateTypeDef",
|
|
132
|
+
"ListAsyncInvokesRequestRequestTypeDef",
|
|
133
|
+
"ListAsyncInvokesResponseTypeDef",
|
|
122
134
|
"MessageOutputTypeDef",
|
|
123
135
|
"MessageStartEventTypeDef",
|
|
124
136
|
"MessageStopEventTypeDef",
|
|
@@ -126,15 +138,21 @@ __all__ = (
|
|
|
126
138
|
"MessageUnionTypeDef",
|
|
127
139
|
"ModelStreamErrorExceptionTypeDef",
|
|
128
140
|
"ModelTimeoutExceptionTypeDef",
|
|
141
|
+
"PaginatorConfigTypeDef",
|
|
129
142
|
"PayloadPartTypeDef",
|
|
130
143
|
"PerformanceConfigurationTypeDef",
|
|
131
144
|
"PromptVariableValuesTypeDef",
|
|
132
145
|
"ResponseMetadataTypeDef",
|
|
133
146
|
"ResponseStreamTypeDef",
|
|
147
|
+
"S3LocationTypeDef",
|
|
134
148
|
"ServiceUnavailableExceptionTypeDef",
|
|
135
149
|
"SpecificToolChoiceTypeDef",
|
|
150
|
+
"StartAsyncInvokeRequestRequestTypeDef",
|
|
151
|
+
"StartAsyncInvokeResponseTypeDef",
|
|
136
152
|
"SystemContentBlockTypeDef",
|
|
153
|
+
"TagTypeDef",
|
|
137
154
|
"ThrottlingExceptionTypeDef",
|
|
155
|
+
"TimestampTypeDef",
|
|
138
156
|
"TokenUsageTypeDef",
|
|
139
157
|
"ToolChoiceTypeDef",
|
|
140
158
|
"ToolConfigurationTypeDef",
|
|
@@ -153,6 +171,12 @@ __all__ = (
|
|
|
153
171
|
"ToolUseBlockTypeDef",
|
|
154
172
|
"ToolUseBlockUnionTypeDef",
|
|
155
173
|
"ValidationExceptionTypeDef",
|
|
174
|
+
"VideoBlockOutputTypeDef",
|
|
175
|
+
"VideoBlockTypeDef",
|
|
176
|
+
"VideoBlockUnionTypeDef",
|
|
177
|
+
"VideoSourceOutputTypeDef",
|
|
178
|
+
"VideoSourceTypeDef",
|
|
179
|
+
"VideoSourceUnionTypeDef",
|
|
156
180
|
)
|
|
157
181
|
|
|
158
182
|
|
|
@@ -177,6 +201,12 @@ class ResponseMetadataTypeDef(TypedDict):
|
|
|
177
201
|
HostId: NotRequired[str]
|
|
178
202
|
|
|
179
203
|
|
|
204
|
+
class AsyncInvokeS3OutputDataConfigTypeDef(TypedDict):
|
|
205
|
+
s3Uri: str
|
|
206
|
+
kmsKeyId: NotRequired[str]
|
|
207
|
+
bucketOwner: NotRequired[str]
|
|
208
|
+
|
|
209
|
+
|
|
180
210
|
BlobTypeDef = Union[str, bytes, IO[Any], StreamingBody]
|
|
181
211
|
ToolUseBlockDeltaTypeDef = TypedDict(
|
|
182
212
|
"ToolUseBlockDeltaTypeDef",
|
|
@@ -284,6 +314,10 @@ DocumentSourceOutputTypeDef = TypedDict(
|
|
|
284
314
|
)
|
|
285
315
|
|
|
286
316
|
|
|
317
|
+
class GetAsyncInvokeRequestRequestTypeDef(TypedDict):
|
|
318
|
+
invocationArn: str
|
|
319
|
+
|
|
320
|
+
|
|
287
321
|
class GuardrailTextBlockTypeDef(TypedDict):
|
|
288
322
|
text: str
|
|
289
323
|
qualifiers: NotRequired[Sequence[GuardrailContentQualifierType]]
|
|
@@ -370,6 +404,15 @@ ImageSourceOutputTypeDef = TypedDict(
|
|
|
370
404
|
)
|
|
371
405
|
|
|
372
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
|
+
|
|
373
416
|
class ModelTimeoutExceptionTypeDef(TypedDict):
|
|
374
417
|
message: NotRequired[str]
|
|
375
418
|
|
|
@@ -382,10 +425,20 @@ PayloadPartTypeDef = TypedDict(
|
|
|
382
425
|
)
|
|
383
426
|
|
|
384
427
|
|
|
428
|
+
class S3LocationTypeDef(TypedDict):
|
|
429
|
+
uri: str
|
|
430
|
+
bucketOwner: NotRequired[str]
|
|
431
|
+
|
|
432
|
+
|
|
385
433
|
class SpecificToolChoiceTypeDef(TypedDict):
|
|
386
434
|
name: str
|
|
387
435
|
|
|
388
436
|
|
|
437
|
+
class TagTypeDef(TypedDict):
|
|
438
|
+
key: str
|
|
439
|
+
value: str
|
|
440
|
+
|
|
441
|
+
|
|
389
442
|
class ToolInputSchemaTypeDef(TypedDict):
|
|
390
443
|
json: NotRequired[Mapping[str, Any]]
|
|
391
444
|
|
|
@@ -407,6 +460,15 @@ class InvokeModelResponseTypeDef(TypedDict):
|
|
|
407
460
|
ResponseMetadata: ResponseMetadataTypeDef
|
|
408
461
|
|
|
409
462
|
|
|
463
|
+
class StartAsyncInvokeResponseTypeDef(TypedDict):
|
|
464
|
+
invocationArn: str
|
|
465
|
+
ResponseMetadata: ResponseMetadataTypeDef
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
class AsyncInvokeOutputDataConfigTypeDef(TypedDict):
|
|
469
|
+
s3OutputDataConfig: NotRequired[AsyncInvokeS3OutputDataConfigTypeDef]
|
|
470
|
+
|
|
471
|
+
|
|
410
472
|
DocumentSourceTypeDef = TypedDict(
|
|
411
473
|
"DocumentSourceTypeDef",
|
|
412
474
|
{
|
|
@@ -510,6 +572,25 @@ ImageBlockOutputTypeDef = TypedDict(
|
|
|
510
572
|
)
|
|
511
573
|
|
|
512
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
|
+
|
|
513
594
|
class ResponseStreamTypeDef(TypedDict):
|
|
514
595
|
chunk: NotRequired[PayloadPartTypeDef]
|
|
515
596
|
internalServerException: NotRequired[InternalServerExceptionTypeDef]
|
|
@@ -520,6 +601,20 @@ class ResponseStreamTypeDef(TypedDict):
|
|
|
520
601
|
serviceUnavailableException: NotRequired[ServiceUnavailableExceptionTypeDef]
|
|
521
602
|
|
|
522
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
|
+
)
|
|
523
618
|
ToolChoiceTypeDef = TypedDict(
|
|
524
619
|
"ToolChoiceTypeDef",
|
|
525
620
|
{
|
|
@@ -537,6 +632,41 @@ class ToolSpecificationTypeDef(TypedDict):
|
|
|
537
632
|
|
|
538
633
|
|
|
539
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
|
+
|
|
540
670
|
DocumentSourceUnionTypeDef = Union[DocumentSourceTypeDef, DocumentSourceOutputTypeDef]
|
|
541
671
|
ImageSourceUnionTypeDef = Union[ImageSourceTypeDef, ImageSourceOutputTypeDef]
|
|
542
672
|
|
|
@@ -568,13 +698,6 @@ class GuardrailInvocationMetricsTypeDef(TypedDict):
|
|
|
568
698
|
guardrailCoverage: NotRequired[GuardrailCoverageTypeDef]
|
|
569
699
|
|
|
570
700
|
|
|
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
701
|
class InvokeModelWithResponseStreamResponseTypeDef(TypedDict):
|
|
579
702
|
body: "EventStream[ResponseStreamTypeDef]"
|
|
580
703
|
contentType: str
|
|
@@ -582,10 +705,26 @@ class InvokeModelWithResponseStreamResponseTypeDef(TypedDict):
|
|
|
582
705
|
ResponseMetadata: ResponseMetadataTypeDef
|
|
583
706
|
|
|
584
707
|
|
|
708
|
+
VideoBlockOutputTypeDef = TypedDict(
|
|
709
|
+
"VideoBlockOutputTypeDef",
|
|
710
|
+
{
|
|
711
|
+
"format": VideoFormatType,
|
|
712
|
+
"source": VideoSourceOutputTypeDef,
|
|
713
|
+
},
|
|
714
|
+
)
|
|
715
|
+
VideoSourceUnionTypeDef = Union[VideoSourceTypeDef, VideoSourceOutputTypeDef]
|
|
716
|
+
|
|
717
|
+
|
|
585
718
|
class ToolTypeDef(TypedDict):
|
|
586
719
|
toolSpec: NotRequired[ToolSpecificationTypeDef]
|
|
587
720
|
|
|
588
721
|
|
|
722
|
+
class ListAsyncInvokesResponseTypeDef(TypedDict):
|
|
723
|
+
asyncInvokeSummaries: List[AsyncInvokeSummaryTypeDef]
|
|
724
|
+
ResponseMetadata: ResponseMetadataTypeDef
|
|
725
|
+
nextToken: NotRequired[str]
|
|
726
|
+
|
|
727
|
+
|
|
589
728
|
DocumentBlockTypeDef = TypedDict(
|
|
590
729
|
"DocumentBlockTypeDef",
|
|
591
730
|
{
|
|
@@ -615,10 +754,21 @@ class GuardrailAssessmentTypeDef(TypedDict):
|
|
|
615
754
|
invocationMetrics: NotRequired[GuardrailInvocationMetricsTypeDef]
|
|
616
755
|
|
|
617
756
|
|
|
618
|
-
class
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
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
|
+
)
|
|
622
772
|
|
|
623
773
|
|
|
624
774
|
class ToolConfigurationTypeDef(TypedDict):
|
|
@@ -650,10 +800,28 @@ class GuardrailTraceAssessmentTypeDef(TypedDict):
|
|
|
650
800
|
outputAssessments: NotRequired[Dict[str, List[GuardrailAssessmentTypeDef]]]
|
|
651
801
|
|
|
652
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
|
+
|
|
653
820
|
class ContentBlockOutputTypeDef(TypedDict):
|
|
654
821
|
text: NotRequired[str]
|
|
655
822
|
image: NotRequired[ImageBlockOutputTypeDef]
|
|
656
823
|
document: NotRequired[DocumentBlockOutputTypeDef]
|
|
824
|
+
video: NotRequired[VideoBlockOutputTypeDef]
|
|
657
825
|
toolUse: NotRequired[ToolUseBlockOutputTypeDef]
|
|
658
826
|
toolResult: NotRequired[ToolResultBlockOutputTypeDef]
|
|
659
827
|
guardContent: NotRequired[GuardrailConverseContentBlockOutputTypeDef]
|
|
@@ -664,14 +832,14 @@ class ToolResultContentBlockTypeDef(TypedDict):
|
|
|
664
832
|
text: NotRequired[str]
|
|
665
833
|
image: NotRequired[ImageBlockUnionTypeDef]
|
|
666
834
|
document: NotRequired[DocumentBlockUnionTypeDef]
|
|
835
|
+
video: NotRequired[VideoBlockUnionTypeDef]
|
|
667
836
|
|
|
668
837
|
|
|
669
|
-
class
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
guardrail: NotRequired[GuardrailTraceAssessmentTypeDef]
|
|
838
|
+
class ConverseStreamMetadataEventTypeDef(TypedDict):
|
|
839
|
+
usage: TokenUsageTypeDef
|
|
840
|
+
metrics: ConverseStreamMetricsTypeDef
|
|
841
|
+
trace: NotRequired[ConverseStreamTraceTypeDef]
|
|
842
|
+
performanceConfig: NotRequired[PerformanceConfigurationTypeDef]
|
|
675
843
|
|
|
676
844
|
|
|
677
845
|
class MessageOutputTypeDef(TypedDict):
|
|
@@ -684,23 +852,6 @@ ToolResultContentBlockUnionTypeDef = Union[
|
|
|
684
852
|
]
|
|
685
853
|
|
|
686
854
|
|
|
687
|
-
class ConverseStreamMetadataEventTypeDef(TypedDict):
|
|
688
|
-
usage: TokenUsageTypeDef
|
|
689
|
-
metrics: ConverseStreamMetricsTypeDef
|
|
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]
|
|
702
|
-
|
|
703
|
-
|
|
704
855
|
class ConverseStreamOutputTypeDef(TypedDict):
|
|
705
856
|
messageStart: NotRequired[MessageStartEventTypeDef]
|
|
706
857
|
contentBlockStart: NotRequired[ContentBlockStartEventTypeDef]
|
|
@@ -715,6 +866,21 @@ class ConverseStreamOutputTypeDef(TypedDict):
|
|
|
715
866
|
serviceUnavailableException: NotRequired[ServiceUnavailableExceptionTypeDef]
|
|
716
867
|
|
|
717
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
|
+
|
|
718
884
|
class ConverseResponseTypeDef(TypedDict):
|
|
719
885
|
output: ConverseOutputTypeDef
|
|
720
886
|
stopReason: StopReasonType
|
|
@@ -729,15 +895,11 @@ class ConverseResponseTypeDef(TypedDict):
|
|
|
729
895
|
ToolResultBlockUnionTypeDef = Union[ToolResultBlockTypeDef, ToolResultBlockOutputTypeDef]
|
|
730
896
|
|
|
731
897
|
|
|
732
|
-
class ConverseStreamResponseTypeDef(TypedDict):
|
|
733
|
-
stream: "EventStream[ConverseStreamOutputTypeDef]"
|
|
734
|
-
ResponseMetadata: ResponseMetadataTypeDef
|
|
735
|
-
|
|
736
|
-
|
|
737
898
|
class ContentBlockTypeDef(TypedDict):
|
|
738
899
|
text: NotRequired[str]
|
|
739
900
|
image: NotRequired[ImageBlockUnionTypeDef]
|
|
740
901
|
document: NotRequired[DocumentBlockUnionTypeDef]
|
|
902
|
+
video: NotRequired[VideoBlockUnionTypeDef]
|
|
741
903
|
toolUse: NotRequired[ToolUseBlockUnionTypeDef]
|
|
742
904
|
toolResult: NotRequired[ToolResultBlockUnionTypeDef]
|
|
743
905
|
guardContent: NotRequired[GuardrailConverseContentBlockUnionTypeDef]
|
|
@@ -761,6 +923,7 @@ class ConverseStreamRequestRequestTypeDef(TypedDict):
|
|
|
761
923
|
additionalModelRequestFields: NotRequired[Mapping[str, Any]]
|
|
762
924
|
promptVariables: NotRequired[Mapping[str, PromptVariableValuesTypeDef]]
|
|
763
925
|
additionalModelResponseFieldPaths: NotRequired[Sequence[str]]
|
|
926
|
+
requestMetadata: NotRequired[Mapping[str, str]]
|
|
764
927
|
performanceConfig: NotRequired[PerformanceConfigurationTypeDef]
|
|
765
928
|
|
|
766
929
|
|
|
@@ -777,4 +940,5 @@ class ConverseRequestRequestTypeDef(TypedDict):
|
|
|
777
940
|
additionalModelRequestFields: NotRequired[Mapping[str, Any]]
|
|
778
941
|
promptVariables: NotRequired[Mapping[str, PromptVariableValuesTypeDef]]
|
|
779
942
|
additionalModelResponseFieldPaths: NotRequired[Sequence[str]]
|
|
943
|
+
requestMetadata: NotRequired[Mapping[str, str]]
|
|
780
944
|
performanceConfig: NotRequired[PerformanceConfigurationTypeDef]
|