aws-sdk-bedrockruntime 1.63.0 → 1.71.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 +40 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-bedrockruntime/async_client.rb +1 -1
- data/lib/aws-sdk-bedrockruntime/client.rb +274 -7
- data/lib/aws-sdk-bedrockruntime/client_api.rb +105 -4
- data/lib/aws-sdk-bedrockruntime/types.rb +390 -10
- data/lib/aws-sdk-bedrockruntime.rb +17 -1
- data/sig/client.rbs +203 -14
- data/sig/types.rbs +108 -2
- metadata +3 -3
|
@@ -728,6 +728,12 @@ module Aws::BedrockRuntime
|
|
|
728
728
|
# resp.assessments[0].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
|
|
729
729
|
# resp.assessments[0].invocation_metrics.guardrail_coverage.images.guarded #=> Integer
|
|
730
730
|
# resp.assessments[0].invocation_metrics.guardrail_coverage.images.total #=> Integer
|
|
731
|
+
# resp.assessments[0].applied_guardrail_details.guardrail_id #=> String
|
|
732
|
+
# resp.assessments[0].applied_guardrail_details.guardrail_version #=> String
|
|
733
|
+
# resp.assessments[0].applied_guardrail_details.guardrail_arn #=> String
|
|
734
|
+
# resp.assessments[0].applied_guardrail_details.guardrail_origin #=> Array
|
|
735
|
+
# resp.assessments[0].applied_guardrail_details.guardrail_origin[0] #=> String, one of "REQUEST", "ACCOUNT_ENFORCED", "ORGANIZATION_ENFORCED"
|
|
736
|
+
# resp.assessments[0].applied_guardrail_details.guardrail_ownership #=> String, one of "SELF", "CROSS_ACCOUNT"
|
|
731
737
|
# resp.guardrail_coverage.text_characters.guarded #=> Integer
|
|
732
738
|
# resp.guardrail_coverage.text_characters.total #=> Integer
|
|
733
739
|
# resp.guardrail_coverage.images.guarded #=> Integer
|
|
@@ -914,6 +920,10 @@ module Aws::BedrockRuntime
|
|
|
914
920
|
# @option params [Types::PerformanceConfiguration] :performance_config
|
|
915
921
|
# Model performance settings for the request.
|
|
916
922
|
#
|
|
923
|
+
# @option params [Types::ServiceTier] :service_tier
|
|
924
|
+
# Specifies the processing tier configuration used for serving the
|
|
925
|
+
# request.
|
|
926
|
+
#
|
|
917
927
|
# @return [Types::ConverseResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
918
928
|
#
|
|
919
929
|
# * {Types::ConverseResponse#output #output} => Types::ConverseOutput
|
|
@@ -923,6 +933,7 @@ module Aws::BedrockRuntime
|
|
|
923
933
|
# * {Types::ConverseResponse#additional_model_response_fields #additional_model_response_fields} => Hash,Array,String,Numeric,Boolean
|
|
924
934
|
# * {Types::ConverseResponse#trace #trace} => Types::ConverseTrace
|
|
925
935
|
# * {Types::ConverseResponse#performance_config #performance_config} => Types::PerformanceConfiguration
|
|
936
|
+
# * {Types::ConverseResponse#service_tier #service_tier} => Types::ServiceTier
|
|
926
937
|
#
|
|
927
938
|
# @example Request syntax with placeholder values
|
|
928
939
|
#
|
|
@@ -943,6 +954,9 @@ module Aws::BedrockRuntime
|
|
|
943
954
|
# bucket_owner: "AccountId",
|
|
944
955
|
# },
|
|
945
956
|
# },
|
|
957
|
+
# error: {
|
|
958
|
+
# message: "String",
|
|
959
|
+
# },
|
|
946
960
|
# },
|
|
947
961
|
# document: {
|
|
948
962
|
# format: "pdf", # accepts pdf, csv, doc, docx, xls, xlsx, html, txt, md
|
|
@@ -975,6 +989,19 @@ module Aws::BedrockRuntime
|
|
|
975
989
|
# },
|
|
976
990
|
# },
|
|
977
991
|
# },
|
|
992
|
+
# audio: {
|
|
993
|
+
# format: "mp3", # required, accepts mp3, opus, wav, aac, flac, mp4, ogg, mkv, mka, x-aac, m4a, mpeg, mpga, pcm, webm
|
|
994
|
+
# source: { # required
|
|
995
|
+
# bytes: "data",
|
|
996
|
+
# s3_location: {
|
|
997
|
+
# uri: "S3Uri", # required
|
|
998
|
+
# bucket_owner: "AccountId",
|
|
999
|
+
# },
|
|
1000
|
+
# },
|
|
1001
|
+
# error: {
|
|
1002
|
+
# message: "String",
|
|
1003
|
+
# },
|
|
1004
|
+
# },
|
|
978
1005
|
# tool_use: {
|
|
979
1006
|
# tool_use_id: "ToolUseId", # required
|
|
980
1007
|
# name: "ToolName", # required
|
|
@@ -998,6 +1025,9 @@ module Aws::BedrockRuntime
|
|
|
998
1025
|
# bucket_owner: "AccountId",
|
|
999
1026
|
# },
|
|
1000
1027
|
# },
|
|
1028
|
+
# error: {
|
|
1029
|
+
# message: "String",
|
|
1030
|
+
# },
|
|
1001
1031
|
# },
|
|
1002
1032
|
# document: {
|
|
1003
1033
|
# format: "pdf", # accepts pdf, csv, doc, docx, xls, xlsx, html, txt, md
|
|
@@ -1030,6 +1060,18 @@ module Aws::BedrockRuntime
|
|
|
1030
1060
|
# },
|
|
1031
1061
|
# },
|
|
1032
1062
|
# },
|
|
1063
|
+
# search_result: {
|
|
1064
|
+
# source: "String", # required
|
|
1065
|
+
# title: "String", # required
|
|
1066
|
+
# content: [ # required
|
|
1067
|
+
# {
|
|
1068
|
+
# text: "String", # required
|
|
1069
|
+
# },
|
|
1070
|
+
# ],
|
|
1071
|
+
# citations: {
|
|
1072
|
+
# enabled: false, # required
|
|
1073
|
+
# },
|
|
1074
|
+
# },
|
|
1033
1075
|
# },
|
|
1034
1076
|
# ],
|
|
1035
1077
|
# status: "success", # accepts success, error
|
|
@@ -1066,6 +1108,7 @@ module Aws::BedrockRuntime
|
|
|
1066
1108
|
# citations: [
|
|
1067
1109
|
# {
|
|
1068
1110
|
# title: "String",
|
|
1111
|
+
# source: "String",
|
|
1069
1112
|
# source_content: [
|
|
1070
1113
|
# {
|
|
1071
1114
|
# text: "String",
|
|
@@ -1091,10 +1134,27 @@ module Aws::BedrockRuntime
|
|
|
1091
1134
|
# start: 1,
|
|
1092
1135
|
# end: 1,
|
|
1093
1136
|
# },
|
|
1137
|
+
# search_result_location: {
|
|
1138
|
+
# search_result_index: 1,
|
|
1139
|
+
# start: 1,
|
|
1140
|
+
# end: 1,
|
|
1141
|
+
# },
|
|
1094
1142
|
# },
|
|
1095
1143
|
# },
|
|
1096
1144
|
# ],
|
|
1097
1145
|
# },
|
|
1146
|
+
# search_result: {
|
|
1147
|
+
# source: "String", # required
|
|
1148
|
+
# title: "String", # required
|
|
1149
|
+
# content: [ # required
|
|
1150
|
+
# {
|
|
1151
|
+
# text: "String", # required
|
|
1152
|
+
# },
|
|
1153
|
+
# ],
|
|
1154
|
+
# citations: {
|
|
1155
|
+
# enabled: false, # required
|
|
1156
|
+
# },
|
|
1157
|
+
# },
|
|
1098
1158
|
# },
|
|
1099
1159
|
# ],
|
|
1100
1160
|
# },
|
|
@@ -1155,8 +1215,8 @@ module Aws::BedrockRuntime
|
|
|
1155
1215
|
# },
|
|
1156
1216
|
# },
|
|
1157
1217
|
# guardrail_config: {
|
|
1158
|
-
# guardrail_identifier: "GuardrailIdentifier",
|
|
1159
|
-
# guardrail_version: "GuardrailVersion",
|
|
1218
|
+
# guardrail_identifier: "GuardrailIdentifier",
|
|
1219
|
+
# guardrail_version: "GuardrailVersion",
|
|
1160
1220
|
# trace: "enabled", # accepts enabled, disabled, enabled_full
|
|
1161
1221
|
# },
|
|
1162
1222
|
# additional_model_request_fields: {
|
|
@@ -1173,6 +1233,9 @@ module Aws::BedrockRuntime
|
|
|
1173
1233
|
# performance_config: {
|
|
1174
1234
|
# latency: "standard", # accepts standard, optimized
|
|
1175
1235
|
# },
|
|
1236
|
+
# service_tier: {
|
|
1237
|
+
# type: "priority", # required, accepts priority, default, flex, reserved
|
|
1238
|
+
# },
|
|
1176
1239
|
# })
|
|
1177
1240
|
#
|
|
1178
1241
|
# @example Response structure
|
|
@@ -1184,6 +1247,7 @@ module Aws::BedrockRuntime
|
|
|
1184
1247
|
# resp.output.message.content[0].image.source.bytes #=> String
|
|
1185
1248
|
# resp.output.message.content[0].image.source.s3_location.uri #=> String
|
|
1186
1249
|
# resp.output.message.content[0].image.source.s3_location.bucket_owner #=> String
|
|
1250
|
+
# resp.output.message.content[0].image.error.message #=> String
|
|
1187
1251
|
# resp.output.message.content[0].document.format #=> String, one of "pdf", "csv", "doc", "docx", "xls", "xlsx", "html", "txt", "md"
|
|
1188
1252
|
# resp.output.message.content[0].document.name #=> String
|
|
1189
1253
|
# resp.output.message.content[0].document.source.bytes #=> String
|
|
@@ -1198,6 +1262,11 @@ module Aws::BedrockRuntime
|
|
|
1198
1262
|
# resp.output.message.content[0].video.source.bytes #=> String
|
|
1199
1263
|
# resp.output.message.content[0].video.source.s3_location.uri #=> String
|
|
1200
1264
|
# resp.output.message.content[0].video.source.s3_location.bucket_owner #=> String
|
|
1265
|
+
# resp.output.message.content[0].audio.format #=> String, one of "mp3", "opus", "wav", "aac", "flac", "mp4", "ogg", "mkv", "mka", "x-aac", "m4a", "mpeg", "mpga", "pcm", "webm"
|
|
1266
|
+
# resp.output.message.content[0].audio.source.bytes #=> String
|
|
1267
|
+
# resp.output.message.content[0].audio.source.s3_location.uri #=> String
|
|
1268
|
+
# resp.output.message.content[0].audio.source.s3_location.bucket_owner #=> String
|
|
1269
|
+
# resp.output.message.content[0].audio.error.message #=> String
|
|
1201
1270
|
# resp.output.message.content[0].tool_use.tool_use_id #=> String
|
|
1202
1271
|
# resp.output.message.content[0].tool_use.name #=> String
|
|
1203
1272
|
# resp.output.message.content[0].tool_use.type #=> String, one of "server_tool_use"
|
|
@@ -1208,6 +1277,7 @@ module Aws::BedrockRuntime
|
|
|
1208
1277
|
# resp.output.message.content[0].tool_result.content[0].image.source.bytes #=> String
|
|
1209
1278
|
# resp.output.message.content[0].tool_result.content[0].image.source.s3_location.uri #=> String
|
|
1210
1279
|
# resp.output.message.content[0].tool_result.content[0].image.source.s3_location.bucket_owner #=> String
|
|
1280
|
+
# resp.output.message.content[0].tool_result.content[0].image.error.message #=> String
|
|
1211
1281
|
# resp.output.message.content[0].tool_result.content[0].document.format #=> String, one of "pdf", "csv", "doc", "docx", "xls", "xlsx", "html", "txt", "md"
|
|
1212
1282
|
# resp.output.message.content[0].tool_result.content[0].document.name #=> String
|
|
1213
1283
|
# resp.output.message.content[0].tool_result.content[0].document.source.bytes #=> String
|
|
@@ -1222,6 +1292,11 @@ module Aws::BedrockRuntime
|
|
|
1222
1292
|
# resp.output.message.content[0].tool_result.content[0].video.source.bytes #=> String
|
|
1223
1293
|
# resp.output.message.content[0].tool_result.content[0].video.source.s3_location.uri #=> String
|
|
1224
1294
|
# resp.output.message.content[0].tool_result.content[0].video.source.s3_location.bucket_owner #=> String
|
|
1295
|
+
# resp.output.message.content[0].tool_result.content[0].search_result.source #=> String
|
|
1296
|
+
# resp.output.message.content[0].tool_result.content[0].search_result.title #=> String
|
|
1297
|
+
# resp.output.message.content[0].tool_result.content[0].search_result.content #=> Array
|
|
1298
|
+
# resp.output.message.content[0].tool_result.content[0].search_result.content[0].text #=> String
|
|
1299
|
+
# resp.output.message.content[0].tool_result.content[0].search_result.citations.enabled #=> Boolean
|
|
1225
1300
|
# resp.output.message.content[0].tool_result.status #=> String, one of "success", "error"
|
|
1226
1301
|
# resp.output.message.content[0].tool_result.type #=> String
|
|
1227
1302
|
# resp.output.message.content[0].guard_content.text.text #=> String
|
|
@@ -1237,6 +1312,7 @@ module Aws::BedrockRuntime
|
|
|
1237
1312
|
# resp.output.message.content[0].citations_content.content[0].text #=> String
|
|
1238
1313
|
# resp.output.message.content[0].citations_content.citations #=> Array
|
|
1239
1314
|
# resp.output.message.content[0].citations_content.citations[0].title #=> String
|
|
1315
|
+
# resp.output.message.content[0].citations_content.citations[0].source #=> String
|
|
1240
1316
|
# resp.output.message.content[0].citations_content.citations[0].source_content #=> Array
|
|
1241
1317
|
# resp.output.message.content[0].citations_content.citations[0].source_content[0].text #=> String
|
|
1242
1318
|
# resp.output.message.content[0].citations_content.citations[0].location.web.url #=> String
|
|
@@ -1250,7 +1326,15 @@ module Aws::BedrockRuntime
|
|
|
1250
1326
|
# resp.output.message.content[0].citations_content.citations[0].location.document_chunk.document_index #=> Integer
|
|
1251
1327
|
# resp.output.message.content[0].citations_content.citations[0].location.document_chunk.start #=> Integer
|
|
1252
1328
|
# resp.output.message.content[0].citations_content.citations[0].location.document_chunk.end #=> Integer
|
|
1253
|
-
# resp.
|
|
1329
|
+
# resp.output.message.content[0].citations_content.citations[0].location.search_result_location.search_result_index #=> Integer
|
|
1330
|
+
# resp.output.message.content[0].citations_content.citations[0].location.search_result_location.start #=> Integer
|
|
1331
|
+
# resp.output.message.content[0].citations_content.citations[0].location.search_result_location.end #=> Integer
|
|
1332
|
+
# resp.output.message.content[0].search_result.source #=> String
|
|
1333
|
+
# resp.output.message.content[0].search_result.title #=> String
|
|
1334
|
+
# resp.output.message.content[0].search_result.content #=> Array
|
|
1335
|
+
# resp.output.message.content[0].search_result.content[0].text #=> String
|
|
1336
|
+
# resp.output.message.content[0].search_result.citations.enabled #=> Boolean
|
|
1337
|
+
# resp.stop_reason #=> String, one of "end_turn", "tool_use", "max_tokens", "stop_sequence", "guardrail_intervened", "content_filtered", "malformed_model_output", "malformed_tool_use", "model_context_window_exceeded"
|
|
1254
1338
|
# resp.usage.input_tokens #=> Integer
|
|
1255
1339
|
# resp.usage.output_tokens #=> Integer
|
|
1256
1340
|
# resp.usage.total_tokens #=> Integer
|
|
@@ -1419,6 +1503,12 @@ module Aws::BedrockRuntime
|
|
|
1419
1503
|
# resp.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
|
|
1420
1504
|
# resp.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.images.guarded #=> Integer
|
|
1421
1505
|
# resp.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.images.total #=> Integer
|
|
1506
|
+
# resp.trace.guardrail.input_assessment["String"].applied_guardrail_details.guardrail_id #=> String
|
|
1507
|
+
# resp.trace.guardrail.input_assessment["String"].applied_guardrail_details.guardrail_version #=> String
|
|
1508
|
+
# resp.trace.guardrail.input_assessment["String"].applied_guardrail_details.guardrail_arn #=> String
|
|
1509
|
+
# resp.trace.guardrail.input_assessment["String"].applied_guardrail_details.guardrail_origin #=> Array
|
|
1510
|
+
# resp.trace.guardrail.input_assessment["String"].applied_guardrail_details.guardrail_origin[0] #=> String, one of "REQUEST", "ACCOUNT_ENFORCED", "ORGANIZATION_ENFORCED"
|
|
1511
|
+
# resp.trace.guardrail.input_assessment["String"].applied_guardrail_details.guardrail_ownership #=> String, one of "SELF", "CROSS_ACCOUNT"
|
|
1422
1512
|
# resp.trace.guardrail.output_assessments #=> Hash
|
|
1423
1513
|
# resp.trace.guardrail.output_assessments["String"] #=> Array
|
|
1424
1514
|
# resp.trace.guardrail.output_assessments["String"][0].topic_policy.topics #=> Array
|
|
@@ -1580,9 +1670,16 @@ module Aws::BedrockRuntime
|
|
|
1580
1670
|
# resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
|
|
1581
1671
|
# resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.images.guarded #=> Integer
|
|
1582
1672
|
# resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.images.total #=> Integer
|
|
1673
|
+
# resp.trace.guardrail.output_assessments["String"][0].applied_guardrail_details.guardrail_id #=> String
|
|
1674
|
+
# resp.trace.guardrail.output_assessments["String"][0].applied_guardrail_details.guardrail_version #=> String
|
|
1675
|
+
# resp.trace.guardrail.output_assessments["String"][0].applied_guardrail_details.guardrail_arn #=> String
|
|
1676
|
+
# resp.trace.guardrail.output_assessments["String"][0].applied_guardrail_details.guardrail_origin #=> Array
|
|
1677
|
+
# resp.trace.guardrail.output_assessments["String"][0].applied_guardrail_details.guardrail_origin[0] #=> String, one of "REQUEST", "ACCOUNT_ENFORCED", "ORGANIZATION_ENFORCED"
|
|
1678
|
+
# resp.trace.guardrail.output_assessments["String"][0].applied_guardrail_details.guardrail_ownership #=> String, one of "SELF", "CROSS_ACCOUNT"
|
|
1583
1679
|
# resp.trace.guardrail.action_reason #=> String
|
|
1584
1680
|
# resp.trace.prompt_router.invoked_model_id #=> String
|
|
1585
1681
|
# resp.performance_config.latency #=> String, one of "standard", "optimized"
|
|
1682
|
+
# resp.service_tier.type #=> String, one of "priority", "default", "flex", "reserved"
|
|
1586
1683
|
#
|
|
1587
1684
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/Converse AWS API Documentation
|
|
1588
1685
|
#
|
|
@@ -1776,6 +1873,10 @@ module Aws::BedrockRuntime
|
|
|
1776
1873
|
# @option params [Types::PerformanceConfiguration] :performance_config
|
|
1777
1874
|
# Model performance settings for the request.
|
|
1778
1875
|
#
|
|
1876
|
+
# @option params [Types::ServiceTier] :service_tier
|
|
1877
|
+
# Specifies the processing tier configuration used for serving the
|
|
1878
|
+
# request.
|
|
1879
|
+
#
|
|
1779
1880
|
# @return [Types::ConverseStreamResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
1780
1881
|
#
|
|
1781
1882
|
# * {Types::ConverseStreamResponse#stream #stream} => Types::ConverseStreamOutput
|
|
@@ -1978,6 +2079,9 @@ module Aws::BedrockRuntime
|
|
|
1978
2079
|
# bucket_owner: "AccountId",
|
|
1979
2080
|
# },
|
|
1980
2081
|
# },
|
|
2082
|
+
# error: {
|
|
2083
|
+
# message: "String",
|
|
2084
|
+
# },
|
|
1981
2085
|
# },
|
|
1982
2086
|
# document: {
|
|
1983
2087
|
# format: "pdf", # accepts pdf, csv, doc, docx, xls, xlsx, html, txt, md
|
|
@@ -2010,6 +2114,19 @@ module Aws::BedrockRuntime
|
|
|
2010
2114
|
# },
|
|
2011
2115
|
# },
|
|
2012
2116
|
# },
|
|
2117
|
+
# audio: {
|
|
2118
|
+
# format: "mp3", # required, accepts mp3, opus, wav, aac, flac, mp4, ogg, mkv, mka, x-aac, m4a, mpeg, mpga, pcm, webm
|
|
2119
|
+
# source: { # required
|
|
2120
|
+
# bytes: "data",
|
|
2121
|
+
# s3_location: {
|
|
2122
|
+
# uri: "S3Uri", # required
|
|
2123
|
+
# bucket_owner: "AccountId",
|
|
2124
|
+
# },
|
|
2125
|
+
# },
|
|
2126
|
+
# error: {
|
|
2127
|
+
# message: "String",
|
|
2128
|
+
# },
|
|
2129
|
+
# },
|
|
2013
2130
|
# tool_use: {
|
|
2014
2131
|
# tool_use_id: "ToolUseId", # required
|
|
2015
2132
|
# name: "ToolName", # required
|
|
@@ -2033,6 +2150,9 @@ module Aws::BedrockRuntime
|
|
|
2033
2150
|
# bucket_owner: "AccountId",
|
|
2034
2151
|
# },
|
|
2035
2152
|
# },
|
|
2153
|
+
# error: {
|
|
2154
|
+
# message: "String",
|
|
2155
|
+
# },
|
|
2036
2156
|
# },
|
|
2037
2157
|
# document: {
|
|
2038
2158
|
# format: "pdf", # accepts pdf, csv, doc, docx, xls, xlsx, html, txt, md
|
|
@@ -2065,6 +2185,18 @@ module Aws::BedrockRuntime
|
|
|
2065
2185
|
# },
|
|
2066
2186
|
# },
|
|
2067
2187
|
# },
|
|
2188
|
+
# search_result: {
|
|
2189
|
+
# source: "String", # required
|
|
2190
|
+
# title: "String", # required
|
|
2191
|
+
# content: [ # required
|
|
2192
|
+
# {
|
|
2193
|
+
# text: "String", # required
|
|
2194
|
+
# },
|
|
2195
|
+
# ],
|
|
2196
|
+
# citations: {
|
|
2197
|
+
# enabled: false, # required
|
|
2198
|
+
# },
|
|
2199
|
+
# },
|
|
2068
2200
|
# },
|
|
2069
2201
|
# ],
|
|
2070
2202
|
# status: "success", # accepts success, error
|
|
@@ -2101,6 +2233,7 @@ module Aws::BedrockRuntime
|
|
|
2101
2233
|
# citations: [
|
|
2102
2234
|
# {
|
|
2103
2235
|
# title: "String",
|
|
2236
|
+
# source: "String",
|
|
2104
2237
|
# source_content: [
|
|
2105
2238
|
# {
|
|
2106
2239
|
# text: "String",
|
|
@@ -2126,10 +2259,27 @@ module Aws::BedrockRuntime
|
|
|
2126
2259
|
# start: 1,
|
|
2127
2260
|
# end: 1,
|
|
2128
2261
|
# },
|
|
2262
|
+
# search_result_location: {
|
|
2263
|
+
# search_result_index: 1,
|
|
2264
|
+
# start: 1,
|
|
2265
|
+
# end: 1,
|
|
2266
|
+
# },
|
|
2129
2267
|
# },
|
|
2130
2268
|
# },
|
|
2131
2269
|
# ],
|
|
2132
2270
|
# },
|
|
2271
|
+
# search_result: {
|
|
2272
|
+
# source: "String", # required
|
|
2273
|
+
# title: "String", # required
|
|
2274
|
+
# content: [ # required
|
|
2275
|
+
# {
|
|
2276
|
+
# text: "String", # required
|
|
2277
|
+
# },
|
|
2278
|
+
# ],
|
|
2279
|
+
# citations: {
|
|
2280
|
+
# enabled: false, # required
|
|
2281
|
+
# },
|
|
2282
|
+
# },
|
|
2133
2283
|
# },
|
|
2134
2284
|
# ],
|
|
2135
2285
|
# },
|
|
@@ -2190,8 +2340,8 @@ module Aws::BedrockRuntime
|
|
|
2190
2340
|
# },
|
|
2191
2341
|
# },
|
|
2192
2342
|
# guardrail_config: {
|
|
2193
|
-
# guardrail_identifier: "GuardrailIdentifier",
|
|
2194
|
-
# guardrail_version: "GuardrailVersion",
|
|
2343
|
+
# guardrail_identifier: "GuardrailIdentifier",
|
|
2344
|
+
# guardrail_version: "GuardrailVersion",
|
|
2195
2345
|
# trace: "enabled", # accepts enabled, disabled, enabled_full
|
|
2196
2346
|
# stream_processing_mode: "sync", # accepts sync, async
|
|
2197
2347
|
# },
|
|
@@ -2209,6 +2359,9 @@ module Aws::BedrockRuntime
|
|
|
2209
2359
|
# performance_config: {
|
|
2210
2360
|
# latency: "standard", # accepts standard, optimized
|
|
2211
2361
|
# },
|
|
2362
|
+
# service_tier: {
|
|
2363
|
+
# type: "priority", # required, accepts priority, default, flex, reserved
|
|
2364
|
+
# },
|
|
2212
2365
|
# })
|
|
2213
2366
|
#
|
|
2214
2367
|
# @example Response structure
|
|
@@ -2227,6 +2380,7 @@ module Aws::BedrockRuntime
|
|
|
2227
2380
|
# event.start.tool_result.tool_use_id #=> String
|
|
2228
2381
|
# event.start.tool_result.type #=> String
|
|
2229
2382
|
# event.start.tool_result.status #=> String, one of "success", "error"
|
|
2383
|
+
# event.start.image.format #=> String, one of "png", "jpeg", "gif", "webp"
|
|
2230
2384
|
# event.content_block_index #=> Integer
|
|
2231
2385
|
#
|
|
2232
2386
|
# # For :content_block_delta event available at #on_content_block_delta_event callback and response eventstream enumerator:
|
|
@@ -2238,6 +2392,7 @@ module Aws::BedrockRuntime
|
|
|
2238
2392
|
# event.delta.reasoning_content.redacted_content #=> String
|
|
2239
2393
|
# event.delta.reasoning_content.signature #=> String
|
|
2240
2394
|
# event.delta.citation.title #=> String
|
|
2395
|
+
# event.delta.citation.source #=> String
|
|
2241
2396
|
# event.delta.citation.source_content #=> Array
|
|
2242
2397
|
# event.delta.citation.source_content[0].text #=> String
|
|
2243
2398
|
# event.delta.citation.location.web.url #=> String
|
|
@@ -2251,13 +2406,20 @@ module Aws::BedrockRuntime
|
|
|
2251
2406
|
# event.delta.citation.location.document_chunk.document_index #=> Integer
|
|
2252
2407
|
# event.delta.citation.location.document_chunk.start #=> Integer
|
|
2253
2408
|
# event.delta.citation.location.document_chunk.end #=> Integer
|
|
2409
|
+
# event.delta.citation.location.search_result_location.search_result_index #=> Integer
|
|
2410
|
+
# event.delta.citation.location.search_result_location.start #=> Integer
|
|
2411
|
+
# event.delta.citation.location.search_result_location.end #=> Integer
|
|
2412
|
+
# event.delta.image.source.bytes #=> String
|
|
2413
|
+
# event.delta.image.source.s3_location.uri #=> String
|
|
2414
|
+
# event.delta.image.source.s3_location.bucket_owner #=> String
|
|
2415
|
+
# event.delta.image.error.message #=> String
|
|
2254
2416
|
# event.content_block_index #=> Integer
|
|
2255
2417
|
#
|
|
2256
2418
|
# # For :content_block_stop event available at #on_content_block_stop_event callback and response eventstream enumerator:
|
|
2257
2419
|
# event.content_block_index #=> Integer
|
|
2258
2420
|
#
|
|
2259
2421
|
# # For :message_stop event available at #on_message_stop_event callback and response eventstream enumerator:
|
|
2260
|
-
# event.stop_reason #=> String, one of "end_turn", "tool_use", "max_tokens", "stop_sequence", "guardrail_intervened", "content_filtered", "model_context_window_exceeded"
|
|
2422
|
+
# event.stop_reason #=> String, one of "end_turn", "tool_use", "max_tokens", "stop_sequence", "guardrail_intervened", "content_filtered", "malformed_model_output", "malformed_tool_use", "model_context_window_exceeded"
|
|
2261
2423
|
#
|
|
2262
2424
|
# # For :metadata event available at #on_metadata_event callback and response eventstream enumerator:
|
|
2263
2425
|
# event.usage.input_tokens #=> Integer
|
|
@@ -2428,6 +2590,12 @@ module Aws::BedrockRuntime
|
|
|
2428
2590
|
# event.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
|
|
2429
2591
|
# event.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.images.guarded #=> Integer
|
|
2430
2592
|
# event.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.images.total #=> Integer
|
|
2593
|
+
# event.trace.guardrail.input_assessment["String"].applied_guardrail_details.guardrail_id #=> String
|
|
2594
|
+
# event.trace.guardrail.input_assessment["String"].applied_guardrail_details.guardrail_version #=> String
|
|
2595
|
+
# event.trace.guardrail.input_assessment["String"].applied_guardrail_details.guardrail_arn #=> String
|
|
2596
|
+
# event.trace.guardrail.input_assessment["String"].applied_guardrail_details.guardrail_origin #=> Array
|
|
2597
|
+
# event.trace.guardrail.input_assessment["String"].applied_guardrail_details.guardrail_origin[0] #=> String, one of "REQUEST", "ACCOUNT_ENFORCED", "ORGANIZATION_ENFORCED"
|
|
2598
|
+
# event.trace.guardrail.input_assessment["String"].applied_guardrail_details.guardrail_ownership #=> String, one of "SELF", "CROSS_ACCOUNT"
|
|
2431
2599
|
# event.trace.guardrail.output_assessments #=> Hash
|
|
2432
2600
|
# event.trace.guardrail.output_assessments["String"] #=> Array
|
|
2433
2601
|
# event.trace.guardrail.output_assessments["String"][0].topic_policy.topics #=> Array
|
|
@@ -2589,9 +2757,16 @@ module Aws::BedrockRuntime
|
|
|
2589
2757
|
# event.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
|
|
2590
2758
|
# event.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.images.guarded #=> Integer
|
|
2591
2759
|
# event.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.images.total #=> Integer
|
|
2760
|
+
# event.trace.guardrail.output_assessments["String"][0].applied_guardrail_details.guardrail_id #=> String
|
|
2761
|
+
# event.trace.guardrail.output_assessments["String"][0].applied_guardrail_details.guardrail_version #=> String
|
|
2762
|
+
# event.trace.guardrail.output_assessments["String"][0].applied_guardrail_details.guardrail_arn #=> String
|
|
2763
|
+
# event.trace.guardrail.output_assessments["String"][0].applied_guardrail_details.guardrail_origin #=> Array
|
|
2764
|
+
# event.trace.guardrail.output_assessments["String"][0].applied_guardrail_details.guardrail_origin[0] #=> String, one of "REQUEST", "ACCOUNT_ENFORCED", "ORGANIZATION_ENFORCED"
|
|
2765
|
+
# event.trace.guardrail.output_assessments["String"][0].applied_guardrail_details.guardrail_ownership #=> String, one of "SELF", "CROSS_ACCOUNT"
|
|
2592
2766
|
# event.trace.guardrail.action_reason #=> String
|
|
2593
2767
|
# event.trace.prompt_router.invoked_model_id #=> String
|
|
2594
2768
|
# event.performance_config.latency #=> String, one of "standard", "optimized"
|
|
2769
|
+
# event.service_tier.type #=> String, one of "priority", "default", "flex", "reserved"
|
|
2595
2770
|
#
|
|
2596
2771
|
# # For :internal_server_exception event available at #on_internal_server_exception_event callback and response eventstream enumerator:
|
|
2597
2772
|
# event.message #=> String
|
|
@@ -2719,6 +2894,9 @@ module Aws::BedrockRuntime
|
|
|
2719
2894
|
# bucket_owner: "AccountId",
|
|
2720
2895
|
# },
|
|
2721
2896
|
# },
|
|
2897
|
+
# error: {
|
|
2898
|
+
# message: "String",
|
|
2899
|
+
# },
|
|
2722
2900
|
# },
|
|
2723
2901
|
# document: {
|
|
2724
2902
|
# format: "pdf", # accepts pdf, csv, doc, docx, xls, xlsx, html, txt, md
|
|
@@ -2751,6 +2929,19 @@ module Aws::BedrockRuntime
|
|
|
2751
2929
|
# },
|
|
2752
2930
|
# },
|
|
2753
2931
|
# },
|
|
2932
|
+
# audio: {
|
|
2933
|
+
# format: "mp3", # required, accepts mp3, opus, wav, aac, flac, mp4, ogg, mkv, mka, x-aac, m4a, mpeg, mpga, pcm, webm
|
|
2934
|
+
# source: { # required
|
|
2935
|
+
# bytes: "data",
|
|
2936
|
+
# s3_location: {
|
|
2937
|
+
# uri: "S3Uri", # required
|
|
2938
|
+
# bucket_owner: "AccountId",
|
|
2939
|
+
# },
|
|
2940
|
+
# },
|
|
2941
|
+
# error: {
|
|
2942
|
+
# message: "String",
|
|
2943
|
+
# },
|
|
2944
|
+
# },
|
|
2754
2945
|
# tool_use: {
|
|
2755
2946
|
# tool_use_id: "ToolUseId", # required
|
|
2756
2947
|
# name: "ToolName", # required
|
|
@@ -2774,6 +2965,9 @@ module Aws::BedrockRuntime
|
|
|
2774
2965
|
# bucket_owner: "AccountId",
|
|
2775
2966
|
# },
|
|
2776
2967
|
# },
|
|
2968
|
+
# error: {
|
|
2969
|
+
# message: "String",
|
|
2970
|
+
# },
|
|
2777
2971
|
# },
|
|
2778
2972
|
# document: {
|
|
2779
2973
|
# format: "pdf", # accepts pdf, csv, doc, docx, xls, xlsx, html, txt, md
|
|
@@ -2806,6 +3000,18 @@ module Aws::BedrockRuntime
|
|
|
2806
3000
|
# },
|
|
2807
3001
|
# },
|
|
2808
3002
|
# },
|
|
3003
|
+
# search_result: {
|
|
3004
|
+
# source: "String", # required
|
|
3005
|
+
# title: "String", # required
|
|
3006
|
+
# content: [ # required
|
|
3007
|
+
# {
|
|
3008
|
+
# text: "String", # required
|
|
3009
|
+
# },
|
|
3010
|
+
# ],
|
|
3011
|
+
# citations: {
|
|
3012
|
+
# enabled: false, # required
|
|
3013
|
+
# },
|
|
3014
|
+
# },
|
|
2809
3015
|
# },
|
|
2810
3016
|
# ],
|
|
2811
3017
|
# status: "success", # accepts success, error
|
|
@@ -2842,6 +3048,7 @@ module Aws::BedrockRuntime
|
|
|
2842
3048
|
# citations: [
|
|
2843
3049
|
# {
|
|
2844
3050
|
# title: "String",
|
|
3051
|
+
# source: "String",
|
|
2845
3052
|
# source_content: [
|
|
2846
3053
|
# {
|
|
2847
3054
|
# text: "String",
|
|
@@ -2867,10 +3074,27 @@ module Aws::BedrockRuntime
|
|
|
2867
3074
|
# start: 1,
|
|
2868
3075
|
# end: 1,
|
|
2869
3076
|
# },
|
|
3077
|
+
# search_result_location: {
|
|
3078
|
+
# search_result_index: 1,
|
|
3079
|
+
# start: 1,
|
|
3080
|
+
# end: 1,
|
|
3081
|
+
# },
|
|
2870
3082
|
# },
|
|
2871
3083
|
# },
|
|
2872
3084
|
# ],
|
|
2873
3085
|
# },
|
|
3086
|
+
# search_result: {
|
|
3087
|
+
# source: "String", # required
|
|
3088
|
+
# title: "String", # required
|
|
3089
|
+
# content: [ # required
|
|
3090
|
+
# {
|
|
3091
|
+
# text: "String", # required
|
|
3092
|
+
# },
|
|
3093
|
+
# ],
|
|
3094
|
+
# citations: {
|
|
3095
|
+
# enabled: false, # required
|
|
3096
|
+
# },
|
|
3097
|
+
# },
|
|
2874
3098
|
# },
|
|
2875
3099
|
# ],
|
|
2876
3100
|
# },
|
|
@@ -2895,6 +3119,37 @@ module Aws::BedrockRuntime
|
|
|
2895
3119
|
# },
|
|
2896
3120
|
# },
|
|
2897
3121
|
# ],
|
|
3122
|
+
# tool_config: {
|
|
3123
|
+
# tools: [ # required
|
|
3124
|
+
# {
|
|
3125
|
+
# tool_spec: {
|
|
3126
|
+
# name: "ToolName", # required
|
|
3127
|
+
# description: "NonEmptyString",
|
|
3128
|
+
# input_schema: { # required
|
|
3129
|
+
# json: {
|
|
3130
|
+
# },
|
|
3131
|
+
# },
|
|
3132
|
+
# },
|
|
3133
|
+
# system_tool: {
|
|
3134
|
+
# name: "ToolName", # required
|
|
3135
|
+
# },
|
|
3136
|
+
# cache_point: {
|
|
3137
|
+
# type: "default", # required, accepts default
|
|
3138
|
+
# },
|
|
3139
|
+
# },
|
|
3140
|
+
# ],
|
|
3141
|
+
# tool_choice: {
|
|
3142
|
+
# auto: {
|
|
3143
|
+
# },
|
|
3144
|
+
# any: {
|
|
3145
|
+
# },
|
|
3146
|
+
# tool: {
|
|
3147
|
+
# name: "ToolName", # required
|
|
3148
|
+
# },
|
|
3149
|
+
# },
|
|
3150
|
+
# },
|
|
3151
|
+
# additional_model_request_fields: {
|
|
3152
|
+
# },
|
|
2898
3153
|
# },
|
|
2899
3154
|
# },
|
|
2900
3155
|
# })
|
|
@@ -3069,11 +3324,15 @@ module Aws::BedrockRuntime
|
|
|
3069
3324
|
# @option params [String] :performance_config_latency
|
|
3070
3325
|
# Model performance settings for the request.
|
|
3071
3326
|
#
|
|
3327
|
+
# @option params [String] :service_tier
|
|
3328
|
+
# Specifies the processing tier type used for serving the request.
|
|
3329
|
+
#
|
|
3072
3330
|
# @return [Types::InvokeModelResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
3073
3331
|
#
|
|
3074
3332
|
# * {Types::InvokeModelResponse#body #body} => String
|
|
3075
3333
|
# * {Types::InvokeModelResponse#content_type #content_type} => String
|
|
3076
3334
|
# * {Types::InvokeModelResponse#performance_config_latency #performance_config_latency} => String
|
|
3335
|
+
# * {Types::InvokeModelResponse#service_tier #service_tier} => String
|
|
3077
3336
|
#
|
|
3078
3337
|
# @example Request syntax with placeholder values
|
|
3079
3338
|
#
|
|
@@ -3086,6 +3345,7 @@ module Aws::BedrockRuntime
|
|
|
3086
3345
|
# guardrail_identifier: "GuardrailIdentifier",
|
|
3087
3346
|
# guardrail_version: "GuardrailVersion",
|
|
3088
3347
|
# performance_config_latency: "standard", # accepts standard, optimized
|
|
3348
|
+
# service_tier: "priority", # accepts priority, default, flex, reserved
|
|
3089
3349
|
# })
|
|
3090
3350
|
#
|
|
3091
3351
|
# @example Response structure
|
|
@@ -3093,6 +3353,7 @@ module Aws::BedrockRuntime
|
|
|
3093
3353
|
# resp.body #=> String
|
|
3094
3354
|
# resp.content_type #=> String
|
|
3095
3355
|
# resp.performance_config_latency #=> String, one of "standard", "optimized"
|
|
3356
|
+
# resp.service_tier #=> String, one of "priority", "default", "flex", "reserved"
|
|
3096
3357
|
#
|
|
3097
3358
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModel AWS API Documentation
|
|
3098
3359
|
#
|
|
@@ -3223,11 +3484,15 @@ module Aws::BedrockRuntime
|
|
|
3223
3484
|
# @option params [String] :performance_config_latency
|
|
3224
3485
|
# Model performance settings for the request.
|
|
3225
3486
|
#
|
|
3487
|
+
# @option params [String] :service_tier
|
|
3488
|
+
# Specifies the processing tier type used for serving the request.
|
|
3489
|
+
#
|
|
3226
3490
|
# @return [Types::InvokeModelWithResponseStreamResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
3227
3491
|
#
|
|
3228
3492
|
# * {Types::InvokeModelWithResponseStreamResponse#body #body} => Types::ResponseStream
|
|
3229
3493
|
# * {Types::InvokeModelWithResponseStreamResponse#content_type #content_type} => String
|
|
3230
3494
|
# * {Types::InvokeModelWithResponseStreamResponse#performance_config_latency #performance_config_latency} => String
|
|
3495
|
+
# * {Types::InvokeModelWithResponseStreamResponse#service_tier #service_tier} => String
|
|
3231
3496
|
#
|
|
3232
3497
|
# @example EventStream Operation Example
|
|
3233
3498
|
#
|
|
@@ -3383,6 +3648,7 @@ module Aws::BedrockRuntime
|
|
|
3383
3648
|
# guardrail_identifier: "GuardrailIdentifier",
|
|
3384
3649
|
# guardrail_version: "GuardrailVersion",
|
|
3385
3650
|
# performance_config_latency: "standard", # accepts standard, optimized
|
|
3651
|
+
# service_tier: "priority", # accepts priority, default, flex, reserved
|
|
3386
3652
|
# })
|
|
3387
3653
|
#
|
|
3388
3654
|
# @example Response structure
|
|
@@ -3416,6 +3682,7 @@ module Aws::BedrockRuntime
|
|
|
3416
3682
|
#
|
|
3417
3683
|
# resp.content_type #=> String
|
|
3418
3684
|
# resp.performance_config_latency #=> String, one of "standard", "optimized"
|
|
3685
|
+
# resp.service_tier #=> String, one of "priority", "default", "flex", "reserved"
|
|
3419
3686
|
#
|
|
3420
3687
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelWithResponseStream AWS API Documentation
|
|
3421
3688
|
#
|
|
@@ -3610,7 +3877,7 @@ module Aws::BedrockRuntime
|
|
|
3610
3877
|
tracer: tracer
|
|
3611
3878
|
)
|
|
3612
3879
|
context[:gem_name] = 'aws-sdk-bedrockruntime'
|
|
3613
|
-
context[:gem_version] = '1.
|
|
3880
|
+
context[:gem_version] = '1.71.0'
|
|
3614
3881
|
Seahorse::Client::Request.new(handlers, context)
|
|
3615
3882
|
end
|
|
3616
3883
|
|