aws-sdk-bedrockagentruntime 1.31.0 → 1.33.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.
@@ -55,7 +55,7 @@ module Aws::BedrockAgentRuntime
55
55
  autoload :Endpoints, 'aws-sdk-bedrockagentruntime/endpoints'
56
56
  autoload :EventStreams, 'aws-sdk-bedrockagentruntime/event_streams'
57
57
 
58
- GEM_VERSION = '1.31.0'
58
+ GEM_VERSION = '1.33.0'
59
59
 
60
60
  end
61
61
 
data/sig/client.rbs CHANGED
@@ -265,6 +265,215 @@ 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
+
462
+ interface _OptimizePromptResponseSuccess
463
+ include ::Seahorse::Client::_ResponseSuccess[Types::OptimizePromptResponse]
464
+ def optimized_prompt: () -> Types::OptimizedPromptStream
465
+ end
466
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockAgentRuntime/Client.html#optimize_prompt-instance_method
467
+ def optimize_prompt: (
468
+ input: {
469
+ text_prompt: {
470
+ text: ::String
471
+ }?
472
+ },
473
+ target_model_id: ::String
474
+ ) ?{ (*untyped) -> void } -> _OptimizePromptResponseSuccess
475
+ | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _OptimizePromptResponseSuccess
476
+
268
477
  interface _RetrieveResponseSuccess
269
478
  include ::Seahorse::Client::_ResponseSuccess[Types::RetrieveResponse]
270
479
  def next_token: () -> ::String
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,22 @@ 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
+
72
+ class AnalyzePromptEvent
73
+ attr_accessor message: ::String
74
+ attr_accessor event_type: untyped
75
+ SENSITIVE: []
76
+ end
77
+
34
78
  class ApiInvocationInput
35
79
  attr_accessor action_group: ::String
36
80
  attr_accessor action_invocation_type: ("RESULT" | "USER_CONFIRMATION" | "USER_CONFIRMATION_AND_RESULT")
@@ -315,6 +359,14 @@ module Aws::BedrockAgentRuntime
315
359
  SENSITIVE: []
316
360
  end
317
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
+
318
370
  class FunctionInvocationInput
319
371
  attr_accessor action_group: ::String
320
372
  attr_accessor action_invocation_type: ("RESULT" | "USER_CONFIRMATION" | "USER_CONFIRMATION_AND_RESULT")
@@ -339,6 +391,17 @@ module Aws::BedrockAgentRuntime
339
391
  SENSITIVE: []
340
392
  end
341
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
+
342
405
  class GeneratedResponsePart
343
406
  attr_accessor text_response_part: Types::TextResponsePart
344
407
  SENSITIVE: [:text_response_part]
@@ -382,6 +445,12 @@ module Aws::BedrockAgentRuntime
382
445
  SENSITIVE: []
383
446
  end
384
447
 
448
+ class GuardrailConfigurationWithArn
449
+ attr_accessor guardrail_identifier: ::String
450
+ attr_accessor guardrail_version: ::String
451
+ SENSITIVE: []
452
+ end
453
+
385
454
  class GuardrailContentFilter
386
455
  attr_accessor action: ("BLOCKED")
387
456
  attr_accessor confidence: ("NONE" | "LOW" | "MEDIUM" | "HIGH")
@@ -468,6 +537,42 @@ module Aws::BedrockAgentRuntime
468
537
  SENSITIVE: []
469
538
  end
470
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
+
471
576
  class InputFile
472
577
  attr_accessor name: ::String
473
578
  attr_accessor source: Types::FileSource
@@ -475,6 +580,17 @@ module Aws::BedrockAgentRuntime
475
580
  SENSITIVE: []
476
581
  end
477
582
 
583
+ class InputPrompt
584
+ attr_accessor text_prompt: Types::TextPrompt
585
+ attr_accessor unknown: untyped
586
+ SENSITIVE: [:text_prompt]
587
+
588
+ class TextPrompt < InputPrompt
589
+ end
590
+ class Unknown < InputPrompt
591
+ end
592
+ end
593
+
478
594
  class InternalServerException
479
595
  attr_accessor message: ::String
