aws-sdk-bedrockagentruntime 1.26.0 → 1.28.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 125500bac53e227983f1a95df4208a701f877f6579424dd6985e23e580755c88
4
- data.tar.gz: fc1b91f68acc8862dedd8024cfa970947f2a43d6112d8d8f6e877ba1bc5fdb06
3
+ metadata.gz: 4338575e5e4e1c40786134c71bd8381feff99a7dbf001e0b9c24bff649e80617
4
+ data.tar.gz: f6f86d4d746e7ddac1dcaab2c74c9d0abaf8a63f636cadf0290206666e5f1cab
5
5
  SHA512:
6
- metadata.gz: ab5a18eceb7a9375574fabff7a665d908f0fbe4e03b539c2d421aff8cd07ffa0e5fa913e0c93f361075faacc93565c490001281056b43d4aa5421170f7cb0329
7
- data.tar.gz: 7d246d3302df4d49a7106821513cfda5644fdae59a07741a9045b4e45e3697eee0b597bb0bf42cbc7df78482ef65637e790574de1a00cdcdf1ea31b9f4d78c9f
6
+ metadata.gz: d3385e7ef442ceff7f263840efb5343a58d981b2b777851e27c0ff3cf662ee2d399abd15feb80e26e601d9684d0c61676d7713cef23fed87741e690d36fd056c
7
+ data.tar.gz: 5a9131c582f6526d88951088e05a86eb45b4d968e91ad17d4b207f8e2b1185638989552b3bb18a8323434d7f99bde1e756e39161848d484db4e720470e149100
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.28.0 (2024-10-18)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.27.0 (2024-10-02)
10
+ ------------------
11
+
12
+ * Feature - Added raw model response and usage metrics to PreProcessing and PostProcessing Trace
13
+
4
14
  1.26.0 (2024-09-24)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.26.0
1
+ 1.28.0
@@ -1187,7 +1187,10 @@ module Aws::BedrockAgentRuntime
1187
1187
  # event.trace.post_processing_trace.model_invocation_input.text #=> String
1188
1188
  # event.trace.post_processing_trace.model_invocation_input.trace_id #=> String
1189
1189
  # event.trace.post_processing_trace.model_invocation_input.type #=> String, one of "PRE_PROCESSING", "ORCHESTRATION", "KNOWLEDGE_BASE_RESPONSE_GENERATION", "POST_PROCESSING"
1190
+ # event.trace.post_processing_trace.model_invocation_output.metadata.usage.input_tokens #=> Integer
1191
+ # event.trace.post_processing_trace.model_invocation_output.metadata.usage.output_tokens #=> Integer
1190
1192
  # event.trace.post_processing_trace.model_invocation_output.parsed_response.text #=> String
1193
+ # event.trace.post_processing_trace.model_invocation_output.raw_response.content #=> String
1191
1194
  # event.trace.post_processing_trace.model_invocation_output.trace_id #=> String
1192
1195
  # event.trace.pre_processing_trace.model_invocation_input.inference_configuration.maximum_length #=> Integer
1193
1196
  # event.trace.pre_processing_trace.model_invocation_input.inference_configuration.stop_sequences #=> Array
@@ -1201,8 +1204,11 @@ module Aws::BedrockAgentRuntime
1201
1204
  # event.trace.pre_processing_trace.model_invocation_input.text #=> String
1202
1205
  # event.trace.pre_processing_trace.model_invocation_input.trace_id #=> String
1203
1206
  # event.trace.pre_processing_trace.model_invocation_input.type #=> String, one of "PRE_PROCESSING", "ORCHESTRATION", "KNOWLEDGE_BASE_RESPONSE_GENERATION", "POST_PROCESSING"
1207
+ # event.trace.pre_processing_trace.model_invocation_output.metadata.usage.input_tokens #=> Integer
1208
+ # event.trace.pre_processing_trace.model_invocation_output.metadata.usage.output_tokens #=> Integer
1204
1209
  # event.trace.pre_processing_trace.model_invocation_output.parsed_response.is_valid #=> Boolean
