aws-sdk-bedrockruntime 1.28.0 → 1.44.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 +80 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-bedrockruntime/async_client.rb +626 -0
- data/lib/aws-sdk-bedrockruntime/client.rb +754 -135
- data/lib/aws-sdk-bedrockruntime/client_api.rb +374 -7
- data/lib/aws-sdk-bedrockruntime/endpoint_provider.rb +13 -17
- data/lib/aws-sdk-bedrockruntime/errors.rb +16 -0
- data/lib/aws-sdk-bedrockruntime/event_streams.rb +87 -0
- data/lib/aws-sdk-bedrockruntime/types.rb +1168 -113
- data/lib/aws-sdk-bedrockruntime.rb +2 -1
- data/sig/client.rbs +210 -13
- data/sig/errors.rbs +3 -0
- data/sig/resource.rbs +2 -0
- data/sig/types.rbs +322 -16
- metadata +5 -4
@@ -54,9 +54,10 @@ module Aws::BedrockRuntime
|
|
54
54
|
autoload :EndpointParameters, 'aws-sdk-bedrockruntime/endpoint_parameters'
|
55
55
|
autoload :EndpointProvider, 'aws-sdk-bedrockruntime/endpoint_provider'
|
56
56
|
autoload :Endpoints, 'aws-sdk-bedrockruntime/endpoints'
|
57
|
+
autoload :AsyncClient, 'aws-sdk-bedrockruntime/async_client'
|
57
58
|
autoload :EventStreams, 'aws-sdk-bedrockruntime/event_streams'
|
58
59
|
|
59
|
-
GEM_VERSION = '1.
|
60
|
+
GEM_VERSION = '1.44.0'
|
60
61
|
|
61
62
|
end
|
62
63
|
|
data/sig/client.rbs
CHANGED
@@ -42,7 +42,9 @@ module Aws
|
|
42
42
|
?max_attempts: Integer,
|
43
43
|
?output_event_stream_handler: Proc,
|
44
44
|
?profile: String,
|
45
|
+
?request_checksum_calculation: String,
|
45
46
|
?request_min_compression_size_bytes: Integer,
|
47
|
+
?response_checksum_validation: String,
|
46
48
|
?retry_backoff: Proc,
|
47
49
|
?retry_base_delay: Float,
|
48
50
|
?retry_jitter: (:none | :equal | :full | ^(Integer) -> Integer),
|
@@ -82,6 +84,7 @@ module Aws
|
|
82
84
|
include ::Seahorse::Client::_ResponseSuccess[Types::ApplyGuardrailResponse]
|
83
85
|
def usage: () -> Types::GuardrailUsage
|
84
86
|
def action: () -> ("NONE" | "GUARDRAIL_INTERVENED")
|
87
|
+
def action_reason: () -> ::String
|
85
88
|
def outputs: () -> ::Array[Types::GuardrailOutputContent]
|
86
89
|
def assessments: () -> ::Array[Types::GuardrailAssessment]
|
87
90
|
def guardrail_coverage: () -> Types::GuardrailCoverage
|
@@ -96,9 +99,16 @@ module Aws
|
|
96
99
|
text: {
|
97
100
|
text: ::String,
|
98
101
|
qualifiers: Array[("grounding_source" | "query" | "guard_content")]?
|
102
|
+
}?,
|
103
|
+
image: {
|
104
|
+
format: ("png" | "jpeg"),
|
105
|
+
source: {
|
106
|
+
bytes: ::String?
|
107
|
+
}
|
99
108
|
}?
|
100
109
|
},
|
101
|
-
]
|
110
|
+
],
|
111
|
+
?output_scope: ("INTERVENTIONS" | "FULL")
|
102
112
|
) -> _ApplyGuardrailResponseSuccess
|
103
113
|
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _ApplyGuardrailResponseSuccess
|
104
114
|
|
@@ -110,11 +120,12 @@ module Aws
|
|
110
120
|
def metrics: () -> Types::ConverseMetrics
|
111
121
|
def additional_model_response_fields: () -> untyped
|
112
122
|
def trace: () -> Types::ConverseTrace
|
123
|
+
def performance_config: () -> Types::PerformanceConfiguration
|
113
124
|
end
|
114
125
|
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Client.html#converse-instance_method
|
115
126
|
def converse: (
|
116
127
|
model_id: ::String,
|
117
|
-
messages: Array[
|
128
|
+
?messages: Array[
|
118
129
|
{
|
119
130
|
role: ("user" | "assistant"),
|
120
131
|
content: Array[
|
@@ -133,6 +144,16 @@ module Aws
|
|
133
144
|
bytes: ::String?
|
134
145
|
}
|
135
146
|
}?,
|
147
|
+
video: {
|
148
|
+
format: ("mkv" | "mov" | "mp4" | "webm" | "flv" | "mpeg" | "mpg" | "wmv" | "three_gp"),
|
149
|
+
source: {
|
150
|
+
bytes: ::String?,
|
151
|
+
s3_location: {
|
152
|
+
uri: ::String,
|
153
|
+
bucket_owner: ::String?
|
154
|
+
}?
|
155
|
+
}
|
156
|
+
}?,
|
136
157
|
tool_use: {
|
137
158
|
tool_use_id: ::String,
|
138
159
|
name: ::String,
|
@@ -158,6 +179,16 @@ module Aws
|
|
158
179
|
source: {
|
159
180
|
bytes: ::String?
|
160
181
|
}
|
182
|
+
}?,
|
183
|
+
video: {
|
184
|
+
format: ("mkv" | "mov" | "mp4" | "webm" | "flv" | "mpeg" | "mpg" | "wmv" | "three_gp"),
|
185
|
+
source: {
|
186
|
+
bytes: ::String?,
|
187
|
+
s3_location: {
|
188
|
+
uri: ::String,
|
189
|
+
bucket_owner: ::String?
|
190
|
+
}?
|
191
|
+
}
|
161
192
|
}?
|
162
193
|
},
|
163
194
|
],
|
@@ -167,7 +198,23 @@ module Aws
|
|
167
198
|
text: {
|
168
199
|
text: ::String,
|
169
200
|
qualifiers: Array[("grounding_source" | "query" | "guard_content")]?
|
201
|
+
}?,
|
202
|
+
image: {
|
203
|
+
format: ("png" | "jpeg"),
|
204
|
+
source: {
|
205
|
+
bytes: ::String?
|
206
|
+
}
|
170
207
|
}?
|
208
|
+
}?,
|
209
|
+
cache_point: {
|
210
|
+
type: ("default")
|
211
|
+
}?,
|
212
|
+
reasoning_content: {
|
213
|
+
reasoning_text: {
|
214
|
+
text: ::String,
|
215
|
+
signature: ::String?
|
216
|
+
}?,
|
217
|
+
redacted_content: ::String?
|
171
218
|
}?
|
172
219
|
},
|
173
220
|
]
|
@@ -180,7 +227,16 @@ module Aws
|
|
180
227
|
text: {
|
181
228
|
text: ::String,
|
182
229
|
qualifiers: Array[("grounding_source" | "query" | "guard_content")]?
|
230
|
+
}?,
|
231
|
+
image: {
|
232
|
+
format: ("png" | "jpeg"),
|
233
|
+
source: {
|
234
|
+
bytes: ::String?
|
235
|
+
}
|
183
236
|
}?
|
237
|
+
}?,
|
238
|
+
cache_point: {
|
239
|
+
type: ("default")
|
184
240
|
}?
|
185
241
|
},
|
186
242
|
],
|
@@ -200,6 +256,9 @@ module Aws
|
|
200
256
|
json: {
|
201
257
|
}?
|
202
258
|
}
|
259
|
+
}?,
|
260
|
+
cache_point: {
|
261
|
+
type: ("default")
|
203
262
|
}?
|
204
263
|
},
|
205
264
|
],
|
@@ -216,11 +275,18 @@ module Aws
|
|
216
275
|
?guardrail_config: {
|
217
276
|
guardrail_identifier: ::String,
|
218
277
|
guardrail_version: ::String,
|
219
|
-
trace: ("enabled" | "disabled")?
|
278
|
+
trace: ("enabled" | "disabled" | "enabled_full")?
|
220
279
|
},
|
221
280
|
?additional_model_request_fields: {
|
222
281
|
},
|
223
|
-
?
|
282
|
+
?prompt_variables: Hash[::String, {
|
283
|
+
text: ::String?
|
284
|
+
}],
|
285
|
+
?additional_model_response_field_paths: Array[::String],
|
286
|
+
?request_metadata: Hash[::String, ::String],
|
287
|
+
?performance_config: {
|
288
|
+
latency: ("standard" | "optimized")?
|
289
|
+
}
|
224
290
|
) -> _ConverseResponseSuccess
|
225
291
|
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _ConverseResponseSuccess
|
226
292
|
|
@@ -231,7 +297,7 @@ module Aws
|
|
231
297
|
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Client.html#converse_stream-instance_method
|
232
298
|
def converse_stream: (
|
233
299
|
model_id: ::String,
|
234
|
-
messages: Array[
|
300
|
+
?messages: Array[
|
235
301
|
{
|
236
302
|
role: ("user" | "assistant"),
|
237
303
|
content: Array[
|
@@ -250,6 +316,16 @@ module Aws
|
|
250
316
|
bytes: ::String?
|
251
317
|
}
|
252
318
|
}?,
|
319
|
+
video: {
|
320
|
+
format: ("mkv" | "mov" | "mp4" | "webm" | "flv" | "mpeg" | "mpg" | "wmv" | "three_gp"),
|
321
|
+
source: {
|
322
|
+
bytes: ::String?,
|
323
|
+
s3_location: {
|
324
|
+
uri: ::String,
|
325
|
+
bucket_owner: ::String?
|
326
|
+
}?
|
327
|
+
}
|
328
|
+
}?,
|
253
329
|
tool_use: {
|
254
330
|
tool_use_id: ::String,
|
255
331
|
name: ::String,
|
@@ -275,6 +351,16 @@ module Aws
|
|
275
351
|
source: {
|
276
352
|
bytes: ::String?
|
277
353
|
}
|
354
|
+
}?,
|
355
|
+
video: {
|
356
|
+
format: ("mkv" | "mov" | "mp4" | "webm" | "flv" | "mpeg" | "mpg" | "wmv" | "three_gp"),
|
357
|
+
source: {
|
358
|
+
bytes: ::String?,
|
359
|
+
s3_location: {
|
360
|
+
uri: ::String,
|
361
|
+
bucket_owner: ::String?
|
362
|
+
}?
|
363
|
+
}
|
278
364
|
}?
|
279
365
|
},
|
280
366
|
],
|
@@ -284,7 +370,23 @@ module Aws
|
|
284
370
|
text: {
|
285
371
|
text: ::String,
|
286
372
|
qualifiers: Array[("grounding_source" | "query" | "guard_content")]?
|
373
|
+
}?,
|
374
|
+
image: {
|
375
|
+
format: ("png" | "jpeg"),
|
376
|
+
source: {
|
377
|
+
bytes: ::String?
|
378
|
+
}
|
287
379
|
}?
|
380
|
+
}?,
|
381
|
+
cache_point: {
|
382
|
+
type: ("default")
|
383
|
+
}?,
|
384
|
+
reasoning_content: {
|
385
|
+
reasoning_text: {
|
386
|
+
text: ::String,
|
387
|
+
signature: ::String?
|
388
|
+
}?,
|
389
|
+
redacted_content: ::String?
|
288
390
|
}?
|
289
391
|
},
|
290
392
|
]
|
@@ -297,7 +399,16 @@ module Aws
|
|
297
399
|
text: {
|
298
400
|
text: ::String,
|
299
401
|
qualifiers: Array[("grounding_source" | "query" | "guard_content")]?
|
402
|
+
}?,
|
403
|
+
image: {
|
404
|
+
format: ("png" | "jpeg"),
|
405
|
+
source: {
|
406
|
+
bytes: ::String?
|
407
|
+
}
|
300
408
|
}?
|
409
|
+
}?,
|
410
|
+
cache_point: {
|
411
|
+
type: ("default")
|
301
412
|
}?
|
302
413
|
},
|
303
414
|
],
|
@@ -317,6 +428,9 @@ module Aws
|
|
317
428
|
json: {
|
318
429
|
}?
|
319
430
|
}
|
431
|
+
}?,
|
432
|
+
cache_point: {
|
433
|
+
type: ("default")
|
320
434
|
}?
|
321
435
|
},
|
322
436
|
],
|
@@ -333,48 +447,131 @@ module Aws
|
|
333
447
|
?guardrail_config: {
|
334
448
|
guardrail_identifier: ::String,
|
335
449
|
guardrail_version: ::String,
|
336
|
-
trace: ("enabled" | "disabled")?,
|
450
|
+
trace: ("enabled" | "disabled" | "enabled_full")?,
|
337
451
|
stream_processing_mode: ("sync" | "async")?
|
338
452
|
},
|
339
453
|
?additional_model_request_fields: {
|
340
454
|
},
|
341
|
-
?
|
455
|
+
?prompt_variables: Hash[::String, {
|
456
|
+
text: ::String?
|
457
|
+
}],
|
458
|
+
?additional_model_response_field_paths: Array[::String],
|
459
|
+
?request_metadata: Hash[::String, ::String],
|
460
|
+
?performance_config: {
|
461
|
+
latency: ("standard" | "optimized")?
|
462
|
+
}
|
342
463
|
) ?{ (*untyped) -> void } -> _ConverseStreamResponseSuccess
|
343
464
|
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _ConverseStreamResponseSuccess
|
344
465
|
|
466
|
+
interface _GetAsyncInvokeResponseSuccess
|
467
|
+
include ::Seahorse::Client::_ResponseSuccess[Types::GetAsyncInvokeResponse]
|
468
|
+
def invocation_arn: () -> ::String
|
469
|
+
def model_arn: () -> ::String
|
470
|
+
def client_request_token: () -> ::String
|
471
|
+
def status: () -> ("InProgress" | "Completed" | "Failed")
|
472
|
+
def failure_message: () -> ::String
|
473
|
+
def submit_time: () -> ::Time
|
474
|
+
def last_modified_time: () -> ::Time
|
475
|
+
def end_time: () -> ::Time
|
476
|
+
def output_data_config: () -> Types::AsyncInvokeOutputDataConfig
|
477
|
+
end
|
478
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Client.html#get_async_invoke-instance_method
|
479
|
+
def get_async_invoke: (
|
480
|
+
invocation_arn: ::String
|
481
|
+
) -> _GetAsyncInvokeResponseSuccess
|
482
|
+
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _GetAsyncInvokeResponseSuccess
|
483
|
+
|
345
484
|
interface _InvokeModelResponseSuccess
|
346
485
|
include ::Seahorse::Client::_ResponseSuccess[Types::InvokeModelResponse]
|
347
486
|
def body: () -> ::String
|
348
487
|
def content_type: () -> ::String
|
488
|
+
def performance_config_latency: () -> ("standard" | "optimized")
|
349
489
|
end
|
350
490
|
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Client.html#invoke_model-instance_method
|
351
491
|
def invoke_model: (
|
352
|
-
body: ::String,
|
492
|
+
?body: ::String,
|
353
493
|
?content_type: ::String,
|
354
494
|
?accept: ::String,
|
355
495
|
model_id: ::String,
|
356
|
-
?trace: ("ENABLED" | "DISABLED"),
|
496
|
+
?trace: ("ENABLED" | "DISABLED" | "ENABLED_FULL"),
|
357
497
|
?guardrail_identifier: ::String,
|
358
|
-
?guardrail_version: ::String
|
498
|
+
?guardrail_version: ::String,
|
499
|
+
?performance_config_latency: ("standard" | "optimized")
|
359
500
|
) -> _InvokeModelResponseSuccess
|
360
501
|
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _InvokeModelResponseSuccess
|
361
502
|
|
503
|
+
interface _InvokeModelWithBidirectionalStreamResponseSuccess
|
504
|
+
include ::Seahorse::Client::_ResponseSuccess[Types::InvokeModelWithBidirectionalStreamResponse]
|
505
|
+
def body: () -> Types::InvokeModelWithBidirectionalStreamOutput
|
506
|
+
end
|
507
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Client.html#invoke_model_with_bidirectional_stream-instance_method
|
508
|
+
def invoke_model_with_bidirectional_stream: (
|
509
|
+
model_id: ::String,
|
510
|
+
input_event_stream_hander: untyped
|
511
|
+
) ?{ (*untyped) -> void } -> _InvokeModelWithBidirectionalStreamResponseSuccess
|
512
|
+
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _InvokeModelWithBidirectionalStreamResponseSuccess
|
513
|
+
|
362
514
|
interface _InvokeModelWithResponseStreamResponseSuccess
|
363
515
|
include ::Seahorse::Client::_ResponseSuccess[Types::InvokeModelWithResponseStreamResponse]
|
364
516
|
def body: () -> Types::ResponseStream
|
365
517
|
def content_type: () -> ::String
|
518
|
+
def performance_config_latency: () -> ("standard" | "optimized")
|
366
519
|
end
|
367
520
|
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Client.html#invoke_model_with_response_stream-instance_method
|
368
521
|
def invoke_model_with_response_stream: (
|
369
|
-
body: ::String,
|
522
|
+
?body: ::String,
|
370
523
|
?content_type: ::String,
|
371
524
|
?accept: ::String,
|
372
525
|
model_id: ::String,
|
373
|
-
?trace: ("ENABLED" | "DISABLED"),
|
526
|
+
?trace: ("ENABLED" | "DISABLED" | "ENABLED_FULL"),
|
374
527
|
?guardrail_identifier: ::String,
|
375
|
-
?guardrail_version: ::String
|
528
|
+
?guardrail_version: ::String,
|
529
|
+
?performance_config_latency: ("standard" | "optimized")
|
376
530
|
) ?{ (*untyped) -> void } -> _InvokeModelWithResponseStreamResponseSuccess
|
377
531
|
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _InvokeModelWithResponseStreamResponseSuccess
|
532
|
+
|
533
|
+
interface _ListAsyncInvokesResponseSuccess
|
534
|
+
include ::Seahorse::Client::_ResponseSuccess[Types::ListAsyncInvokesResponse]
|
535
|
+
def next_token: () -> ::String
|
536
|
+
def async_invoke_summaries: () -> ::Array[Types::AsyncInvokeSummary]
|
537
|
+
end
|
538
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Client.html#list_async_invokes-instance_method
|
539
|
+
def list_async_invokes: (
|
540
|
+
?submit_time_after: ::Time,
|
541
|
+
?submit_time_before: ::Time,
|
542
|
+
?status_equals: ("InProgress" | "Completed" | "Failed"),
|
543
|
+
?max_results: ::Integer,
|
544
|
+
?next_token: ::String,
|
545
|
+
?sort_by: ("SubmissionTime"),
|
546
|
+
?sort_order: ("Ascending" | "Descending")
|
547
|
+
) -> _ListAsyncInvokesResponseSuccess
|
548
|
+
| (?Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _ListAsyncInvokesResponseSuccess
|
549
|
+
|
550
|
+
interface _StartAsyncInvokeResponseSuccess
|
551
|
+
include ::Seahorse::Client::_ResponseSuccess[Types::StartAsyncInvokeResponse]
|
552
|
+
def invocation_arn: () -> ::String
|
553
|
+
end
|
554
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Client.html#start_async_invoke-instance_method
|
555
|
+
def start_async_invoke: (
|
556
|
+
?client_request_token: ::String,
|
557
|
+
model_id: ::String,
|
558
|
+
model_input: {
|
559
|
+
},
|
560
|
+
output_data_config: {
|
561
|
+
s3_output_data_config: {
|
562
|
+
s3_uri: ::String,
|
563
|
+
kms_key_id: ::String?,
|
564
|
+
bucket_owner: ::String?
|
565
|
+
}?
|
566
|
+
},
|
567
|
+
?tags: Array[
|
568
|
+
{
|
569
|
+
key: ::String,
|
570
|
+
value: ::String
|
571
|
+
},
|
572
|
+
]
|
573
|
+
) -> _StartAsyncInvokeResponseSuccess
|
574
|
+
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _StartAsyncInvokeResponseSuccess
|
378
575
|
end
|
379
576
|
end
|
380
577
|
end
|
data/sig/errors.rbs
CHANGED
@@ -14,6 +14,9 @@ module Aws
|
|
14
14
|
class AccessDeniedException < ::Aws::Errors::ServiceError
|
15
15
|
def message: () -> ::String
|
16
16
|
end
|
17
|
+
class ConflictException < ::Aws::Errors::ServiceError
|
18
|
+
def message: () -> ::String
|
19
|
+
end
|
17
20
|
class InternalServerException < ::Aws::Errors::ServiceError
|
18
21
|
def message: () -> ::String
|
19
22
|
end
|
data/sig/resource.rbs
CHANGED
@@ -42,7 +42,9 @@ module Aws
|
|
42
42
|
?max_attempts: Integer,
|
43
43
|
?output_event_stream_handler: Proc,
|
44
44
|
?profile: String,
|
45
|
+
?request_checksum_calculation: String,
|
45
46
|
?request_min_compression_size_bytes: Integer,
|
47
|
+
?response_checksum_validation: String,
|
46
48
|
?retry_backoff: Proc,
|
47
49
|
?retry_base_delay: Float,
|
48
50
|
?retry_jitter: (:none | :equal | :full | ^(Integer) -> Integer),
|