aws-sdk-bedrockruntime 1.62.0 → 1.64.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-bedrockruntime/async_client.rb +1 -1
- data/lib/aws-sdk-bedrockruntime/client.rb +97 -1
- data/lib/aws-sdk-bedrockruntime/client_api.rb +52 -0
- data/lib/aws-sdk-bedrockruntime/types.rb +307 -38
- data/lib/aws-sdk-bedrockruntime.rb +1 -1
- data/sig/client.rbs +75 -9
- data/sig/types.rbs +59 -0
- metadata +1 -1
|
@@ -30,7 +30,12 @@ module Aws::BedrockRuntime
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# The model must request at least one tool (no text is generated). For
|
|
33
|
-
# example, `{"any" : {}}`.
|
|
33
|
+
# example, `{"any" : {}}`. For more information, see [Call a tool with
|
|
34
|
+
# the Converse API][1] in the Amazon Bedrock User Guide.
|
|
35
|
+
#
|
|
36
|
+
#
|
|
37
|
+
#
|
|
38
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html
|
|
34
39
|
#
|
|
35
40
|
# @api private
|
|
36
41
|
#
|
|
@@ -217,7 +222,13 @@ module Aws::BedrockRuntime
|
|
|
217
222
|
end
|
|
218
223
|
|
|
219
224
|
# The Model automatically decides if a tool should be called or whether
|
|
220
|
-
# to generate text instead. For example, `{"auto" : {}}`.
|
|
225
|
+
# to generate text instead. For example, `{"auto" : {}}`. For more
|
|
226
|
+
# information, see [Call a tool with the Converse API][1] in the Amazon
|
|
227
|
+
# Bedrock User Guide
|
|
228
|
+
#
|
|
229
|
+
#
|
|
230
|
+
#
|
|
231
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html
|
|
221
232
|
#
|
|
222
233
|
# @api private
|
|
223
234
|
#
|
|
@@ -336,6 +347,10 @@ module Aws::BedrockRuntime
|
|
|
336
347
|
#
|
|
337
348
|
# @note CitationLocation is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of CitationLocation corresponding to the set member.
|
|
338
349
|
#
|
|
350
|
+
# @!attribute [rw] web
|
|
351
|
+
# The web URL that was cited for this reference.
|
|
352
|
+
# @return [Types::WebLocation]
|
|
353
|
+
#
|
|
339
354
|
# @!attribute [rw] document_char
|
|
340
355
|
# The character-level location within the document where the cited
|
|
341
356
|
# content is found.
|
|
@@ -355,6 +370,7 @@ module Aws::BedrockRuntime
|
|
|
355
370
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/CitationLocation AWS API Documentation
|
|
356
371
|
#
|
|
357
372
|
class CitationLocation < Struct.new(
|
|
373
|
+
:web,
|
|
358
374
|
:document_char,
|
|
359
375
|
:document_page,
|
|
360
376
|
:document_chunk,
|
|
@@ -363,6 +379,7 @@ module Aws::BedrockRuntime
|
|
|
363
379
|
include Aws::Structure
|
|
364
380
|
include Aws::Structure::Union
|
|
365
381
|
|
|
382
|
+
class Web < CitationLocation; end
|
|
366
383
|
class DocumentChar < CitationLocation; end
|
|
367
384
|
class DocumentPage < CitationLocation; end
|
|
368
385
|
class DocumentChunk < CitationLocation; end
|
|
@@ -416,10 +433,10 @@ module Aws::BedrockRuntime
|
|
|
416
433
|
# source documents.
|
|
417
434
|
#
|
|
418
435
|
# @!attribute [rw] enabled
|
|
419
|
-
# Specifies whether
|
|
420
|
-
# model's response. When set to true, the model can
|
|
421
|
-
# citations that reference the source documents used to
|
|
422
|
-
# response.
|
|
436
|
+
# Specifies whether citations from the selected document should be
|
|
437
|
+
# used in the model's response. When set to true, the model can
|
|
438
|
+
# generate citations that reference the source documents used to
|
|
439
|
+
# inform the response.
|
|
423
440
|
# @return [Boolean]
|
|
424
441
|
#
|
|
425
442
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/CitationsConfig AWS API Documentation
|
|
@@ -604,6 +621,10 @@ module Aws::BedrockRuntime
|
|
|
604
621
|
# Information about a tool that the model is requesting to use.
|
|
605
622
|
# @return [Types::ToolUseBlockDelta]
|
|
606
623
|
#
|
|
624
|
+
# @!attribute [rw] tool_result
|
|
625
|
+
# An incremental update that contains the results from a tool call.
|
|
626
|
+
# @return [Array<Types::ToolResultBlockDelta>]
|
|
627
|
+
#
|
|
607
628
|
# @!attribute [rw] reasoning_content
|
|
608
629
|
# Contains content regarding the reasoning that is carried out by the
|
|
609
630
|
# model. Reasoning refers to a Chain of Thought (CoT) that the model
|
|
@@ -620,6 +641,7 @@ module Aws::BedrockRuntime
|
|
|
620
641
|
class ContentBlockDelta < Struct.new(
|
|
621
642
|
:text,
|
|
622
643
|
:tool_use,
|
|
644
|
+
:tool_result,
|
|
623
645
|
:reasoning_content,
|
|
624
646
|
:citation,
|
|
625
647
|
:unknown)
|
|
@@ -629,6 +651,7 @@ module Aws::BedrockRuntime
|
|
|
629
651
|
|
|
630
652
|
class Text < ContentBlockDelta; end
|
|
631
653
|
class ToolUse < ContentBlockDelta; end
|
|
654
|
+
class ToolResult < ContentBlockDelta; end
|
|
632
655
|
class ReasoningContent < ContentBlockDelta; end
|
|
633
656
|
class Citation < ContentBlockDelta; end
|
|
634
657
|
class Unknown < ContentBlockDelta; end
|
|
@@ -662,16 +685,22 @@ module Aws::BedrockRuntime
|
|
|
662
685
|
# Information about a tool that the model is requesting to use.
|
|
663
686
|
# @return [Types::ToolUseBlockStart]
|
|
664
687
|
#
|
|
688
|
+
# @!attribute [rw] tool_result
|
|
689
|
+
# The
|
|
690
|
+
# @return [Types::ToolResultBlockStart]
|
|
691
|
+
#
|
|
665
692
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ContentBlockStart AWS API Documentation
|
|
666
693
|
#
|
|
667
694
|
class ContentBlockStart < Struct.new(
|
|
668
695
|
:tool_use,
|
|
696
|
+
:tool_result,
|
|
669
697
|
:unknown)
|
|
670
698
|
SENSITIVE = []
|
|
671
699
|
include Aws::Structure
|
|
672
700
|
include Aws::Structure::Union
|
|
673
701
|
|
|
674
702
|
class ToolUse < ContentBlockStart; end
|
|
703
|
+
class ToolResult < ContentBlockStart; end
|
|
675
704
|
class Unknown < ContentBlockStart; end
|
|
676
705
|
end
|
|
677
706
|
|
|
@@ -877,6 +906,11 @@ module Aws::BedrockRuntime
|
|
|
877
906
|
# Model performance settings for the request.
|
|
878
907
|
# @return [Types::PerformanceConfiguration]
|
|
879
908
|
#
|
|
909
|
+
# @!attribute [rw] service_tier
|
|
910
|
+
# Specifies the processing tier configuration used for serving the
|
|
911
|
+
# request.
|
|
912
|
+
# @return [Types::ServiceTier]
|
|
913
|
+
#
|
|
880
914
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseRequest AWS API Documentation
|
|
881
915
|
#
|
|
882
916
|
class ConverseRequest < Struct.new(
|
|
@@ -890,7 +924,8 @@ module Aws::BedrockRuntime
|
|
|
890
924
|
:prompt_variables,
|
|
891
925
|
:additional_model_response_field_paths,
|
|
892
926
|
:request_metadata,
|
|
893
|
-
:performance_config
|
|
927
|
+
:performance_config,
|
|
928
|
+
:service_tier)
|
|
894
929
|
SENSITIVE = [:prompt_variables, :request_metadata]
|
|
895
930
|
include Aws::Structure
|
|
896
931
|
end
|
|
@@ -926,6 +961,11 @@ module Aws::BedrockRuntime
|
|
|
926
961
|
# Model performance settings for the request.
|
|
927
962
|
# @return [Types::PerformanceConfiguration]
|
|
928
963
|
#
|
|
964
|
+
# @!attribute [rw] service_tier
|
|
965
|
+
# Specifies the processing tier configuration used for serving the
|
|
966
|
+
# request.
|
|
967
|
+
# @return [Types::ServiceTier]
|
|
968
|
+
#
|
|
929
969
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseResponse AWS API Documentation
|
|
930
970
|
#
|
|
931
971
|
class ConverseResponse < Struct.new(
|
|
@@ -935,7 +975,8 @@ module Aws::BedrockRuntime
|
|
|
935
975
|
:metrics,
|
|
936
976
|
:additional_model_response_fields,
|
|
937
977
|
:trace,
|
|
938
|
-
:performance_config
|
|
978
|
+
:performance_config,
|
|
979
|
+
:service_tier)
|
|
939
980
|
SENSITIVE = []
|
|
940
981
|
include Aws::Structure
|
|
941
982
|
end
|
|
@@ -964,6 +1005,11 @@ module Aws::BedrockRuntime
|
|
|
964
1005
|
# event.
|
|
965
1006
|
# @return [Types::PerformanceConfiguration]
|
|
966
1007
|
#
|
|
1008
|
+
# @!attribute [rw] service_tier
|
|
1009
|
+
# Specifies the processing tier configuration used for serving the
|
|
1010
|
+
# request.
|
|
1011
|
+
# @return [Types::ServiceTier]
|
|
1012
|
+
#
|
|
967
1013
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseStreamMetadataEvent AWS API Documentation
|
|
968
1014
|
#
|
|
969
1015
|
class ConverseStreamMetadataEvent < Struct.new(
|
|
@@ -971,6 +1017,7 @@ module Aws::BedrockRuntime
|
|
|
971
1017
|
:metrics,
|
|
972
1018
|
:trace,
|
|
973
1019
|
:performance_config,
|
|
1020
|
+
:service_tier,
|
|
974
1021
|
:event_type)
|
|
975
1022
|
SENSITIVE = []
|
|
976
1023
|
include Aws::Structure
|
|
@@ -1114,6 +1161,11 @@ module Aws::BedrockRuntime
|
|
|
1114
1161
|
# Model performance settings for the request.
|
|
1115
1162
|
# @return [Types::PerformanceConfiguration]
|
|
1116
1163
|
#
|
|
1164
|
+
# @!attribute [rw] service_tier
|
|
1165
|
+
# Specifies the processing tier configuration used for serving the
|
|
1166
|
+
# request.
|
|
1167
|
+
# @return [Types::ServiceTier]
|
|
1168
|
+
#
|
|
1117
1169
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseStreamRequest AWS API Documentation
|
|
1118
1170
|
#
|
|
1119
1171
|
class ConverseStreamRequest < Struct.new(
|
|
@@ -1127,7 +1179,8 @@ module Aws::BedrockRuntime
|
|
|
1127
1179
|
:prompt_variables,
|
|
1128
1180
|
:additional_model_response_field_paths,
|
|
1129
1181
|
:request_metadata,
|
|
1130
|
-
:performance_config
|
|
1182
|
+
:performance_config,
|
|
1183
|
+
:service_tier)
|
|
1131
1184
|
SENSITIVE = [:prompt_variables, :request_metadata]
|
|
1132
1185
|
include Aws::Structure
|
|
1133
1186
|
end
|
|
@@ -1144,8 +1197,7 @@ module Aws::BedrockRuntime
|
|
|
1144
1197
|
include Aws::Structure
|
|
1145
1198
|
end
|
|
1146
1199
|
|
|
1147
|
-
# The trace object in a response from [ConverseStream][1].
|
|
1148
|
-
# you can only trace guardrails.
|
|
1200
|
+
# The trace object in a response from [ConverseStream][1].
|
|
1149
1201
|
#
|
|
1150
1202
|
#
|
|
1151
1203
|
#
|
|
@@ -1185,17 +1237,30 @@ module Aws::BedrockRuntime
|
|
|
1185
1237
|
# provided.
|
|
1186
1238
|
# @return [Array<Types::SystemContentBlock>]
|
|
1187
1239
|
#
|
|
1240
|
+
# @!attribute [rw] tool_config
|
|
1241
|
+
# The toolConfig of Converse input request to count tokens for.
|
|
1242
|
+
# Configuration information for the tools that the model can use when
|
|
1243
|
+
# generating a response.
|
|
1244
|
+
# @return [Types::ToolConfiguration]
|
|
1245
|
+
#
|
|
1246
|
+
# @!attribute [rw] additional_model_request_fields
|
|
1247
|
+
# The additionalModelRequestFields of Converse input request to count
|
|
1248
|
+
# tokens for. Use this field when you want to pass additional
|
|
1249
|
+
# parameters that the model supports.
|
|
1250
|
+
# @return [Hash,Array,String,Numeric,Boolean]
|
|
1251
|
+
#
|
|
1188
1252
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseTokensRequest AWS API Documentation
|
|
1189
1253
|
#
|
|
1190
1254
|
class ConverseTokensRequest < Struct.new(
|
|
1191
1255
|
:messages,
|
|
1192
|
-
:system
|
|
1256
|
+
:system,
|
|
1257
|
+
:tool_config,
|
|
1258
|
+
:additional_model_request_fields)
|
|
1193
1259
|
SENSITIVE = []
|
|
1194
1260
|
include Aws::Structure
|
|
1195
1261
|
end
|
|
1196
1262
|
|
|
1197
|
-
# The trace object in a response from [Converse][1].
|
|
1198
|
-
# only trace guardrails.
|
|
1263
|
+
# The trace object in a response from [Converse][1].
|
|
1199
1264
|
#
|
|
1200
1265
|
#
|
|
1201
1266
|
#
|
|
@@ -2263,7 +2328,12 @@ module Aws::BedrockRuntime
|
|
|
2263
2328
|
end
|
|
2264
2329
|
|
|
2265
2330
|
# A text block that contains text that you want to assess with a
|
|
2266
|
-
# guardrail. For more information, see
|
|
2331
|
+
# guardrail. For more information, see
|
|
2332
|
+
# [GuardrailConverseContentBlock][1].
|
|
2333
|
+
#
|
|
2334
|
+
#
|
|
2335
|
+
#
|
|
2336
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_GuardrailConverseContentBlock.html
|
|
2267
2337
|
#
|
|
2268
2338
|
# @!attribute [rw] text
|
|
2269
2339
|
# The text that you want to guard.
|
|
@@ -2527,7 +2597,7 @@ module Aws::BedrockRuntime
|
|
|
2527
2597
|
include Aws::Structure
|
|
2528
2598
|
end
|
|
2529
2599
|
|
|
2530
|
-
# The assessment for
|
|
2600
|
+
# The assessment for a Personally Identifiable Information (PII) policy.
|
|
2531
2601
|
#
|
|
2532
2602
|
# @!attribute [rw] pii_entities
|
|
2533
2603
|
# The PII entities in the assessment.
|
|
@@ -2547,7 +2617,11 @@ module Aws::BedrockRuntime
|
|
|
2547
2617
|
end
|
|
2548
2618
|
|
|
2549
2619
|
# Configuration information for a guardrail that you use with the
|
|
2550
|
-
# ConverseStream action.
|
|
2620
|
+
# [ConverseStream][1] action.
|
|
2621
|
+
#
|
|
2622
|
+
#
|
|
2623
|
+
#
|
|
2624
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html
|
|
2551
2625
|
#
|
|
2552
2626
|
# @!attribute [rw] guardrail_identifier
|
|
2553
2627
|
# The identifier for the guardrail.
|
|
@@ -2663,7 +2737,11 @@ module Aws::BedrockRuntime
|
|
|
2663
2737
|
end
|
|
2664
2738
|
|
|
2665
2739
|
# A Top level guardrail trace object. For more information, see
|
|
2666
|
-
# ConverseTrace.
|
|
2740
|
+
# [ConverseTrace][1].
|
|
2741
|
+
#
|
|
2742
|
+
#
|
|
2743
|
+
#
|
|
2744
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseTrace.html
|
|
2667
2745
|
#
|
|
2668
2746
|
# @!attribute [rw] model_output
|
|
2669
2747
|
# The output from the model.
|
|
@@ -3007,6 +3085,10 @@ module Aws::BedrockRuntime
|
|
|
3007
3085
|
# Model performance settings for the request.
|
|
3008
3086
|
# @return [String]
|
|
3009
3087
|
#
|
|
3088
|
+
# @!attribute [rw] service_tier
|
|
3089
|
+
# Specifies the processing tier type used for serving the request.
|
|
3090
|
+
# @return [String]
|
|
3091
|
+
#
|
|
3010
3092
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelRequest AWS API Documentation
|
|
3011
3093
|
#
|
|
3012
3094
|
class InvokeModelRequest < Struct.new(
|
|
@@ -3017,7 +3099,8 @@ module Aws::BedrockRuntime
|
|
|
3017
3099
|
:trace,
|
|
3018
3100
|
:guardrail_identifier,
|
|
3019
3101
|
:guardrail_version,
|
|
3020
|
-
:performance_config_latency
|
|
3102
|
+
:performance_config_latency,
|
|
3103
|
+
:service_tier)
|
|
3021
3104
|
SENSITIVE = [:body]
|
|
3022
3105
|
include Aws::Structure
|
|
3023
3106
|
end
|
|
@@ -3041,12 +3124,17 @@ module Aws::BedrockRuntime
|
|
|
3041
3124
|
# Model performance settings for the request.
|
|
3042
3125
|
# @return [String]
|
|
3043
3126
|
#
|
|
3127
|
+
# @!attribute [rw] service_tier
|
|
3128
|
+
# Specifies the processing tier type used for serving the request.
|
|
3129
|
+
# @return [String]
|
|
3130
|
+
#
|
|
3044
3131
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelResponse AWS API Documentation
|
|
3045
3132
|
#
|
|
3046
3133
|
class InvokeModelResponse < Struct.new(
|
|
3047
3134
|
:body,
|
|
3048
3135
|
:content_type,
|
|
3049
|
-
:performance_config_latency
|
|
3136
|
+
:performance_config_latency,
|
|
3137
|
+
:service_tier)
|
|
3050
3138
|
SENSITIVE = [:body]
|
|
3051
3139
|
include Aws::Structure
|
|
3052
3140
|
end
|
|
@@ -3206,6 +3294,10 @@ module Aws::BedrockRuntime
|
|
|
3206
3294
|
# Model performance settings for the request.
|
|
3207
3295
|
# @return [String]
|
|
3208
3296
|
#
|
|
3297
|
+
# @!attribute [rw] service_tier
|
|
3298
|
+
# Specifies the processing tier type used for serving the request.
|
|
3299
|
+
# @return [String]
|
|
3300
|
+
#
|
|
3209
3301
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelWithResponseStreamRequest AWS API Documentation
|
|
3210
3302
|
#
|
|
3211
3303
|
class InvokeModelWithResponseStreamRequest < Struct.new(
|
|
@@ -3216,7 +3308,8 @@ module Aws::BedrockRuntime
|
|
|
3216
3308
|
:trace,
|
|
3217
3309
|
:guardrail_identifier,
|
|
3218
3310
|
:guardrail_version,
|
|
3219
|
-
:performance_config_latency
|
|
3311
|
+
:performance_config_latency,
|
|
3312
|
+
:service_tier)
|
|
3220
3313
|
SENSITIVE = [:body]
|
|
3221
3314
|
include Aws::Structure
|
|
3222
3315
|
end
|
|
@@ -3239,12 +3332,17 @@ module Aws::BedrockRuntime
|
|
|
3239
3332
|
# Model performance settings for the request.
|
|
3240
3333
|
# @return [String]
|
|
3241
3334
|
#
|
|
3335
|
+
# @!attribute [rw] service_tier
|
|
3336
|
+
# Specifies the processing tier type used for serving the request.
|
|
3337
|
+
# @return [String]
|
|
3338
|
+
#
|
|
3242
3339
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelWithResponseStreamResponse AWS API Documentation
|
|
3243
3340
|
#
|
|
3244
3341
|
class InvokeModelWithResponseStreamResponse < Struct.new(
|
|
3245
3342
|
:body,
|
|
3246
3343
|
:content_type,
|
|
3247
|
-
:performance_config_latency
|
|
3344
|
+
:performance_config_latency,
|
|
3345
|
+
:service_tier)
|
|
3248
3346
|
SENSITIVE = []
|
|
3249
3347
|
include Aws::Structure
|
|
3250
3348
|
end
|
|
@@ -3687,6 +3785,21 @@ module Aws::BedrockRuntime
|
|
|
3687
3785
|
include Aws::Structure
|
|
3688
3786
|
end
|
|
3689
3787
|
|
|
3788
|
+
# Specifies the processing tier configuration used for serving the
|
|
3789
|
+
# request.
|
|
3790
|
+
#
|
|
3791
|
+
# @!attribute [rw] type
|
|
3792
|
+
# Specifies the processing tier type used for serving the request.
|
|
3793
|
+
# @return [String]
|
|
3794
|
+
#
|
|
3795
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ServiceTier AWS API Documentation
|
|
3796
|
+
#
|
|
3797
|
+
class ServiceTier < Struct.new(
|
|
3798
|
+
:type)
|
|
3799
|
+
SENSITIVE = []
|
|
3800
|
+
include Aws::Structure
|
|
3801
|
+
end
|
|
3802
|
+
|
|
3690
3803
|
# The service isn't currently available. For troubleshooting this
|
|
3691
3804
|
# error, see [ServiceUnavailable][1] in the Amazon Bedrock User Guide
|
|
3692
3805
|
#
|
|
@@ -3707,12 +3820,17 @@ module Aws::BedrockRuntime
|
|
|
3707
3820
|
end
|
|
3708
3821
|
|
|
3709
3822
|
# The model must request a specific tool. For example, `{"tool" :
|
|
3710
|
-
# {"name" : "Your tool name"}}`.
|
|
3823
|
+
# {"name" : "Your tool name"}}`. For more information, see [Call a tool
|
|
3824
|
+
# with the Converse API][1] in the Amazon Bedrock User Guide
|
|
3711
3825
|
#
|
|
3712
3826
|
# <note markdown="1"> This field is only supported by Anthropic Claude 3 models.
|
|
3713
3827
|
#
|
|
3714
3828
|
# </note>
|
|
3715
3829
|
#
|
|
3830
|
+
#
|
|
3831
|
+
#
|
|
3832
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html
|
|
3833
|
+
#
|
|
3716
3834
|
# @!attribute [rw] name
|
|
3717
3835
|
# The name of the tool that the model must request.
|
|
3718
3836
|
# @return [String]
|
|
@@ -3773,7 +3891,12 @@ module Aws::BedrockRuntime
|
|
|
3773
3891
|
include Aws::Structure
|
|
3774
3892
|
end
|
|
3775
3893
|
|
|
3776
|
-
#
|
|
3894
|
+
# Contains configurations for instructions to provide the model for how
|
|
3895
|
+
# to handle input. To learn more, see [Using the Converse API][1].
|
|
3896
|
+
#
|
|
3897
|
+
#
|
|
3898
|
+
#
|
|
3899
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference-call.html
|
|
3777
3900
|
#
|
|
3778
3901
|
# @note SystemContentBlock is a union - when making an API calls you must set exactly one of the members.
|
|
3779
3902
|
#
|
|
@@ -3815,6 +3938,21 @@ module Aws::BedrockRuntime
|
|
|
3815
3938
|
class Unknown < SystemContentBlock; end
|
|
3816
3939
|
end
|
|
3817
3940
|
|
|
3941
|
+
# Specifies a system-defined tool for the model to use. *System-defined
|
|
3942
|
+
# tools* are tools that are created and provided by the model provider.
|
|
3943
|
+
#
|
|
3944
|
+
# @!attribute [rw] name
|
|
3945
|
+
# The name of the system-defined tool that you want to call.
|
|
3946
|
+
# @return [String]
|
|
3947
|
+
#
|
|
3948
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/SystemTool AWS API Documentation
|
|
3949
|
+
#
|
|
3950
|
+
class SystemTool < Struct.new(
|
|
3951
|
+
:name)
|
|
3952
|
+
SENSITIVE = []
|
|
3953
|
+
include Aws::Structure
|
|
3954
|
+
end
|
|
3955
|
+
|
|
3818
3956
|
# A tag.
|
|
3819
3957
|
#
|
|
3820
3958
|
# @!attribute [rw] key
|
|
@@ -3889,8 +4027,8 @@ module Aws::BedrockRuntime
|
|
|
3889
4027
|
end
|
|
3890
4028
|
|
|
3891
4029
|
# Information about a tool that you can use with the Converse API. For
|
|
3892
|
-
# more information, see [
|
|
3893
|
-
# Bedrock User Guide.
|
|
4030
|
+
# more information, see [Call a tool with the Converse API][1] in the
|
|
4031
|
+
# Amazon Bedrock User Guide.
|
|
3894
4032
|
#
|
|
3895
4033
|
#
|
|
3896
4034
|
#
|
|
@@ -3902,6 +4040,10 @@ module Aws::BedrockRuntime
|
|
|
3902
4040
|
# The specfication for the tool.
|
|
3903
4041
|
# @return [Types::ToolSpecification]
|
|
3904
4042
|
#
|
|
4043
|
+
# @!attribute [rw] system_tool
|
|
4044
|
+
# Specifies the system-defined tool that you want use.
|
|
4045
|
+
# @return [Types::SystemTool]
|
|
4046
|
+
#
|
|
3905
4047
|
# @!attribute [rw] cache_point
|
|
3906
4048
|
# CachePoint to include in the tool configuration.
|
|
3907
4049
|
# @return [Types::CachePointBlock]
|
|
@@ -3910,6 +4052,7 @@ module Aws::BedrockRuntime
|
|
|
3910
4052
|
#
|
|
3911
4053
|
class Tool < Struct.new(
|
|
3912
4054
|
:tool_spec,
|
|
4055
|
+
:system_tool,
|
|
3913
4056
|
:cache_point,
|
|
3914
4057
|
:unknown)
|
|
3915
4058
|
SENSITIVE = []
|
|
@@ -3917,13 +4060,18 @@ module Aws::BedrockRuntime
|
|
|
3917
4060
|
include Aws::Structure::Union
|
|
3918
4061
|
|
|
3919
4062
|
class ToolSpec < Tool; end
|
|
4063
|
+
class SystemTool < Tool; end
|
|
3920
4064
|
class CachePoint < Tool; end
|
|
3921
4065
|
class Unknown < Tool; end
|
|
3922
4066
|
end
|
|
3923
4067
|
|
|
3924
4068
|
# Determines which tools the model should request in a call to
|
|
3925
|
-
# `Converse` or `ConverseStream`.
|
|
3926
|
-
#
|
|
4069
|
+
# `Converse` or `ConverseStream`. For more information, see [Call a tool
|
|
4070
|
+
# with the Converse API][1] in the Amazon Bedrock User Guide.
|
|
4071
|
+
#
|
|
4072
|
+
#
|
|
4073
|
+
#
|
|
4074
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html
|
|
3927
4075
|
#
|
|
3928
4076
|
# @note ToolChoice is a union - when making an API calls you must set exactly one of the members.
|
|
3929
4077
|
#
|
|
@@ -3938,7 +4086,7 @@ module Aws::BedrockRuntime
|
|
|
3938
4086
|
#
|
|
3939
4087
|
# @!attribute [rw] tool
|
|
3940
4088
|
# The Model must request the specified tool. Only supported by
|
|
3941
|
-
# Anthropic Claude 3 models.
|
|
4089
|
+
# Anthropic Claude 3 and Amazon Nova models.
|
|
3942
4090
|
# @return [Types::SpecificToolChoice]
|
|
3943
4091
|
#
|
|
3944
4092
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ToolChoice AWS API Documentation
|
|
@@ -3984,6 +4132,12 @@ module Aws::BedrockRuntime
|
|
|
3984
4132
|
end
|
|
3985
4133
|
|
|
3986
4134
|
# The schema for the tool. The top level schema type must be `object`.
|
|
4135
|
+
# For more information, see [Call a tool with the Converse API][1] in
|
|
4136
|
+
# the Amazon Bedrock User Guide.
|
|
4137
|
+
#
|
|
4138
|
+
#
|
|
4139
|
+
#
|
|
4140
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html
|
|
3987
4141
|
#
|
|
3988
4142
|
# @note ToolInputSchema is a union - when making an API calls you must set exactly one of the members.
|
|
3989
4143
|
#
|
|
@@ -4010,7 +4164,12 @@ module Aws::BedrockRuntime
|
|
|
4010
4164
|
end
|
|
4011
4165
|
|
|
4012
4166
|
# A tool result block that contains the results for a tool request that
|
|
4013
|
-
# the model previously made.
|
|
4167
|
+
# the model previously made. For more information, see [Call a tool with
|
|
4168
|
+
# the Converse API][1] in the Amazon Bedrock User Guide.
|
|
4169
|
+
#
|
|
4170
|
+
#
|
|
4171
|
+
#
|
|
4172
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html
|
|
4014
4173
|
#
|
|
4015
4174
|
# @!attribute [rw] tool_use_id
|
|
4016
4175
|
# The ID of the tool request that this is the result for.
|
|
@@ -4023,22 +4182,86 @@ module Aws::BedrockRuntime
|
|
|
4023
4182
|
# @!attribute [rw] status
|
|
4024
4183
|
# The status for the tool result content block.
|
|
4025
4184
|
#
|
|
4026
|
-
# <note markdown="1"> This field is only supported Anthropic Claude 3
|
|
4185
|
+
# <note markdown="1"> This field is only supported by Amazon Nova and Anthropic Claude 3
|
|
4186
|
+
# and 4 models.
|
|
4027
4187
|
#
|
|
4028
4188
|
# </note>
|
|
4029
4189
|
# @return [String]
|
|
4030
4190
|
#
|
|
4191
|
+
# @!attribute [rw] type
|
|
4192
|
+
# The type for the tool result content block.
|
|
4193
|
+
# @return [String]
|
|
4194
|
+
#
|
|
4031
4195
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ToolResultBlock AWS API Documentation
|
|
4032
4196
|
#
|
|
4033
4197
|
class ToolResultBlock < Struct.new(
|
|
4034
4198
|
:tool_use_id,
|
|
4035
4199
|
:content,
|
|
4200
|
+
:status,
|
|
4201
|
+
:type)
|
|
4202
|
+
SENSITIVE = []
|
|
4203
|
+
include Aws::Structure
|
|
4204
|
+
end
|
|
4205
|
+
|
|
4206
|
+
# Contains incremental updates to tool results information during
|
|
4207
|
+
# streaming responses. This allows clients to build up tool results data
|
|
4208
|
+
# progressively as the response is generated.
|
|
4209
|
+
#
|
|
4210
|
+
# @note ToolResultBlockDelta is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of ToolResultBlockDelta corresponding to the set member.
|
|
4211
|
+
#
|
|
4212
|
+
# @!attribute [rw] text
|
|
4213
|
+
# The reasoning the model used to return the output.
|
|
4214
|
+
# @return [String]
|
|
4215
|
+
#
|
|
4216
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ToolResultBlockDelta AWS API Documentation
|
|
4217
|
+
#
|
|
4218
|
+
class ToolResultBlockDelta < Struct.new(
|
|
4219
|
+
:text,
|
|
4220
|
+
:unknown)
|
|
4221
|
+
SENSITIVE = []
|
|
4222
|
+
include Aws::Structure
|
|
4223
|
+
include Aws::Structure::Union
|
|
4224
|
+
|
|
4225
|
+
class Text < ToolResultBlockDelta; end
|
|
4226
|
+
class Unknown < ToolResultBlockDelta; end
|
|
4227
|
+
end
|
|
4228
|
+
|
|
4229
|
+
# The start of a tool result block. For more information, see [Call a
|
|
4230
|
+
# tool with the Converse API][1] in the Amazon Bedrock User Guide.
|
|
4231
|
+
#
|
|
4232
|
+
#
|
|
4233
|
+
#
|
|
4234
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html
|
|
4235
|
+
#
|
|
4236
|
+
# @!attribute [rw] tool_use_id
|
|
4237
|
+
# The ID of the tool that was used to generate this tool result block.
|
|
4238
|
+
# @return [String]
|
|
4239
|
+
#
|
|
4240
|
+
# @!attribute [rw] type
|
|
4241
|
+
# The type for the tool that was used to generate this tool result
|
|
4242
|
+
# block.
|
|
4243
|
+
# @return [String]
|
|
4244
|
+
#
|
|
4245
|
+
# @!attribute [rw] status
|
|
4246
|
+
# The status of the tool result block.
|
|
4247
|
+
# @return [String]
|
|
4248
|
+
#
|
|
4249
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ToolResultBlockStart AWS API Documentation
|
|
4250
|
+
#
|
|
4251
|
+
class ToolResultBlockStart < Struct.new(
|
|
4252
|
+
:tool_use_id,
|
|
4253
|
+
:type,
|
|
4036
4254
|
:status)
|
|
4037
4255
|
SENSITIVE = []
|
|
4038
4256
|
include Aws::Structure
|
|
4039
4257
|
end
|
|
4040
4258
|
|
|
4041
|
-
# The tool result content block.
|
|
4259
|
+
# The tool result content block. For more information, see [Call a tool
|
|
4260
|
+
# with the Converse API][1] in the Amazon Bedrock User Guide.
|
|
4261
|
+
#
|
|
4262
|
+
#
|
|
4263
|
+
#
|
|
4264
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html
|
|
4042
4265
|
#
|
|
4043
4266
|
# @note ToolResultContentBlock is a union - when making an API calls you must set exactly one of the members.
|
|
4044
4267
|
#
|
|
@@ -4055,7 +4278,8 @@ module Aws::BedrockRuntime
|
|
|
4055
4278
|
# @!attribute [rw] image
|
|
4056
4279
|
# A tool result that is an image.
|
|
4057
4280
|
#
|
|
4058
|
-
# <note markdown="1"> This field is only supported by Anthropic Claude 3
|
|
4281
|
+
# <note markdown="1"> This field is only supported by Amazon Nova and Anthropic Claude 3
|
|
4282
|
+
# and 4 models.
|
|
4059
4283
|
#
|
|
4060
4284
|
# </note>
|
|
4061
4285
|
# @return [Types::ImageBlock]
|
|
@@ -4089,7 +4313,12 @@ module Aws::BedrockRuntime
|
|
|
4089
4313
|
class Unknown < ToolResultContentBlock; end
|
|
4090
4314
|
end
|
|
4091
4315
|
|
|
4092
|
-
# The specification for the tool.
|
|
4316
|
+
# The specification for the tool. For more information, see [Call a tool
|
|
4317
|
+
# with the Converse API][1] in the Amazon Bedrock User Guide.
|
|
4318
|
+
#
|
|
4319
|
+
#
|
|
4320
|
+
#
|
|
4321
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html
|
|
4093
4322
|
#
|
|
4094
4323
|
# @!attribute [rw] name
|
|
4095
4324
|
# The name for the tool.
|
|
@@ -4115,7 +4344,12 @@ module Aws::BedrockRuntime
|
|
|
4115
4344
|
|
|
4116
4345
|
# A tool use content block. Contains information about a tool that the
|
|
4117
4346
|
# model is requesting be run., The model uses the result from the tool
|
|
4118
|
-
# to generate a response.
|
|
4347
|
+
# to generate a response. For more information, see [Call a tool with
|
|
4348
|
+
# the Converse API][1] in the Amazon Bedrock User Guide.
|
|
4349
|
+
#
|
|
4350
|
+
#
|
|
4351
|
+
#
|
|
4352
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html
|
|
4119
4353
|
#
|
|
4120
4354
|
# @!attribute [rw] tool_use_id
|
|
4121
4355
|
# The ID for the tool request.
|
|
@@ -4129,12 +4363,17 @@ module Aws::BedrockRuntime
|
|
|
4129
4363
|
# The input to pass to the tool.
|
|
4130
4364
|
# @return [Hash,Array,String,Numeric,Boolean]
|
|
4131
4365
|
#
|
|
4366
|
+
# @!attribute [rw] type
|
|
4367
|
+
# The type for the tool request.
|
|
4368
|
+
# @return [String]
|
|
4369
|
+
#
|
|
4132
4370
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ToolUseBlock AWS API Documentation
|
|
4133
4371
|
#
|
|
4134
4372
|
class ToolUseBlock < Struct.new(
|
|
4135
4373
|
:tool_use_id,
|
|
4136
4374
|
:name,
|
|
4137
|
-
:input
|
|
4375
|
+
:input,
|
|
4376
|
+
:type)
|
|
4138
4377
|
SENSITIVE = []
|
|
4139
4378
|
include Aws::Structure
|
|
4140
4379
|
end
|
|
@@ -4153,7 +4392,12 @@ module Aws::BedrockRuntime
|
|
|
4153
4392
|
include Aws::Structure
|
|
4154
4393
|
end
|
|
4155
4394
|
|
|
4156
|
-
# The start of a tool use block.
|
|
4395
|
+
# The start of a tool use block. For more information, see [Call a tool
|
|
4396
|
+
# with the Converse API][1] in the Amazon Bedrock User Guide.
|
|
4397
|
+
#
|
|
4398
|
+
#
|
|
4399
|
+
#
|
|
4400
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html
|
|
4157
4401
|
#
|
|
4158
4402
|
# @!attribute [rw] tool_use_id
|
|
4159
4403
|
# The ID for the tool request.
|
|
@@ -4163,11 +4407,16 @@ module Aws::BedrockRuntime
|
|
|
4163
4407
|
# The name of the tool that the model is requesting to use.
|
|
4164
4408
|
# @return [String]
|
|
4165
4409
|
#
|
|
4410
|
+
# @!attribute [rw] type
|
|
4411
|
+
# The type for the tool request.
|
|
4412
|
+
# @return [String]
|
|
4413
|
+
#
|
|
4166
4414
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ToolUseBlockStart AWS API Documentation
|
|
4167
4415
|
#
|
|
4168
4416
|
class ToolUseBlockStart < Struct.new(
|
|
4169
4417
|
:tool_use_id,
|
|
4170
|
-
:name
|
|
4418
|
+
:name,
|
|
4419
|
+
:type)
|
|
4171
4420
|
SENSITIVE = []
|
|
4172
4421
|
include Aws::Structure
|
|
4173
4422
|
end
|
|
@@ -4248,6 +4497,26 @@ module Aws::BedrockRuntime
|
|
|
4248
4497
|
class Unknown < VideoSource; end
|
|
4249
4498
|
end
|
|
4250
4499
|
|
|
4500
|
+
# Provides the URL and domain information for the website that was cited
|
|
4501
|
+
# when performing a web search.
|
|
4502
|
+
#
|
|
4503
|
+
# @!attribute [rw] url
|
|
4504
|
+
# The URL that was cited when performing a web search.
|
|
4505
|
+
# @return [String]
|
|
4506
|
+
#
|
|
4507
|
+
# @!attribute [rw] domain
|
|
4508
|
+
# The domain that was cited when performing a web search.
|
|
4509
|
+
# @return [String]
|
|
4510
|
+
#
|
|
4511
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/WebLocation AWS API Documentation
|
|
4512
|
+
#
|
|
4513
|
+
class WebLocation < Struct.new(
|
|
4514
|
+
:url,
|
|
4515
|
+
:domain)
|
|
4516
|
+
SENSITIVE = []
|
|
4517
|
+
include Aws::Structure
|
|
4518
|
+
end
|
|
4519
|
+
|
|
4251
4520
|
# The messages output stream
|
|
4252
4521
|
#
|
|
4253
4522
|
# EventStream is an Enumerator of Events.
|