1205
1210
  # event.trace.pre_processing_trace.model_invocation_output.parsed_response.rationale #=> String
1211
+ # event.trace.pre_processing_trace.model_invocation_output.raw_response.content #=> String
1206
1212
  # event.trace.pre_processing_trace.model_invocation_output.trace_id #=> String
1207
1213
  #
1208
1214
  # For :validation_exception event available at #on_validation_exception_event callback and response eventstream enumerator:
@@ -1899,7 +1905,7 @@ module Aws::BedrockAgentRuntime
1899
1905
  tracer: tracer
1900
1906
  )
1901
1907
  context[:gem_name] = 'aws-sdk-bedrockagentruntime'
1902
- context[:gem_version] = '1.26.0'
1908
+ context[:gem_version] = '1.28.0'
1903
1909
  Seahorse::Client::Request.new(handlers, context)
1904
1910
  end
1905
1911
 
@@ -755,7 +755,9 @@ module Aws::BedrockAgentRuntime
755
755
  PayloadPart.add_member(:bytes, Shapes::ShapeRef.new(shape: PartBody, location_name: "bytes"))
756
756
  PayloadPart.struct_class = Types::PayloadPart
757
757
 
758
+ PostProcessingModelInvocationOutput.add_member(:metadata, Shapes::ShapeRef.new(shape: Metadata, location_name: "metadata"))
758
759
  PostProcessingModelInvocationOutput.add_member(:parsed_response, Shapes::ShapeRef.new(shape: PostProcessingParsedResponse, location_name: "parsedResponse"))
760
+ PostProcessingModelInvocationOutput.add_member(:raw_response, Shapes::ShapeRef.new(shape: RawResponse, location_name: "rawResponse"))
759
761
  PostProcessingModelInvocationOutput.add_member(:trace_id, Shapes::ShapeRef.new(shape: TraceId, location_name: "traceId"))
760
762
  PostProcessingModelInvocationOutput.struct_class = Types::PostProcessingModelInvocationOutput
761
763
 
@@ -770,7 +772,9 @@ module Aws::BedrockAgentRuntime
770
772
  PostProcessingTrace.add_member_subclass(:unknown, Types::PostProcessingTrace::Unknown)
771
773
  PostProcessingTrace.struct_class = Types::PostProcessingTrace
772
774
 
775
+ PreProcessingModelInvocationOutput.add_member(:metadata, Shapes::ShapeRef.new(shape: Metadata, location_name: "metadata"))
773
776
  PreProcessingModelInvocationOutput.add_member(:parsed_response, Shapes::ShapeRef.new(shape: PreProcessingParsedResponse, location_name: "parsedResponse"))
777
+ PreProcessingModelInvocationOutput.add_member(:raw_response, Shapes::ShapeRef.new(shape: RawResponse, location_name: "rawResponse"))
774
778
  PreProcessingModelInvocationOutput.add_member(:trace_id, Shapes::ShapeRef.new(shape: TraceId, location_name: "traceId"))
775
779
  PreProcessingModelInvocationOutput.struct_class = Types::PreProcessingModelInvocationOutput
776
780
 
@@ -52,15 +52,18 @@ module Aws::BedrockAgentRuntime
52
52
  self[:region] = options[:region]
53
53
  self[:use_dual_stack] = options[:use_dual_stack]
54
54
  self[:use_dual_stack] = false if self[:use_dual_stack].nil?
55
- if self[:use_dual_stack].nil?
56
- raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
57
- end
58
55
  self[:use_fips] = options[:use_fips]
59
56
  self[:use_fips] = false if self[:use_fips].nil?
60
- if self[:use_fips].nil?
61
- raise ArgumentError, "Missing required EndpointParameter: :use_fips"
62
- end
63
57
  self[:endpoint] = options[:endpoint]
64
58
  end
