aws-sdk-bedrockagentruntime 1.32.0 → 1.33.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-bedrockagentruntime/client.rb +777 -4
- data/lib/aws-sdk-bedrockagentruntime/client_api.rb +197 -0
- data/lib/aws-sdk-bedrockagentruntime/event_streams.rb +94 -0
- data/lib/aws-sdk-bedrockagentruntime/types.rb +744 -0
- data/lib/aws-sdk-bedrockagentruntime.rb +1 -1
- data/sig/client.rbs +194 -0
- data/sig/types.rbs +164 -1
- metadata +2 -2
data/sig/client.rbs
CHANGED
@@ -265,6 +265,200 @@ module Aws
|
|
265
265
|
) ?{ (*untyped) -> void } -> _InvokeFlowResponseSuccess
|
266
266
|
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _InvokeFlowResponseSuccess
|
267
267
|
|
268
|
+
interface _InvokeInlineAgentResponseSuccess
|
269
|
+
include ::Seahorse::Client::_ResponseSuccess[Types::InvokeInlineAgentResponse]
|
270
|
+
def completion: () -> Types::InlineAgentResponseStream
|
271
|
+
def content_type: () -> ::String
|
272
|
+
def session_id: () -> ::String
|
273
|
+
end
|
274
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockAgentRuntime/Client.html#invoke_inline_agent-instance_method
|
275
|
+
def invoke_inline_agent: (
|
276
|
+
?action_groups: Array[
|
277
|
+
{
|
278
|
+
action_group_executor: {
|
279
|
+
custom_control: ("RETURN_CONTROL")?,
|
280
|
+
lambda: ::String?
|
281
|
+
}?,
|
282
|
+
action_group_name: ::String,
|
283
|
+
api_schema: {
|
284
|
+
payload: ::String?,
|
285
|
+
s3: {
|
286
|
+
s3_bucket_name: ::String?,
|
287
|
+
s3_object_key: ::String?
|
288
|
+
}?
|
289
|
+
}?,
|
290
|
+
description: ::String?,
|
291
|
+
function_schema: {
|
292
|
+
functions: Array[
|
293
|
+
{
|
294
|
+
description: ::String?,
|
295
|
+
name: ::String,
|
296
|
+
parameters: Hash[::String, {
|
297
|
+
description: ::String?,
|
298
|
+
required: bool?,
|
299
|
+
type: ("string" | "number" | "integer" | "boolean" | "array")
|
300
|
+
}]?,
|
301
|
+
require_confirmation: ("ENABLED" | "DISABLED")?
|
302
|
+
},
|
303
|
+
]?
|
304
|
+
}?,
|
305
|
+
parent_action_group_signature: ("AMAZON.UserInput" | "AMAZON.CodeInterpreter")?
|
306
|
+
},
|
307
|
+
],
|
308
|
+
?customer_encryption_key_arn: ::String,
|
309
|
+
?enable_trace: bool,
|
310
|
+
?end_session: bool,
|
311
|
+
foundation_model: ::String,
|
312
|
+
?guardrail_configuration: {
|
313
|
+
guardrail_identifier: ::String,
|
314
|
+
guardrail_version: ::String
|
315
|
+
},
|
316
|
+
?idle_session_ttl_in_seconds: ::Integer,
|
317
|
+
?inline_session_state: {
|
318
|
+
files: Array[
|
319
|
+
{
|
320
|
+
name: ::String,
|
321
|
+
source: {
|
322
|
+
byte_content: {
|
323
|
+
data: ::String,
|
324
|
+
media_type: ::String
|
325
|
+
}?,
|
326
|
+
s3_location: {
|
327
|
+
uri: ::String
|
328
|
+
}?,
|
329
|
+
source_type: ("S3" | "BYTE_CONTENT")
|
330
|
+
},
|
331
|
+
use_case: ("CODE_INTERPRETER" | "CHAT")
|
332
|
+
},
|
333
|
+
]?,
|
334
|
+
invocation_id: ::String?,
|
335
|
+
prompt_session_attributes: Hash[::String, ::String]?,
|
336
|
+
return_control_invocation_results: Array[
|
337
|
+
{
|
338
|
+
api_result: {
|
339
|
+
action_group: ::String,
|
340
|
+
api_path: ::String?,
|
341
|
+
confirmation_state: ("CONFIRM" | "DENY")?,
|
342
|
+
http_method: ::String?,
|
343
|
+
http_status_code: ::Integer?,
|
344
|
+
response_body: Hash[::String, {
|
345
|
+
body: ::String?
|
346
|
+
}]?,
|
347
|
+
response_state: ("FAILURE" | "REPROMPT")?
|
348
|
+
}?,
|
349
|
+
function_result: {
|
350
|
+
action_group: ::String,
|
351
|
+
confirmation_state: ("CONFIRM" | "DENY")?,
|
352
|
+
function: ::String?,
|
353
|
+
response_body: Hash[::String, {
|
354
|
+
body: ::String?
|
355
|
+
}]?,
|
356
|
+
response_state: ("FAILURE" | "REPROMPT")?
|
357
|
+
}?
|
358
|
+
},
|
359
|
+
]?,
|
360
|
+
session_attributes: Hash[::String, ::String]?
|
361
|
+
},
|
362
|
+
?input_text: ::String,
|
363
|
+
instruction: ::String,
|
364
|
+
?knowledge_bases: Array[
|
365
|
+
{
|
366
|
+
description: ::String,
|
367
|
+
knowledge_base_id: ::String,
|
368
|
+
retrieval_configuration: {
|
369
|
+
vector_search_configuration: {
|
370
|
+
filter: {
|
371
|
+
and_all: Array[
|
372
|
+
untyped,
|
373
|
+
]?,
|
374
|
+
equals: {
|
375
|
+
key: ::String,
|
376
|
+
value: {
|
377
|
+
}
|
378
|
+
}?,
|
379
|
+
greater_than: {
|
380
|
+
key: ::String,
|
381
|
+
value: {
|
382
|
+
}
|
383
|
+
}?,
|
384
|
+
greater_than_or_equals: {
|
385
|
+
key: ::String,
|
386
|
+
value: {
|
387
|
+
}
|
388
|
+
}?,
|
389
|
+
in: {
|
390
|
+
key: ::String,
|
391
|
+
value: {
|
392
|
+
}
|
393
|
+
}?,
|
394
|
+
less_than: {
|
395
|
+
key: ::String,
|
396
|
+
value: {
|
397
|
+
}
|
398
|
+
}?,
|
399
|
+
less_than_or_equals: {
|
400
|
+
key: ::String,
|
401
|
+
value: {
|
402
|
+
}
|
403
|
+
}?,
|
404
|
+
list_contains: {
|
405
|
+
key: ::String,
|
406
|
+
value: {
|
407
|
+
}
|
408
|
+
}?,
|
409
|
+
not_equals: {
|
410
|
+
key: ::String,
|
411
|
+
value: {
|
412
|
+
}
|
413
|
+
}?,
|
414
|
+
not_in: {
|
415
|
+
key: ::String,
|
416
|
+
value: {
|
417
|
+
}
|
418
|
+
}?,
|
419
|
+
or_all: Array[
|
420
|
+
untyped,
|
421
|
+
]?,
|
422
|
+
starts_with: {
|
423
|
+
key: ::String,
|
424
|
+
value: {
|
425
|
+
}
|
426
|
+
}?,
|
427
|
+
string_contains: {
|
428
|
+
key: ::String,
|
429
|
+
value: {
|
430
|
+
}
|
431
|
+
}?
|
432
|
+
}?,
|
433
|
+
number_of_results: ::Integer?,
|
434
|
+
override_search_type: ("HYBRID" | "SEMANTIC")?
|
435
|
+
}
|
436
|
+
}?
|
437
|
+
},
|
438
|
+
],
|
439
|
+
?prompt_override_configuration: {
|
440
|
+
override_lambda: ::String?,
|
441
|
+
prompt_configurations: Array[
|
442
|
+
{
|
443
|
+
base_prompt_template: ::String?,
|
444
|
+
inference_configuration: {
|
445
|
+
maximum_length: ::Integer?,
|
446
|
+
stop_sequences: Array[::String]?,
|
447
|
+
temperature: ::Float?,
|
448
|
+
top_k: ::Integer?,
|
449
|
+
top_p: ::Float?
|
450
|
+
}?,
|
451
|
+
parser_mode: ("DEFAULT" | "OVERRIDDEN")?,
|
452
|
+
prompt_creation_mode: ("DEFAULT" | "OVERRIDDEN")?,
|
453
|
+
prompt_state: ("ENABLED" | "DISABLED")?,
|
454
|
+
prompt_type: ("PRE_PROCESSING" | "ORCHESTRATION" | "KNOWLEDGE_BASE_RESPONSE_GENERATION" | "POST_PROCESSING" | "ROUTING_CLASSIFIER")?
|
455
|
+
},
|
456
|
+
]
|
457
|
+
},
|
458
|
+
session_id: ::String
|
459
|
+
) ?{ (*untyped) -> void } -> _InvokeInlineAgentResponseSuccess
|
460
|
+
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _InvokeInlineAgentResponseSuccess
|
461
|
+
|
268
462
|
interface _OptimizePromptResponseSuccess
|
269
463
|
include ::Seahorse::Client::_ResponseSuccess[Types::OptimizePromptResponse]
|
270
464
|
def optimized_prompt: () -> Types::OptimizedPromptStream
|
data/sig/types.rbs
CHANGED
@@ -8,12 +8,40 @@
|
|
8
8
|
module Aws::BedrockAgentRuntime
|
9
9
|
module Types
|
10
10
|
|
11
|
+
class APISchema
|
12
|
+
attr_accessor payload: ::String
|
13
|
+
attr_accessor s3: Types::S3Identifier
|
14
|
+
attr_accessor unknown: untyped
|
15
|
+
SENSITIVE: [:payload]
|
16
|
+
|
17
|
+
class Payload < APISchema
|
18
|
+
end
|
19
|
+
class S3 < APISchema
|
20
|
+
end
|
21
|
+
class Unknown < APISchema
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
11
25
|
class AccessDeniedException
|
12
26
|
attr_accessor message: ::String
|
13
27
|
attr_accessor event_type: untyped
|
14
28
|
SENSITIVE: []
|
15
29
|
end
|
16
30
|
|
31
|
+
class ActionGroupExecutor
|
32
|
+
attr_accessor custom_control: ("RETURN_CONTROL")
|
33
|
+
attr_accessor lambda: ::String
|
34
|
+
attr_accessor unknown: untyped
|
35
|
+
SENSITIVE: []
|
36
|
+
|
37
|
+
class CustomControl < ActionGroupExecutor
|
38
|
+
end
|
39
|
+
class Lambda < ActionGroupExecutor
|
40
|
+
end
|
41
|
+
class Unknown < ActionGroupExecutor
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
17
45
|
class ActionGroupInvocationInput
|
18
46
|
attr_accessor action_group_name: ::String
|
19
47
|
attr_accessor api_path: ::String
|
@@ -31,6 +59,16 @@ module Aws::BedrockAgentRuntime
|
|
31
59
|
SENSITIVE: [:text]
|
32
60
|
end
|
33
61
|
|
62
|
+
class AgentActionGroup
|
63
|
+
attr_accessor action_group_executor: Types::ActionGroupExecutor
|
64
|
+
attr_accessor action_group_name: ::String
|
65
|
+
attr_accessor api_schema: Types::APISchema
|
66
|
+
attr_accessor description: ::String
|
67
|
+
attr_accessor function_schema: Types::FunctionSchema
|
68
|
+
attr_accessor parent_action_group_signature: ("AMAZON.UserInput" | "AMAZON.CodeInterpreter")
|
69
|
+
SENSITIVE: [:action_group_name, :description]
|
70
|
+
end
|
71
|
+
|
34
72
|
class AnalyzePromptEvent
|
35
73
|
attr_accessor message: ::String
|
36
74
|
attr_accessor event_type: untyped
|
@@ -321,6 +359,14 @@ module Aws::BedrockAgentRuntime
|
|
321
359
|
SENSITIVE: []
|
322
360
|
end
|
323
361
|
|
362
|
+
class FunctionDefinition
|
363
|
+
attr_accessor description: ::String
|
364
|
+
attr_accessor name: ::String
|
365
|
+
attr_accessor parameters: ::Hash[::String, Types::ParameterDetail]
|
366
|
+
attr_accessor require_confirmation: ("ENABLED" | "DISABLED")
|
367
|
+
SENSITIVE: [:name]
|
368
|
+
end
|
369
|
+
|
324
370
|
class FunctionInvocationInput
|
325
371
|
attr_accessor action_group: ::String
|
326
372
|
attr_accessor action_invocation_type: ("RESULT" | "USER_CONFIRMATION" | "USER_CONFIRMATION_AND_RESULT")
|
@@ -345,6 +391,17 @@ module Aws::BedrockAgentRuntime
|
|
345
391
|
SENSITIVE: []
|
346
392
|
end
|
347
393
|
|
394
|
+
class FunctionSchema
|
395
|
+
attr_accessor functions: ::Array[Types::FunctionDefinition]
|
396
|
+
attr_accessor unknown: untyped
|
397
|
+
SENSITIVE: []
|
398
|
+
|
399
|
+
class Functions < FunctionSchema
|
400
|
+
end
|
401
|
+
class Unknown < FunctionSchema
|
402
|
+
end
|
403
|
+
end
|
404
|
+
|
348
405
|
class GeneratedResponsePart
|
349
406
|
attr_accessor text_response_part: Types::TextResponsePart
|
350
407
|
SENSITIVE: [:text_response_part]
|
@@ -388,6 +445,12 @@ module Aws::BedrockAgentRuntime
|
|
388
445
|
SENSITIVE: []
|
389
446
|
end
|
390
447
|
|
448
|
+
class GuardrailConfigurationWithArn
|
449
|
+
attr_accessor guardrail_identifier: ::String
|
450
|
+
attr_accessor guardrail_version: ::String
|
451
|
+
SENSITIVE: []
|
452
|
+
end
|
453
|
+
|
391
454
|
class GuardrailContentFilter
|
392
455
|
attr_accessor action: ("BLOCKED")
|
393
456
|
attr_accessor confidence: ("NONE" | "LOW" | "MEDIUM" | "HIGH")
|
@@ -474,6 +537,42 @@ module Aws::BedrockAgentRuntime
|
|
474
537
|
SENSITIVE: []
|
475
538
|
end
|
476
539
|
|
540
|
+
class InlineAgentFilePart
|
541
|
+
attr_accessor files: ::Array[Types::OutputFile]
|
542
|
+
attr_accessor event_type: untyped
|
543
|
+
SENSITIVE: []
|
544
|
+
end
|
545
|
+
|
546
|
+
class InlineAgentPayloadPart
|
547
|
+
attr_accessor attribution: Types::Attribution
|
548
|
+
attr_accessor bytes: ::String
|
549
|
+
attr_accessor event_type: untyped
|
550
|
+
SENSITIVE: [:bytes]
|
551
|
+
end
|
552
|
+
|
553
|
+
class InlineAgentReturnControlPayload
|
554
|
+
attr_accessor invocation_id: ::String
|
555
|
+
attr_accessor invocation_inputs: ::Array[Types::InvocationInputMember]
|
556
|
+
attr_accessor event_type: untyped
|
557
|
+
SENSITIVE: []
|
558
|
+
end
|
559
|
+
|
560
|
+
class InlineAgentTracePart
|
561
|
+
attr_accessor session_id: ::String
|
562
|
+
attr_accessor trace: Types::Trace
|
563
|
+
attr_accessor event_type: untyped
|
564
|
+
SENSITIVE: [:trace]
|
565
|
+
end
|
566
|
+
|
567
|
+
class InlineSessionState
|
568
|
+
attr_accessor files: ::Array[Types::InputFile]
|
569
|
+
attr_accessor invocation_id: ::String
|
570
|
+
attr_accessor prompt_session_attributes: ::Hash[::String, ::String]
|
571
|
+
attr_accessor return_control_invocation_results: ::Array[Types::InvocationResultMember]
|
572
|
+
attr_accessor session_attributes: ::Hash[::String, ::String]
|
573
|
+
SENSITIVE: []
|
574
|
+
end
|
575
|
+
|
477
576
|
class InputFile
|
478
577
|
attr_accessor name: ::String
|
479
578
|
attr_accessor source: Types::FileSource
|
@@ -568,6 +667,37 @@ module Aws::BedrockAgentRuntime
|
|
568
667
|
SENSITIVE: []
|
569
668
|
end
|
570
669
|
|
670
|
+
class InvokeInlineAgentRequest
|
671
|
+
attr_accessor action_groups: ::Array[Types::AgentActionGroup]
|
672
|
+
attr_accessor customer_encryption_key_arn: ::String
|
673
|
+
attr_accessor enable_trace: bool
|
674
|
+
attr_accessor end_session: bool
|
675
|
+
attr_accessor foundation_model: ::String
|
676
|
+
attr_accessor guardrail_configuration: Types::GuardrailConfigurationWithArn
|
677
|
+
attr_accessor idle_session_ttl_in_seconds: ::Integer
|
678
|
+
attr_accessor inline_session_state: Types::InlineSessionState
|
679
|
+
attr_accessor input_text: ::String
|
680
|
+
attr_accessor instruction: ::String
|
681
|
+
attr_accessor knowledge_bases: ::Array[Types::KnowledgeBase]
|
682
|
+
attr_accessor prompt_override_configuration: Types::PromptOverrideConfiguration
|
683
|
+
attr_accessor session_id: ::String
|
684
|
+
SENSITIVE: [:input_text, :instruction, :prompt_override_configuration]
|
685
|
+
end
|
686
|
+
|
687
|
+
class InvokeInlineAgentResponse
|
688
|
+
attr_accessor completion: Types::InlineAgentResponseStream
|
689
|
+
attr_accessor content_type: ::String
|
690
|
+
attr_accessor session_id: ::String
|
691
|
+
SENSITIVE: []
|
692
|
+
end
|
693
|
+
|
694
|
+
class KnowledgeBase
|
695
|
+
attr_accessor description: ::String
|
696
|
+
attr_accessor knowledge_base_id: ::String
|
697
|
+
attr_accessor retrieval_configuration: Types::KnowledgeBaseRetrievalConfiguration
|
698
|
+
SENSITIVE: [:description]
|
699
|
+
end
|
700
|
+
|
571
701
|
class KnowledgeBaseConfiguration
|
572
702
|
attr_accessor knowledge_base_id: ::String
|
573
703
|
attr_accessor retrieval_configuration: Types::KnowledgeBaseRetrievalConfiguration
|
@@ -651,7 +781,7 @@ module Aws::BedrockAgentRuntime
|
|
651
781
|
attr_accessor prompt_creation_mode: ("DEFAULT" | "OVERRIDDEN")
|
652
782
|
attr_accessor text: ::String
|
653
783
|
attr_accessor trace_id: ::String
|
654
|
-
attr_accessor type: ("PRE_PROCESSING" | "ORCHESTRATION" | "KNOWLEDGE_BASE_RESPONSE_GENERATION" | "POST_PROCESSING")
|
784
|
+
attr_accessor type: ("PRE_PROCESSING" | "ORCHESTRATION" | "KNOWLEDGE_BASE_RESPONSE_GENERATION" | "POST_PROCESSING" | "ROUTING_CLASSIFIER")
|
655
785
|
SENSITIVE: [:text]
|
656
786
|
end
|
657
787
|
|
@@ -746,6 +876,13 @@ module Aws::BedrockAgentRuntime
|
|
746
876
|
SENSITIVE: []
|
747
877
|
end
|
748
878
|
|
879
|
+
class ParameterDetail
|
880
|
+
attr_accessor description: ::String
|
881
|
+
attr_accessor required: bool
|
882
|
+
attr_accessor type: ("string" | "number" | "integer" | "boolean" | "array")
|
883
|
+
SENSITIVE: []
|
884
|
+
end
|
885
|
+
|
749
886
|
class PayloadPart
|
750
887
|
attr_accessor attribution: Types::Attribution
|
751
888
|
attr_accessor bytes: ::String
|
@@ -808,6 +945,22 @@ module Aws::BedrockAgentRuntime
|
|
808
945
|
end
|
809
946
|
end
|
810
947
|
|
948
|
+
class PromptConfiguration
|
949
|
+
attr_accessor base_prompt_template: ::String
|
950
|
+
attr_accessor inference_configuration: Types::InferenceConfiguration
|
951
|
+
attr_accessor parser_mode: ("DEFAULT" | "OVERRIDDEN")
|
952
|
+
attr_accessor prompt_creation_mode: ("DEFAULT" | "OVERRIDDEN")
|
953
|
+
attr_accessor prompt_state: ("ENABLED" | "DISABLED")
|
954
|
+
attr_accessor prompt_type: ("PRE_PROCESSING" | "ORCHESTRATION" | "KNOWLEDGE_BASE_RESPONSE_GENERATION" | "POST_PROCESSING" | "ROUTING_CLASSIFIER")
|
955
|
+
SENSITIVE: [:base_prompt_template]
|
956
|
+
end
|
957
|
+
|
958
|
+
class PromptOverrideConfiguration
|
959
|
+
attr_accessor override_lambda: ::String
|
960
|
+
attr_accessor prompt_configurations: ::Array[Types::PromptConfiguration]
|
961
|
+
SENSITIVE: []
|
962
|
+
end
|
963
|
+
|
811
964
|
class PromptTemplate
|
812
965
|
attr_accessor text_prompt_template: ::String
|
813
966
|
SENSITIVE: [:text_prompt_template]
|
@@ -1004,6 +1157,12 @@ module Aws::BedrockAgentRuntime
|
|
1004
1157
|
SENSITIVE: []
|
1005
1158
|
end
|
1006
1159
|
|
1160
|
+
class S3Identifier
|
1161
|
+
attr_accessor s3_bucket_name: ::String
|
1162
|
+
attr_accessor s3_object_key: ::String
|
1163
|
+
SENSITIVE: []
|
1164
|
+
end
|
1165
|
+
|
1007
1166
|
class S3ObjectDoc
|
1008
1167
|
attr_accessor uri: ::String
|
1009
1168
|
SENSITIVE: []
|
@@ -1110,6 +1269,10 @@ module Aws::BedrockAgentRuntime
|
|
1110
1269
|
def event_types: () -> [:access_denied_exception, :bad_gateway_exception, :conflict_exception, :dependency_failed_exception, :flow_completion_event, :flow_output_event, :flow_trace_event, :internal_server_exception, :resource_not_found_exception, :service_quota_exceeded_exception, :throttling_exception, :validation_exception]
|
1111
1270
|
end
|
1112
1271
|
|
1272
|
+
class InlineAgentResponseStream < Enumerator[untyped, untyped]
|
1273
|
+
def event_types: () -> [:access_denied_exception, :bad_gateway_exception, :chunk, :conflict_exception, :dependency_failed_exception, :files, :internal_server_exception, :resource_not_found_exception, :return_control, :service_quota_exceeded_exception, :throttling_exception, :trace, :validation_exception]
|
1274
|
+
end
|
1275
|
+
|
1113
1276
|
class OptimizedPromptStream < Enumerator[untyped, untyped]
|
1114
1277
|
def event_types: () -> [:access_denied_exception, :analyze_prompt_event, :bad_gateway_exception, :dependency_failed_exception, :internal_server_exception, :optimized_prompt_event, :throttling_exception, :validation_exception]
|
1115
1278
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-bedrockagentruntime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.33.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|