480
596
  attr_accessor event_type: untyped
@@ -551,6 +667,37 @@ module Aws::BedrockAgentRuntime
551
667
  SENSITIVE: []
552
668
  end
553
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
+
554
701
  class KnowledgeBaseConfiguration
555
702
  attr_accessor knowledge_base_id: ::String
556
703
  attr_accessor retrieval_configuration: Types::KnowledgeBaseRetrievalConfiguration
@@ -634,7 +781,7 @@ module Aws::BedrockAgentRuntime
634
781
  attr_accessor prompt_creation_mode: ("DEFAULT" | "OVERRIDDEN")
635
782
  attr_accessor text: ::String
636
783
  attr_accessor trace_id: ::String
637
- 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")
638
785
  SENSITIVE: [:text]
639
786
  end
640
787
 
@@ -649,6 +796,34 @@ module Aws::BedrockAgentRuntime
649
796
  SENSITIVE: [:reprompt_response]
650
797
  end
651
798
 
799
+ class OptimizePromptRequest
800
+ attr_accessor input: Types::InputPrompt
801
+ attr_accessor target_model_id: ::String
802
+ SENSITIVE: []
803
+ end
804
+
805
+ class OptimizePromptResponse
806
+ attr_accessor optimized_prompt: Types::OptimizedPromptStream
807
+ SENSITIVE: []
808
+ end
809
+
810
+ class OptimizedPrompt
811
+ attr_accessor text_prompt: Types::TextPrompt
812
+ attr_accessor unknown: untyped
813
+ SENSITIVE: [:text_prompt]
814
+
815
+ class TextPrompt < OptimizedPrompt
816
+ end
817
+ class Unknown < OptimizedPrompt
818
+ end
819
+ end
820
+
821
+ class OptimizedPromptEvent
822
+ attr_accessor optimized_prompt: Types::OptimizedPrompt
823
+ attr_accessor event_type: untyped
824
+ SENSITIVE: []
825
+ end
826
+
652
827
  class OrchestrationConfiguration
653
828
  attr_accessor additional_model_request_fields: ::Hash[::String, untyped]
654
829
  attr_accessor inference_config: Types::InferenceConfig
@@ -701,6 +876,13 @@ module Aws::BedrockAgentRuntime
701
876
  SENSITIVE: []
702
877
  end
703
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
+
704
886
  class PayloadPart
705
887
  attr_accessor attribution: Types::Attribution
706
888
  attr_accessor bytes: ::String
@@ -763,6 +945,22 @@ module Aws::BedrockAgentRuntime
763
945
  end
764
946
  end
765
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
+
766
964
  class PromptTemplate
767
965
  attr_accessor text_prompt_template: ::String
768
966
  SENSITIVE: [:text_prompt_template]
@@ -959,6 +1157,12 @@ module Aws::BedrockAgentRuntime
959
1157
  SENSITIVE: []
960
1158
  end
961
1159
 
1160
+ class S3Identifier
1161
+ attr_accessor s3_bucket_name: ::String
1162
+ attr_accessor s3_object_key: ::String
1163
+ SENSITIVE: []
1164
+ end
1165
+
962
1166
  class S3ObjectDoc
963
1167
  attr_accessor uri: ::String
964
1168
  SENSITIVE: []
@@ -999,6 +1203,11 @@ module Aws::BedrockAgentRuntime
999
1203
  SENSITIVE: []
1000
1204
  end
1001
1205
 
1206
+ class TextPrompt
1207
+ attr_accessor text: ::String
1208
+ SENSITIVE: []
1209
+ end
1210
+
1002
1211
  class TextResponsePart
1003
1212
  attr_accessor span: Types::Span
1004
1213
  attr_accessor text: ::String
@@ -1060,6 +1269,14 @@ module Aws::BedrockAgentRuntime
1060
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]
1061
1270
  end
1062
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
+
1276
+ class OptimizedPromptStream < Enumerator[untyped, untyped]
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]
1278
+ end
1279
+
1063
1280
  class ResponseStream < Enumerator[untyped, untyped]
1064
1281
  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]
1065
1282
  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.31.0
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-08 00:00:00.000000000 Z
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