59
+
60
+ def self.create(config, options={})
61
+ new({
62
+ region: config.region,
63
+ use_dual_stack: config.use_dualstack_endpoint,
64
+ use_fips: config.use_fips_endpoint,
65
+ endpoint: (config.endpoint.to_s unless config.regional_endpoint),
66
+ }.merge(options))
67
+ end
65
68
  end
66
69
  end
@@ -12,71 +12,9 @@ module Aws::BedrockAgentRuntime
12
12
  # @api private
13
13
  module Endpoints
14
14
 
15
- class DeleteAgentMemory
16
- def self.build(context)
17
- Aws::BedrockAgentRuntime::EndpointParameters.new(
18
- region: context.config.region,
19
- use_dual_stack: context.config.use_dualstack_endpoint,
20
- use_fips: context.config.use_fips_endpoint,
21
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
22
- )
23
- end
24
- end
25
-
26
- class GetAgentMemory
27
- def self.build(context)
28
- Aws::BedrockAgentRuntime::EndpointParameters.new(
29
- region: context.config.region,
30
- use_dual_stack: context.config.use_dualstack_endpoint,
31
- use_fips: context.config.use_fips_endpoint,
32
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
33
- )
34
- end
35
- end
36
-
37
- class InvokeAgent
38
- def self.build(context)
39
- Aws::BedrockAgentRuntime::EndpointParameters.new(
40
- region: context.config.region,
41
- use_dual_stack: context.config.use_dualstack_endpoint,
42
- use_fips: context.config.use_fips_endpoint,
43
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
44
- )
45
- end
46
- end
47
15
 
48
- class InvokeFlow
49
- def self.build(context)
50
- Aws::BedrockAgentRuntime::EndpointParameters.new(
51
- region: context.config.region,
52
- use_dual_stack: context.config.use_dualstack_endpoint,
53
- use_fips: context.config.use_fips_endpoint,
54
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
55
- )
56
- end
16
+ def self.parameters_for_operation(context)
17
+ Aws::BedrockAgentRuntime::EndpointParameters.create(context.config)
57
18
  end
58
-
59
- class Retrieve
60
- def self.build(context)
61
- Aws::BedrockAgentRuntime::EndpointParameters.new(
62
- region: context.config.region,
63
- use_dual_stack: context.config.use_dualstack_endpoint,
64
- use_fips: context.config.use_fips_endpoint,
65
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
66
- )
67
- end
68
- end
69
-
70
- class RetrieveAndGenerate
71
- def self.build(context)
72
- Aws::BedrockAgentRuntime::EndpointParameters.new(
73
- region: context.config.region,
74
- use_dual_stack: context.config.use_dualstack_endpoint,
75
- use_fips: context.config.use_fips_endpoint,
76
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
77
- )
78
- end
79
- end
80
-
81
19
  end
82
20
  end
@@ -27,7 +27,7 @@ The endpoint provider used to resolve endpoints. Any object that responds to
27
27
  class Handler < Seahorse::Client::Handler
28
28
  def call(context)
29
29
  unless context[:discovered_endpoint]
30
- params = parameters_for_operation(context)
30
+ params = Aws::BedrockAgentRuntime::Endpoints.parameters_for_operation(context)
31
31
  endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
32
 
33
33
  context.http_request.endpoint = endpoint.url
@@ -67,23 +67,6 @@ The endpoint provider used to resolve endpoints. Any object that responds to
67
67
  context.http_request.headers[key] = value
68
68
  end
69
69
  end
70
-
71
- def parameters_for_operation(context)
72
- case context.operation_name
73
- when :delete_agent_memory
74
- Aws::BedrockAgentRuntime::Endpoints::DeleteAgentMemory.build(context)
75
- when :get_agent_memory
76
- Aws::BedrockAgentRuntime::Endpoints::GetAgentMemory.build(context)
77
- when :invoke_agent
78
- Aws::BedrockAgentRuntime::Endpoints::InvokeAgent.build(context)
79
- when :invoke_flow
80
- Aws::BedrockAgentRuntime::Endpoints::InvokeFlow.build(context)
81
- when :retrieve
82
- Aws::BedrockAgentRuntime::Endpoints::Retrieve.build(context)
83
- when :retrieve_and_generate
84
- Aws::BedrockAgentRuntime::Endpoints::RetrieveAndGenerate.build(context)
85
- end
86
- end
87
70
  end
88
71
 
89
72
  def add_handlers(handlers, _config)
@@ -591,21 +591,21 @@ module Aws::BedrockAgentRuntime
591
591
  end
592
592
 
593
593
  # The configurations of the external source wrapper object in the
594
- # retrieveAndGenerate function.
594
+ # `retrieveAndGenerate` function.
595
595
  #
596
596
  # @!attribute [rw] generation_configuration
597
597
  # The prompt used with the external source wrapper object with the
598
- # retrieveAndGenerate function.
598
+ # `retrieveAndGenerate` function.
599
599
  # @return [Types::ExternalSourcesGenerationConfiguration]
600
600
  #
601
601
  # @!attribute [rw] model_arn
602
- # The modelArn used with the external source wrapper object in the
603
- # retrieveAndGenerate function.
602
+ # The model Amazon Resource Name (ARN) for the external source wrapper
603
+ # object in the `retrieveAndGenerate` function.
604
604
  # @return [String]
605
605
  #
606
606
  # @!attribute [rw] sources
607
- # The document used with the external source wrapper object in the
608
- # retrieveAndGenerate function.
607
+ # The document for the external source wrapper object in the
608
+ # `retrieveAndGenerate` function.
609
609
  # @return [Array<Types::ExternalSource>]
610
610
  #
611
611
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ExternalSourcesRetrieveAndGenerateConfiguration AWS API Documentation
@@ -2457,11 +2457,19 @@ module Aws::BedrockAgentRuntime
2457
2457
 
2458
2458
  # The foundation model output from the post-processing step.
2459
2459
  #
2460
+ # @!attribute [rw] metadata
2461
+ # Provides details of the foundation model.
2462
+ # @return [Types::Metadata]
2463
+ #
2460
2464
  # @!attribute [rw] parsed_response
2461
2465
  # Details about the response from the Lambda parsing of the output of
2462
2466
  # the post-processing step.
2463
2467
  # @return [Types::PostProcessingParsedResponse]
2464
2468
  #
2469
+ # @!attribute [rw] raw_response
2470
+ # Contains the raw output from the foundation model.
2471
+ # @return [Types::RawResponse]
2472
+ #
2465
2473
  # @!attribute [rw] trace_id
2466
2474
  # The unique identifier of the trace.
2467
2475
  # @return [String]
@@ -2469,9 +2477,11 @@ module Aws::BedrockAgentRuntime
2469
2477
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PostProcessingModelInvocationOutput AWS API Documentation
2470
2478
  #
2471
2479
  class PostProcessingModelInvocationOutput < Struct.new(
2480
+ :metadata,
2472
2481
  :parsed_response,
2482
+ :raw_response,
2473
2483
  :trace_id)
2474
- SENSITIVE = [:parsed_response]
2484
+ SENSITIVE = [:metadata, :parsed_response, :raw_response]
2475
2485
  include Aws::Structure
2476
2486
  end
2477
2487
 
@@ -2532,11 +2542,19 @@ module Aws::BedrockAgentRuntime
2532
2542
 
2533
2543
  # The foundation model output from the pre-processing step.
2534
2544
  #
2545
+ # @!attribute [rw] metadata
2546
+ # Provides details of the foundation model.
2547
+ # @return [Types::Metadata]
2548
+ #
2535
2549
  # @!attribute [rw] parsed_response
2536
2550
  # Details about the response from the Lambda parsing of the output of
2537
2551
  # the pre-processing step.
2538
2552
  # @return [Types::PreProcessingParsedResponse]
2539
2553
  #
2554
+ # @!attribute [rw] raw_response
2555
+ # Contains the raw output from the foundation model.
2556
+ # @return [Types::RawResponse]
2557
+ #
2540
2558
  # @!attribute [rw] trace_id
2541
2559
  # The unique identifier of the trace.
2542
2560
  # @return [String]
@@ -2544,9 +2562,11 @@ module Aws::BedrockAgentRuntime
2544
2562
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PreProcessingModelInvocationOutput AWS API Documentation
2545
2563
  #
2546
2564
  class PreProcessingModelInvocationOutput < Struct.new(
2565
+ :metadata,
2547
2566
  :parsed_response,
2567
+ :raw_response,
2548
2568
  :trace_id)
2549
- SENSITIVE = [:parsed_response]
2569
+ SENSITIVE = [:metadata, :parsed_response, :raw_response]
2550
2570
  include Aws::Structure
2551
2571
  end
2552
2572
 
@@ -3144,16 +3164,21 @@ module Aws::BedrockAgentRuntime
3144
3164
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax
3145
3165
  #
3146
3166
  # @!attribute [rw] external_sources_configuration
3147
- # The configuration used with the external source wrapper object in
3148
- # the retrieveAndGenerate function.
3167
+ # The configuration for the external source wrapper object in the
3168
+ # `retrieveAndGenerate` function.
3149
3169
  # @return [Types::ExternalSourcesRetrieveAndGenerateConfiguration]
3150
3170
  #
3151
3171
  # @!attribute [rw] knowledge_base_configuration
3152
- # Contains details about the resource being queried.
3172
+ # Contains details about the knowledge base for retrieving information
3173
+ # and generating responses.
3153
3174
  # @return [Types::KnowledgeBaseRetrieveAndGenerateConfiguration]
3154
3175
  #
3155
3176
  # @!attribute [rw] type
3156
- # The type of resource that is queried by the request.
3177
+ # The type of resource that contains your data for retrieving
3178
+ # information and generating responses.
3179
+ #
3180
+ # If you choose ot use `EXTERNAL_SOURCES`, then currently only Claude
3181
+ # 3 Sonnet models for knowledge bases are supported.
3157
3182
  # @return [String]
3158
3183
  #
3159
3184
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveAndGenerateConfiguration AWS API Documentation
@@ -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.26.0'
58
+ GEM_VERSION = '1.28.0'
59
59
 
60
60
  end
61
61
 
data/sig/types.rbs CHANGED
@@ -622,9 +622,11 @@ module Aws::BedrockAgentRuntime
622
622
  end
623
623
 
624
624
  class PostProcessingModelInvocationOutput
625
+ attr_accessor metadata: Types::Metadata
625
626
  attr_accessor parsed_response: Types::PostProcessingParsedResponse
627
+ attr_accessor raw_response: Types::RawResponse
626
628
  attr_accessor trace_id: ::String
627
- SENSITIVE: [:parsed_response]
629
+ SENSITIVE: [:metadata, :parsed_response, :raw_response]
628
630
  end
629
631
 
630
632
  class PostProcessingParsedResponse
@@ -647,9 +649,11 @@ module Aws::BedrockAgentRuntime
647
649
  end
648
650
 
649
651
  class PreProcessingModelInvocationOutput
652
+ attr_accessor metadata: Types::Metadata
650
653
  attr_accessor parsed_response: Types::PreProcessingParsedResponse
654
+ attr_accessor raw_response: Types::RawResponse
651
655
  attr_accessor trace_id: ::String
652
- SENSITIVE: [:parsed_response]
656
+ SENSITIVE: [:metadata, :parsed_response, :raw_response]
653
657
  end
654
658
 
655
659
  class PreProcessingParsedResponse
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.26.0
4
+ version: 1.28.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-09-24 00:00:00.000000000 Z
11
+ date: 2024-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.207.0
22
+ version: 3.210.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 3.207.0
32
+ version: 3.210.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement