aws-sdk-bedrockagentruntime 1.17.0 → 1.26.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: abaf68544e2dbfc17ee7113c041a308342648320ed87eb3159f0cb178f8e4771
4
- data.tar.gz: 0c080ff885d0d86175b51b5bcf5599497564241885e2693d68706e319c176b38
3
+ metadata.gz: 125500bac53e227983f1a95df4208a701f877f6579424dd6985e23e580755c88
4
+ data.tar.gz: fc1b91f68acc8862dedd8024cfa970947f2a43d6112d8d8f6e877ba1bc5fdb06
5
5
  SHA512:
6
- metadata.gz: 3b6aeefa2b03de9bc4e66b951bab384938eab5bb61ba636c18d7e0f74baf450c1dec25edf5c6019f74ab06cc9d74f101c78155368e98be0a93acb8737552436b
7
- data.tar.gz: a754f7b176330235954dd25d4cc12ae87fdbd244a5cc33a9c87557fc4953188bb85fbb08499029c6d804f86f0b5fca09fce4c5f903e2e18a9023245414b8b4f1
6
+ metadata.gz: ab5a18eceb7a9375574fabff7a665d908f0fbe4e03b539c2d421aff8cd07ffa0e5fa913e0c93f361075faacc93565c490001281056b43d4aa5421170f7cb0329
7
+ data.tar.gz: 7d246d3302df4d49a7106821513cfda5644fdae59a07741a9045b4e45e3697eee0b597bb0bf42cbc7df78482ef65637e790574de1a00cdcdf1ea31b9f4d78c9f
data/CHANGELOG.md CHANGED
@@ -1,6 +1,51 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.26.0 (2024-09-24)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.25.0 (2024-09-23)
10
+ ------------------
11
+
12
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
13
+
14
+ 1.24.0 (2024-09-20)
15
+ ------------------
16
+
17
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
18
+
19
+ 1.23.0 (2024-09-11)
20
+ ------------------
21
+
22
+ * Feature - Amazon Bedrock Knowledge Bases now supports using inference profiles to increase throughput and improve resilience.
23
+
24
+ 1.22.0 (2024-09-10)
25
+ ------------------
26
+
27
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
28
+
29
+ 1.21.0 (2024-09-03)
30
+ ------------------
31
+
32
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
33
+
34
+ 1.20.0 (2024-08-29)
35
+ ------------------
36
+
37
+ * Feature - Lifting the maximum length on Bedrock KnowledgeBase RetrievalFilter array
38
+
39
+ 1.19.0 (2024-08-23)
40
+ ------------------
41
+
42
+ * Feature - Releasing the support for Action User Confirmation.
43
+
44
+ 1.18.0 (2024-08-06)
45
+ ------------------
46
+
47
+ * Feature - Introduce model invocation output traces for orchestration traces, which contain the model's raw response and usage.
48
+
4
49
  1.17.0 (2024-07-18)
5
50
  ------------------
6
51
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.17.0
1
+ 1.26.0
@@ -32,12 +32,11 @@ require 'aws-sdk-core/plugins/checksum_algorithm.rb'
32
32
  require 'aws-sdk-core/plugins/request_compression.rb'
33
33
  require 'aws-sdk-core/plugins/defaults_mode.rb'
34
34
  require 'aws-sdk-core/plugins/recursion_detection.rb'
35
+ require 'aws-sdk-core/plugins/telemetry.rb'
35
36
  require 'aws-sdk-core/plugins/sign.rb'
36
37
  require 'aws-sdk-core/plugins/protocols/rest_json.rb'
37
38
  require 'aws-sdk-core/plugins/event_stream_configuration.rb'
38
39
 
39
- Aws::Plugins::GlobalConfiguration.add_identifier(:bedrockagentruntime)
40
-
41
40
  module Aws::BedrockAgentRuntime
42
41
  # An API client for BedrockAgentRuntime. To construct a client, you need to configure a `:region` and `:credentials`.
43
42
  #
@@ -84,6 +83,7 @@ module Aws::BedrockAgentRuntime
84
83
  add_plugin(Aws::Plugins::RequestCompression)
85
84
  add_plugin(Aws::Plugins::DefaultsMode)
86
85
  add_plugin(Aws::Plugins::RecursionDetection)
86
+ add_plugin(Aws::Plugins::Telemetry)
87
87
  add_plugin(Aws::Plugins::Sign)
88
88
  add_plugin(Aws::Plugins::Protocols::RestJson)
89
89
  add_plugin(Aws::Plugins::EventStreamConfiguration)
@@ -130,13 +130,15 @@ module Aws::BedrockAgentRuntime
130
130
  # locations will be searched for credentials:
131
131
  #
132
132
  # * `Aws.config[:credentials]`
133
- # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
134
- # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
133
+ # * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
134
+ # `:account_id` options.
135
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'],
136
+ # ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
135
137
  # * `~/.aws/credentials`
136
138
  # * `~/.aws/config`
137
139
  # * EC2/ECS IMDS instance profile - When used by default, the timeouts
138
140
  # are very aggressive. Construct and pass an instance of
139
- # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
141
+ # `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
140
142
  # enable retries and extended timeouts. Instance profile credential
141
143
  # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
142
144
  # to true.
@@ -155,6 +157,8 @@ module Aws::BedrockAgentRuntime
155
157
  #
156
158
  # @option options [String] :access_key_id
157
159
  #
160
+ # @option options [String] :account_id
161
+ #
158
162
  # @option options [Boolean] :active_endpoint_cache (false)
159
163
  # When set to `true`, a thread polling for endpoints will be running in
160
164
  # the background every 60 secs (default). Defaults to `false`.
@@ -341,6 +345,16 @@ module Aws::BedrockAgentRuntime
341
345
  # ** Please note ** When response stubbing is enabled, no HTTP
342
346
  # requests are made, and retries are disabled.
343
347
  #
348
+ # @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
349
+ # Allows you to provide a telemetry provider, which is used to
350
+ # emit telemetry data. By default, uses `NoOpTelemetryProvider` which
351
+ # will not record or emit any telemetry data. The SDK supports the
352
+ # following telemetry providers:
353
+ #
354
+ # * OpenTelemetry (OTel) - To use the OTel provider, install and require the
355
+ # `opentelemetry-sdk` gem and then, pass in an instance of a
356
+ # `Aws::Telemetry::OTelProvider` for telemetry provider.
357
+ #
344
358
  # @option options [Aws::TokenProvider] :token_provider
345
359
  # A Bearer Token Provider. This can be an instance of any one of the
346
360
  # following classes:
@@ -368,7 +382,9 @@ module Aws::BedrockAgentRuntime
368
382
  # sending the request.
369
383
  #
370
384
  # @option options [Aws::BedrockAgentRuntime::EndpointProvider] :endpoint_provider
371
- # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::BedrockAgentRuntime::EndpointParameters`
385
+ # The endpoint provider used to resolve endpoints. Any object that responds to
386
+ # `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
387
+ # `Aws::BedrockAgentRuntime::EndpointParameters`.
372
388
  #
373
389
  # @option options [Float] :http_continue_timeout (1)
374
390
  # The number of seconds to wait for a 100-continue response before sending the
@@ -424,6 +440,12 @@ module Aws::BedrockAgentRuntime
424
440
  # @option options [String] :ssl_ca_store
425
441
  # Sets the X509::Store to verify peer certificate.
426
442
  #
443
+ # @option options [OpenSSL::X509::Certificate] :ssl_cert
444
+ # Sets a client certificate when creating http connections.
445
+ #
446
+ # @option options [OpenSSL::PKey] :ssl_key
447
+ # Sets a client key when creating http connections.
448
+ #
427
449
  # @option options [Float] :ssl_timeout
428
450
  # Sets the SSL timeout in seconds
429
451
  #
@@ -927,6 +949,7 @@ module Aws::BedrockAgentRuntime
927
949
  # api_result: {
928
950
  # action_group: "String", # required
929
951
  # api_path: "ApiPath",
952
+ # confirmation_state: "CONFIRM", # accepts CONFIRM, DENY
930
953
  # http_method: "String",
931
954
  # http_status_code: 1,
932
955
  # response_body: {
@@ -938,6 +961,7 @@ module Aws::BedrockAgentRuntime
938
961
  # },
939
962
  # function_result: {
940
963
  # action_group: "String", # required
964
+ # confirmation_state: "CONFIRM", # accepts CONFIRM, DENY
941
965
  # function: "String",
942
966
  # response_body: {
943
967
  # "String" => {
@@ -1006,6 +1030,7 @@ module Aws::BedrockAgentRuntime
1006
1030
  # event.invocation_id #=> String
1007
1031
  # event.invocation_inputs #=> Array
1008
1032
  # event.invocation_inputs[0].api_invocation_input.action_group #=> String
1033
+ # event.invocation_inputs[0].api_invocation_input.action_invocation_type #=> String, one of "RESULT", "USER_CONFIRMATION", "USER_CONFIRMATION_AND_RESULT"
1009
1034
  # event.invocation_inputs[0].api_invocation_input.api_path #=> String
1010
1035
  # event.invocation_inputs[0].api_invocation_input.http_method #=> String
1011
1036
  # event.invocation_inputs[0].api_invocation_input.parameters #=> Array
@@ -1018,6 +1043,7 @@ module Aws::BedrockAgentRuntime
1018
1043
  # event.invocation_inputs[0].api_invocation_input.request_body.content["String"].properties[0].type #=> String
1019
1044
  # event.invocation_inputs[0].api_invocation_input.request_body.content["String"].properties[0].value #=> String
1020
1045
  # event.invocation_inputs[0].function_invocation_input.action_group #=> String
1046
+ # event.invocation_inputs[0].function_invocation_input.action_invocation_type #=> String, one of "RESULT", "USER_CONFIRMATION", "USER_CONFIRMATION_AND_RESULT"
1021
1047
  # event.invocation_inputs[0].function_invocation_input.function #=> String
1022
1048
  # event.invocation_inputs[0].function_invocation_input.parameters #=> Array
1023
1049
  # event.invocation_inputs[0].function_invocation_input.parameters[0].name #=> String
@@ -1123,6 +1149,10 @@ module Aws::BedrockAgentRuntime
1123
1149
  # event.trace.orchestration_trace.model_invocation_input.text #=> String
1124
1150
  # event.trace.orchestration_trace.model_invocation_input.trace_id #=> String
1125
1151
  # event.trace.orchestration_trace.model_invocation_input.type #=> String, one of "PRE_PROCESSING", "ORCHESTRATION", "KNOWLEDGE_BASE_RESPONSE_GENERATION", "POST_PROCESSING"
1152
+ # event.trace.orchestration_trace.model_invocation_output.metadata.usage.input_tokens #=> Integer
1153
+ # event.trace.orchestration_trace.model_invocation_output.metadata.usage.output_tokens #=> Integer
1154
+ # event.trace.orchestration_trace.model_invocation_output.raw_response.content #=> String
1155
+ # event.trace.orchestration_trace.model_invocation_output.trace_id #=> String
1126
1156
  # event.trace.orchestration_trace.observation.action_group_invocation_output.text #=> String
1127
1157
  # event.trace.orchestration_trace.observation.code_interpreter_invocation_output.execution_error #=> String
1128
1158
  # event.trace.orchestration_trace.observation.code_interpreter_invocation_output.execution_output #=> String
@@ -1214,6 +1244,11 @@ module Aws::BedrockAgentRuntime
1214
1244
  # error is returned. For more information, see [Test a flow in Amazon
1215
1245
  # Bedrock][1] in the Amazon Bedrock User Guide.
1216
1246
  #
1247
+ # <note markdown="1"> The CLI doesn't support streaming operations in Amazon Bedrock,
1248
+ # including `InvokeFlow`.
1249
+ #
1250
+ # </note>
1251
+ #
1217
1252
  #
1218
1253
  #
1219
1254
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/flows-test.html
@@ -1626,8 +1661,13 @@ module Aws::BedrockAgentRuntime
1626
1661
  end
1627
1662
 
1628
1663
  # Queries a knowledge base and generates responses based on the
1629
- # retrieved results. The response only cites sources that are relevant
1630
- # to the query.
1664
+ # retrieved results and using the specified foundation model or
1665
+ # [inference profile][1]. The response only cites sources that are
1666
+ # relevant to the query.
1667
+ #
1668
+ #
1669
+ #
1670
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html
1631
1671
  #
1632
1672
  # @option params [required, Types::RetrieveAndGenerateInput] :input
1633
1673
  # Contains the query to be made to the knowledge base.
@@ -1847,14 +1887,19 @@ module Aws::BedrockAgentRuntime
1847
1887
  # @api private
1848
1888
  def build_request(operation_name, params = {})
1849
1889
  handlers = @handlers.for(operation_name)
1890
+ tracer = config.telemetry_provider.tracer_provider.tracer(
1891
+ Aws::Telemetry.module_to_tracer_name('Aws::BedrockAgentRuntime')
1892
+ )
1850
1893
  context = Seahorse::Client::RequestContext.new(
1851
1894
  operation_name: operation_name,
1852
1895
  operation: config.api.operation(operation_name),
1853
1896
  client: self,
1854
1897
  params: params,
1855
- config: config)
1898
+ config: config,
1899
+ tracer: tracer
1900
+ )
1856
1901
  context[:gem_name] = 'aws-sdk-bedrockagentruntime'
1857
- context[:gem_version] = '1.17.0'
1902
+ context[:gem_version] = '1.26.0'
1858
1903
  Seahorse::Client::Request.new(handlers, context)
1859
1904
  end
1860
1905
 
@@ -7,6 +7,7 @@
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
10
+
10
11
  module Aws::BedrockAgentRuntime
11
12
  # @api private
12
13
  module ClientApi
@@ -18,6 +19,7 @@ module Aws::BedrockAgentRuntime
18
19
  ActionGroupInvocationOutput = Shapes::StructureShape.new(name: 'ActionGroupInvocationOutput')
19
20
  ActionGroupName = Shapes::StringShape.new(name: 'ActionGroupName')
20
21
  ActionGroupOutputString = Shapes::StringShape.new(name: 'ActionGroupOutputString')
22
+ ActionInvocationType = Shapes::StringShape.new(name: 'ActionInvocationType')
21
23
  AdditionalModelRequestFields = Shapes::MapShape.new(name: 'AdditionalModelRequestFields')
22
24
  AdditionalModelRequestFieldsKey = Shapes::StringShape.new(name: 'AdditionalModelRequestFieldsKey')
23
25
  AdditionalModelRequestFieldsValue = Shapes::DocumentShape.new(name: 'AdditionalModelRequestFieldsValue', document: true)
@@ -42,6 +44,7 @@ module Aws::BedrockAgentRuntime
42
44
  Citations = Shapes::ListShape.new(name: 'Citations')
43
45
  CodeInterpreterInvocationInput = Shapes::StructureShape.new(name: 'CodeInterpreterInvocationInput')
44
46
  CodeInterpreterInvocationOutput = Shapes::StructureShape.new(name: 'CodeInterpreterInvocationOutput')
47
+ ConfirmationState = Shapes::StringShape.new(name: 'ConfirmationState')
45
48
  ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
46
49
  ContentBody = Shapes::StructureShape.new(name: 'ContentBody')
47
50
  ContentMap = Shapes::MapShape.new(name: 'ContentMap')
@@ -165,6 +168,7 @@ module Aws::BedrockAgentRuntime
165
168
  MemoryId = Shapes::StringShape.new(name: 'MemoryId')
166
169
  MemorySessionSummary = Shapes::StructureShape.new(name: 'MemorySessionSummary')
167
170
  MemoryType = Shapes::StringShape.new(name: 'MemoryType')
171
+ Metadata = Shapes::StructureShape.new(name: 'Metadata')
168
172
  MimeType = Shapes::StringShape.new(name: 'MimeType')
169
173
  ModelInvocationInput = Shapes::StructureShape.new(name: 'ModelInvocationInput')
170
174
  NextToken = Shapes::StringShape.new(name: 'NextToken')
@@ -174,6 +178,7 @@ module Aws::BedrockAgentRuntime
174
178
  NonBlankString = Shapes::StringShape.new(name: 'NonBlankString')
175
179
  Observation = Shapes::StructureShape.new(name: 'Observation')
176
180
  OrchestrationConfiguration = Shapes::StructureShape.new(name: 'OrchestrationConfiguration')
181
+ OrchestrationModelInvocationOutput = Shapes::StructureShape.new(name: 'OrchestrationModelInvocationOutput')
177
182
  OrchestrationTrace = Shapes::UnionShape.new(name: 'OrchestrationTrace')
178
183
  OutputFile = Shapes::StructureShape.new(name: 'OutputFile')
179
184
  OutputFiles = Shapes::ListShape.new(name: 'OutputFiles')
@@ -200,6 +205,7 @@ module Aws::BedrockAgentRuntime
200
205
  RAGStopSequencesMemberString = Shapes::StringShape.new(name: 'RAGStopSequencesMemberString')
201
206
  Rationale = Shapes::StructureShape.new(name: 'Rationale')
202
207
  RationaleString = Shapes::StringShape.new(name: 'RationaleString')
208
+ RawResponse = Shapes::StructureShape.new(name: 'RawResponse')
203
209
  RepromptResponse = Shapes::StructureShape.new(name: 'RepromptResponse')
204
210
  RequestBody = Shapes::StructureShape.new(name: 'RequestBody')
205
211
  ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
@@ -260,6 +266,7 @@ module Aws::BedrockAgentRuntime
260
266
  TraceKnowledgeBaseId = Shapes::StringShape.new(name: 'TraceKnowledgeBaseId')
261
267
  TracePart = Shapes::StructureShape.new(name: 'TracePart')
262
268
  Type = Shapes::StringShape.new(name: 'Type')
269
+ Usage = Shapes::StructureShape.new(name: 'Usage')
263
270
  ValidationException = Shapes::StructureShape.new(name: 'ValidationException')
264
271
  Verb = Shapes::StringShape.new(name: 'Verb')
265
272
 
@@ -286,6 +293,7 @@ module Aws::BedrockAgentRuntime
286
293
  ApiContentMap.value = Shapes::ShapeRef.new(shape: PropertyParameters)
287
294
 
288
295
  ApiInvocationInput.add_member(:action_group, Shapes::ShapeRef.new(shape: String, required: true, location_name: "actionGroup"))
296
+ ApiInvocationInput.add_member(:action_invocation_type, Shapes::ShapeRef.new(shape: ActionInvocationType, location_name: "actionInvocationType"))
289
297
  ApiInvocationInput.add_member(:api_path, Shapes::ShapeRef.new(shape: ApiPath, location_name: "apiPath"))
290
298
  ApiInvocationInput.add_member(:http_method, Shapes::ShapeRef.new(shape: String, location_name: "httpMethod"))
291
299
  ApiInvocationInput.add_member(:parameters, Shapes::ShapeRef.new(shape: ApiParameters, location_name: "parameters"))
@@ -304,6 +312,7 @@ module Aws::BedrockAgentRuntime
304
312
 
305
313
  ApiResult.add_member(:action_group, Shapes::ShapeRef.new(shape: String, required: true, location_name: "actionGroup"))
306
314
  ApiResult.add_member(:api_path, Shapes::ShapeRef.new(shape: ApiPath, location_name: "apiPath"))
315
+ ApiResult.add_member(:confirmation_state, Shapes::ShapeRef.new(shape: ConfirmationState, location_name: "confirmationState"))
307
316
  ApiResult.add_member(:http_method, Shapes::ShapeRef.new(shape: String, location_name: "httpMethod"))
308
317
  ApiResult.add_member(:http_status_code, Shapes::ShapeRef.new(shape: Integer, location_name: "httpStatusCode"))
309
318
  ApiResult.add_member(:response_body, Shapes::ShapeRef.new(shape: ResponseBody, location_name: "responseBody"))
@@ -442,6 +451,7 @@ module Aws::BedrockAgentRuntime
442
451
  FlowResponseStream.struct_class = Types::FlowResponseStream
443
452
 
444
453
  FunctionInvocationInput.add_member(:action_group, Shapes::ShapeRef.new(shape: String, required: true, location_name: "actionGroup"))
454
+ FunctionInvocationInput.add_member(:action_invocation_type, Shapes::ShapeRef.new(shape: ActionInvocationType, location_name: "actionInvocationType"))
445
455
  FunctionInvocationInput.add_member(:function, Shapes::ShapeRef.new(shape: String, location_name: "function"))
446
456
  FunctionInvocationInput.add_member(:parameters, Shapes::ShapeRef.new(shape: FunctionParameters, location_name: "parameters"))
447
457
  FunctionInvocationInput.struct_class = Types::FunctionInvocationInput
@@ -454,6 +464,7 @@ module Aws::BedrockAgentRuntime
454
464
  FunctionParameters.member = Shapes::ShapeRef.new(shape: FunctionParameter)
455
465
 
456
466
  FunctionResult.add_member(:action_group, Shapes::ShapeRef.new(shape: String, required: true, location_name: "actionGroup"))
467
+ FunctionResult.add_member(:confirmation_state, Shapes::ShapeRef.new(shape: ConfirmationState, location_name: "confirmationState"))
457
468
  FunctionResult.add_member(:function, Shapes::ShapeRef.new(shape: String, location_name: "function"))
458
469
  FunctionResult.add_member(:response_body, Shapes::ShapeRef.new(shape: ResponseBody, location_name: "responseBody"))
459
470
  FunctionResult.add_member(:response_state, Shapes::ShapeRef.new(shape: ResponseState, location_name: "responseState"))
@@ -681,6 +692,9 @@ module Aws::BedrockAgentRuntime
681
692
  MemorySessionSummary.add_member(:summary_text, Shapes::ShapeRef.new(shape: SummaryText, location_name: "summaryText"))
682
693
  MemorySessionSummary.struct_class = Types::MemorySessionSummary
683
694
 
695
+ Metadata.add_member(:usage, Shapes::ShapeRef.new(shape: Usage, location_name: "usage"))
696
+ Metadata.struct_class = Types::Metadata
697
+
684
698
  ModelInvocationInput.add_member(:inference_configuration, Shapes::ShapeRef.new(shape: InferenceConfiguration, location_name: "inferenceConfiguration"))
685
699
  ModelInvocationInput.add_member(:override_lambda, Shapes::ShapeRef.new(shape: LambdaArn, location_name: "overrideLambda"))
686
700
  ModelInvocationInput.add_member(:parser_mode, Shapes::ShapeRef.new(shape: CreationMode, location_name: "parserMode"))
@@ -702,13 +716,20 @@ module Aws::BedrockAgentRuntime
702
716
  OrchestrationConfiguration.add_member(:query_transformation_configuration, Shapes::ShapeRef.new(shape: QueryTransformationConfiguration, required: true, location_name: "queryTransformationConfiguration"))
703
717
  OrchestrationConfiguration.struct_class = Types::OrchestrationConfiguration
704
718
 
719
+ OrchestrationModelInvocationOutput.add_member(:metadata, Shapes::ShapeRef.new(shape: Metadata, location_name: "metadata"))
720
+ OrchestrationModelInvocationOutput.add_member(:raw_response, Shapes::ShapeRef.new(shape: RawResponse, location_name: "rawResponse"))
721
+ OrchestrationModelInvocationOutput.add_member(:trace_id, Shapes::ShapeRef.new(shape: TraceId, location_name: "traceId"))
722
+ OrchestrationModelInvocationOutput.struct_class = Types::OrchestrationModelInvocationOutput
723
+
705
724
  OrchestrationTrace.add_member(:invocation_input, Shapes::ShapeRef.new(shape: InvocationInput, location_name: "invocationInput"))
706
725
  OrchestrationTrace.add_member(:model_invocation_input, Shapes::ShapeRef.new(shape: ModelInvocationInput, location_name: "modelInvocationInput"))
726
+ OrchestrationTrace.add_member(:model_invocation_output, Shapes::ShapeRef.new(shape: OrchestrationModelInvocationOutput, location_name: "modelInvocationOutput"))
707
727
  OrchestrationTrace.add_member(:observation, Shapes::ShapeRef.new(shape: Observation, location_name: "observation"))
708
728
  OrchestrationTrace.add_member(:rationale, Shapes::ShapeRef.new(shape: Rationale, location_name: "rationale"))
709
729
  OrchestrationTrace.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
710
730
  OrchestrationTrace.add_member_subclass(:invocation_input, Types::OrchestrationTrace::InvocationInput)
711
731
  OrchestrationTrace.add_member_subclass(:model_invocation_input, Types::OrchestrationTrace::ModelInvocationInput)
732
+ OrchestrationTrace.add_member_subclass(:model_invocation_output, Types::OrchestrationTrace::ModelInvocationOutput)
712
733
  OrchestrationTrace.add_member_subclass(:observation, Types::OrchestrationTrace::Observation)
713
734
  OrchestrationTrace.add_member_subclass(:rationale, Types::OrchestrationTrace::Rationale)
714
735
  OrchestrationTrace.add_member_subclass(:unknown, Types::OrchestrationTrace::Unknown)
@@ -783,6 +804,9 @@ module Aws::BedrockAgentRuntime
783
804
  Rationale.add_member(:trace_id, Shapes::ShapeRef.new(shape: TraceId, location_name: "traceId"))
784
805
  Rationale.struct_class = Types::Rationale
785
806
 
807
+ RawResponse.add_member(:content, Shapes::ShapeRef.new(shape: String, location_name: "content"))
808
+ RawResponse.struct_class = Types::RawResponse
809
+
786
810
  RepromptResponse.add_member(:source, Shapes::ShapeRef.new(shape: Source, location_name: "source"))
787
811
  RepromptResponse.add_member(:text, Shapes::ShapeRef.new(shape: String, location_name: "text"))
788
812
  RepromptResponse.struct_class = Types::RepromptResponse
@@ -981,6 +1005,10 @@ module Aws::BedrockAgentRuntime
981
1005
  TracePart.add_member(:trace, Shapes::ShapeRef.new(shape: Trace, location_name: "trace"))
982
1006
  TracePart.struct_class = Types::TracePart
983
1007
 
1008
+ Usage.add_member(:input_tokens, Shapes::ShapeRef.new(shape: Integer, location_name: "inputTokens"))
1009
+ Usage.add_member(:output_tokens, Shapes::ShapeRef.new(shape: Integer, location_name: "outputTokens"))
1010
+ Usage.struct_class = Types::Usage
1011
+
984
1012
  ValidationException.add_member(:message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "message"))
985
1013
  ValidationException.struct_class = Types::ValidationException
986
1014
 
@@ -992,9 +1020,11 @@ module Aws::BedrockAgentRuntime
992
1020
 
993
1021
  api.metadata = {
994
1022
  "apiVersion" => "2023-07-26",
1023
+ "auth" => ["aws.auth#sigv4"],
995
1024
  "endpointPrefix" => "bedrock-agent-runtime",
996
1025
  "jsonVersion" => "1.1",
997
1026
  "protocol" => "rest-json",
1027
+ "protocols" => ["rest-json"],
998
1028
  "serviceFullName" => "Agents for Amazon Bedrock Runtime",
999
1029
  "serviceId" => "Bedrock Agent Runtime",
1000
1030
  "signatureVersion" => "v4",
@@ -14,84 +14,66 @@ module Aws::BedrockAgentRuntime
14
14
 
15
15
  class DeleteAgentMemory
16
16
  def self.build(context)
17
- unless context.config.regional_endpoint
18
- endpoint = context.config.endpoint.to_s
19
- end
20
17
  Aws::BedrockAgentRuntime::EndpointParameters.new(
21
18
  region: context.config.region,
22
19
  use_dual_stack: context.config.use_dualstack_endpoint,
23
20
  use_fips: context.config.use_fips_endpoint,
24
- endpoint: endpoint,
21
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
25
22
  )
26
23
  end
27
24
  end
28
25
 
29
26
  class GetAgentMemory
30
27
  def self.build(context)
31
- unless context.config.regional_endpoint
32
- endpoint = context.config.endpoint.to_s
33
- end
34
28
  Aws::BedrockAgentRuntime::EndpointParameters.new(
35
29
  region: context.config.region,
36
30
  use_dual_stack: context.config.use_dualstack_endpoint,
37
31
  use_fips: context.config.use_fips_endpoint,
38
- endpoint: endpoint,
32
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
39
33
  )
40
34
  end
41
35
  end
42
36
 
43
37
  class InvokeAgent
44
38
  def self.build(context)
45
- unless context.config.regional_endpoint
46
- endpoint = context.config.endpoint.to_s
47
- end
48
39
  Aws::BedrockAgentRuntime::EndpointParameters.new(
49
40
  region: context.config.region,
50
41
  use_dual_stack: context.config.use_dualstack_endpoint,
51
42
  use_fips: context.config.use_fips_endpoint,
52
- endpoint: endpoint,
43
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
53
44
  )
54
45
  end
55
46
  end
56
47
 
57
48
  class InvokeFlow
58
49
  def self.build(context)
59
- unless context.config.regional_endpoint
60
- endpoint = context.config.endpoint.to_s
61
- end
62
50
  Aws::BedrockAgentRuntime::EndpointParameters.new(
63
51
  region: context.config.region,
64
52
  use_dual_stack: context.config.use_dualstack_endpoint,
65
53
  use_fips: context.config.use_fips_endpoint,
66
- endpoint: endpoint,
54
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
67
55
  )
68
56
  end
69
57
  end
70
58
 
71
59
  class Retrieve
72
60
  def self.build(context)
73
- unless context.config.regional_endpoint
74
- endpoint = context.config.endpoint.to_s
75
- end
76
61
  Aws::BedrockAgentRuntime::EndpointParameters.new(
77
62
  region: context.config.region,
78
63
  use_dual_stack: context.config.use_dualstack_endpoint,
79
64
  use_fips: context.config.use_fips_endpoint,
80
- endpoint: endpoint,
65
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
81
66
  )
82
67
  end
83
68
  end
84
69
 
85
70
  class RetrieveAndGenerate
86
71
  def self.build(context)
87
- unless context.config.regional_endpoint
88
- endpoint = context.config.endpoint.to_s
89
- end
90
72
  Aws::BedrockAgentRuntime::EndpointParameters.new(
91
73
  region: context.config.region,
92
74
  use_dual_stack: context.config.use_dualstack_endpoint,
93
75
  use_fips: context.config.use_fips_endpoint,
94
- endpoint: endpoint,
76
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
95
77
  )
96
78
  end
97
79
  end
@@ -15,11 +15,11 @@ module Aws::BedrockAgentRuntime
15
15
  :endpoint_provider,
16
16
  doc_type: 'Aws::BedrockAgentRuntime::EndpointProvider',
17
17
  rbs_type: 'untyped',
18
- docstring: 'The endpoint provider used to resolve endpoints. Any '\
19
- 'object that responds to `#resolve_endpoint(parameters)` '\
20
- 'where `parameters` is a Struct similar to '\
21
- '`Aws::BedrockAgentRuntime::EndpointParameters`'
22
- ) do |cfg|
18
+ docstring: <<~DOCS) do |_cfg|
19
+ The endpoint provider used to resolve endpoints. Any object that responds to
20
+ `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
21
+ `Aws::BedrockAgentRuntime::EndpointParameters`.
22
+ DOCS
23
23
  Aws::BedrockAgentRuntime::EndpointProvider.new
24
24
  end
25
25
 
@@ -40,11 +40,23 @@ module Aws::BedrockAgentRuntime
40
40
  context[:auth_scheme] =
41
41
  Aws::Endpoints.resolve_auth_scheme(context, endpoint)
42
42
 
43
- @handler.call(context)
43
+ with_metrics(context) { @handler.call(context) }
44
44
  end
45
45
 
46
46
  private
47
47
 
48
+ def with_metrics(context, &block)
49
+ metrics = []
50
+ metrics << 'ENDPOINT_OVERRIDE' unless context.config.regional_endpoint
51
+ if context[:auth_scheme] && context[:auth_scheme]['name'] == 'sigv4a'
52
+ metrics << 'SIGV4A_SIGNING'
53
+ end
54
+ if context.config.credentials&.credentials&.account_id
55
+ metrics << 'RESOLVED_ACCOUNT_ID'
56
+ end
57
+ Aws::Plugins::UserAgent.metric(*metrics, &block)
58
+ end
59
+
48
60
  def apply_endpoint_headers(context, headers)
49
61
  headers.each do |key, values|
50
62
  value = values
@@ -119,6 +119,10 @@ module Aws::BedrockAgentRuntime
119
119
  # The action group that the API operation belongs to.
120
120
  # @return [String]
121
121
  #
122
+ # @!attribute [rw] action_invocation_type
123
+ # Contains information about the API operation to invoke.
124
+ # @return [String]
125
+ #
122
126
  # @!attribute [rw] api_path
123
127
  # The path to the API operation.
124
128
  # @return [String]
@@ -141,6 +145,7 @@ module Aws::BedrockAgentRuntime
141
145
  #
142
146
  class ApiInvocationInput < Struct.new(
143
147
  :action_group,
148
+ :action_invocation_type,
144
149
  :api_path,
145
150
  :http_method,
146
151
  :parameters,
@@ -231,6 +236,11 @@ module Aws::BedrockAgentRuntime
231
236
  # The path to the API operation.
232
237
  # @return [String]
233
238
  #
239
+ # @!attribute [rw] confirmation_state
240
+ # Controls the API operations or functions to invoke based on the user
241
+ # confirmation.
242
+ # @return [String]
243
+ #
234
244
  # @!attribute [rw] http_method
235
245
  # The HTTP method for the API operation.
236
246
  # @return [String]
@@ -259,6 +269,7 @@ module Aws::BedrockAgentRuntime
259
269
  class ApiResult < Struct.new(
260
270
  :action_group,
261
271
  :api_path,
272
+ :confirmation_state,
262
273
  :http_method,
263
274
  :http_status_code,
264
275
  :response_body,
@@ -332,9 +343,8 @@ module Aws::BedrockAgentRuntime
332
343
  # attributes.
333
344
  #
334
345
  # @!attribute [rw] data
335
- # The byte value of the file to attach, encoded as Base-64 string. The
336
- # maximum size of all files that is attached is 10MB. You can attach a
337
- # maximum of 5 files.
346
+ # The raw bytes of the file to attach. The maximum size of all files
347
+ # that is attached is 10MB. You can attach a maximum of 5 files.
338
348
  # @return [String]
339
349
  #
340
350
  # @!attribute [rw] media_type
@@ -738,8 +748,8 @@ module Aws::BedrockAgentRuntime
738
748
  include Aws::Structure
739
749
  end
740
750
 
741
- # Contains information about an input into the flow and what to do with
742
- # it.
751
+ # Contains information about an input into the prompt flow and where to
752
+ # send it.
743
753
  #
744
754
  # This data type is used in the following API operations:
745
755
  #
@@ -752,15 +762,16 @@ module Aws::BedrockAgentRuntime
752
762
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeFlow.html#API_agent_InvokeFlow_RequestSyntax
753
763
  #
754
764
  # @!attribute [rw] content
755
- # Contains information about an input into the flow.
765
+ # Contains information about an input into the prompt flow.
756
766
  # @return [Types::FlowInputContent]
757
767
  #
758
768
  # @!attribute [rw] node_name
759
- # A name for the input of the flow input node.
769
+ # The name of the flow input node that begins the prompt flow.
760
770
  # @return [String]
761
771
  #
762
772
  # @!attribute [rw] node_output_name
763
- # A name for the output of the flow input node.
773
+ # The name of the output from the flow input node that begins the
774
+ # prompt flow.
764
775
  # @return [String]
765
776
  #
766
777
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FlowInput AWS API Documentation
@@ -788,7 +799,7 @@ module Aws::BedrockAgentRuntime
788
799
  # @note FlowInputContent is a union - when making an API calls you must set exactly one of the members.
789
800
  #
790
801
  # @!attribute [rw] document
791
- # The input for the flow input node.
802
+ # The input to send to the prompt flow input node.
792
803
  # @return [Hash,Array,String,Numeric,Boolean]
793
804
  #
794
805
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FlowInputContent AWS API Documentation
@@ -804,7 +815,8 @@ module Aws::BedrockAgentRuntime
804
815
  class Unknown < FlowInputContent; end
805
816
  end
806
817
 
807
- # Contains information about the output node.
818
+ # Contains information about the content in an output from prompt flow
819
+ # invocation.
808
820
  #
809
821
  # This data type is used in the following API operations:
810
822
  #
@@ -819,7 +831,7 @@ module Aws::BedrockAgentRuntime
819
831
  # @note FlowOutputContent is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of FlowOutputContent corresponding to the set member.
820
832
  #
821
833
  # @!attribute [rw] document
822
- # A name for the output of the flow.
834
+ # The content in the output.
823
835
  # @return [Hash,Array,String,Numeric,Boolean]
824
836
  #
825
837
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FlowOutputContent AWS API Documentation
@@ -835,7 +847,7 @@ module Aws::BedrockAgentRuntime
835
847
  class Unknown < FlowOutputContent; end
836
848
  end
837
849
 
838
- # Contains information about an output from flow invoction.
850
+ # Contains information about an output from prompt flow invoction.
839
851
  #
840
852
  # This data type is used in the following API operations:
841
853
  #
@@ -848,15 +860,15 @@ module Aws::BedrockAgentRuntime
848
860
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeFlow.html#API_agent_InvokeFlow_ResponseSyntax
849
861
  #
850
862
  # @!attribute [rw] content
851
- # The output of the node.
863
+ # The content in the output.
852
864
  # @return [Types::FlowOutputContent]
853
865
  #
854
866
  # @!attribute [rw] node_name
855
- # The name of the node to which input was provided.
867
+ # The name of the flow output node that the output is from.
856
868
  # @return [String]
857
869
  #
858
870
  # @!attribute [rw] node_type
859
- # The type of node to which input was provided.
871
+ # The type of the node that the output is from.
860
872
  # @return [String]
861
873
  #
862
874
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FlowOutputEvent AWS API Documentation
@@ -887,6 +899,10 @@ module Aws::BedrockAgentRuntime
887
899
  # The action group that the function belongs to.
888
900
  # @return [String]
889
901
  #
902
+ # @!attribute [rw] action_invocation_type
903
+ # Contains information about the function to invoke,
904
+ # @return [String]
905
+ #
890
906
  # @!attribute [rw] function
891
907
  # The name of the function.
892
908
  # @return [String]
@@ -899,6 +915,7 @@ module Aws::BedrockAgentRuntime
899
915
  #
900
916
  class FunctionInvocationInput < Struct.new(
901
917
  :action_group,
918
+ :action_invocation_type,
902
919
  :function,
903
920
  :parameters)
904
921
  SENSITIVE = []
@@ -957,6 +974,11 @@ module Aws::BedrockAgentRuntime
957
974
  # The action group that the function belongs to.
958
975
  # @return [String]
959
976
  #
977
+ # @!attribute [rw] confirmation_state
978
+ # Contains the user confirmation information about the function that
979
+ # was called.
980
+ # @return [String]
981
+ #
960
982
  # @!attribute [rw] function
961
983
  # The name of the function that was called.
962
984
  # @return [String]
@@ -980,6 +1002,7 @@ module Aws::BedrockAgentRuntime
980
1002
  #
981
1003
  class FunctionResult < Struct.new(
982
1004
  :action_group,
1005
+ :confirmation_state,
983
1006
  :function,
984
1007
  :response_body,
985
1008
  :response_state)
@@ -1472,7 +1495,7 @@ module Aws::BedrockAgentRuntime
1472
1495
  # the following token at each point of generation. The value that you
1473
1496
  # set for `Top P` determines the number of most-likely candidates from
1474
1497
  # which the model chooses the next token in the sequence. For example,
1475
- # if you set `topP` to 80, the model only selects the next token from
1498
+ # if you set `topP` to 0.8, the model only selects the next token from
1476
1499
  # the top 80% of the probability distribution of next tokens.
1477
1500
  # @return [Float]
1478
1501
  #
@@ -1962,12 +1985,16 @@ module Aws::BedrockAgentRuntime
1962
1985
  # @return [Types::GenerationConfiguration]
1963
1986
  #
1964
1987
  # @!attribute [rw] knowledge_base_id
1965
- # The unique identifier of the knowledge base that is queried and the
1966
- # foundation model used for generation.
1988
+ # The unique identifier of the knowledge base that is queried.
1967
1989
  # @return [String]
1968
1990
  #
1969
1991
  # @!attribute [rw] model_arn
1970
- # The ARN of the foundation model used to generate a response.
1992
+ # The ARN of the foundation model or [inference profile][1] used to
1993
+ # generate a response.
1994
+ #
1995
+ #
1996
+ #
1997
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html
1971
1998
  # @return [String]
1972
1999
  #
1973
2000
  # @!attribute [rw] orchestration_configuration
@@ -2103,6 +2130,20 @@ module Aws::BedrockAgentRuntime
2103
2130
  include Aws::Structure
2104
2131
  end
2105
2132
 
2133
+ # Provides details of the foundation model.
2134
+ #
2135
+ # @!attribute [rw] usage
2136
+ # Contains details of the foundation model usage.
2137
+ # @return [Types::Usage]
2138
+ #
2139
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/Metadata AWS API Documentation
2140
+ #
2141
+ class Metadata < Struct.new(
2142
+ :usage)
2143
+ SENSITIVE = [:usage]
2144
+ include Aws::Structure
2145
+ end
2146
+
2106
2147
  # The input for the pre-processing step.
2107
2148
  #
2108
2149
  # * The `type` matches the agent step.
@@ -2256,6 +2297,31 @@ module Aws::BedrockAgentRuntime
2256
2297
  include Aws::Structure
2257
2298
  end
2258
2299
 
2300
+ # The foundation model output from the orchestration step.
2301
+ #
2302
+ # @!attribute [rw] metadata
2303
+ # Contains information about the foundation model output.
2304
+ # @return [Types::Metadata]
2305
+ #
2306
+ # @!attribute [rw] raw_response
2307
+ # Contains details of the raw response from the foundation model
2308
+ # output.
2309
+ # @return [Types::RawResponse]
2310
+ #
2311
+ # @!attribute [rw] trace_id
2312
+ # The unique identifier of the trace.
2313
+ # @return [String]
2314
+ #
2315
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/OrchestrationModelInvocationOutput AWS API Documentation
2316
+ #
2317
+ class OrchestrationModelInvocationOutput < Struct.new(
2318
+ :metadata,
2319
+ :raw_response,
2320
+ :trace_id)
2321
+ SENSITIVE = [:metadata, :raw_response]
2322
+ include Aws::Structure
2323
+ end
2324
+
2259
2325
  # Details about the orchestration step, in which the agent determines
2260
2326
  # the order in which actions are executed and which knowledge bases are
2261
2327
  # retrieved.
@@ -2283,6 +2349,11 @@ module Aws::BedrockAgentRuntime
2283
2349
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html
2284
2350
  # @return [Types::ModelInvocationInput]
2285
2351
  #
2352
+ # @!attribute [rw] model_invocation_output
2353
+ # Contains information pertaining to the output from the foundation
2354
+ # model that is being invoked.
2355
+ # @return [Types::OrchestrationModelInvocationOutput]
2356
+ #
2286
2357
  # @!attribute [rw] observation
2287
2358
  # Details about the observation (the output of the action group Lambda
2288
2359
  # or knowledge base) made by the agent.
@@ -2299,15 +2370,17 @@ module Aws::BedrockAgentRuntime
2299
2370
  class OrchestrationTrace < Struct.new(
2300
2371
  :invocation_input,
2301
2372
  :model_invocation_input,
2373
+ :model_invocation_output,
2302
2374
  :observation,
2303
2375
  :rationale,
2304
2376
  :unknown)
2305
- SENSITIVE = [:invocation_input, :model_invocation_input, :observation, :rationale]
2377
+ SENSITIVE = [:invocation_input, :model_invocation_input, :model_invocation_output, :observation, :rationale]
2306
2378
  include Aws::Structure
2307
2379
  include Aws::Structure::Union
2308
2380
 
2309
2381
  class InvocationInput < OrchestrationTrace; end
2310
2382
  class ModelInvocationInput < OrchestrationTrace; end
2383
+ class ModelInvocationOutput < OrchestrationTrace; end
2311
2384
  class Observation < OrchestrationTrace; end
2312
2385
  class Rationale < OrchestrationTrace; end
2313
2386
  class Unknown < OrchestrationTrace; end
@@ -2632,6 +2705,20 @@ module Aws::BedrockAgentRuntime
2632
2705
  include Aws::Structure
2633
2706
  end
2634
2707
 
2708
+ # Contains the raw output from the foundation model.
2709
+ #
2710
+ # @!attribute [rw] content
2711
+ # The foundation model's raw output content.
2712
+ # @return [String]
2713
+ #
2714
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RawResponse AWS API Documentation
2715
+ #
2716
+ class RawResponse < Struct.new(
2717
+ :content)
2718
+ SENSITIVE = []
2719
+ include Aws::Structure
2720
+ end
2721
+
2635
2722
  # Contains details about the agent's response to reprompt the input.
2636
2723
  #
2637
2724
  # @!attribute [rw] source
@@ -3715,6 +3802,27 @@ module Aws::BedrockAgentRuntime
3715
3802
  include Aws::Structure
3716
3803
  end
3717
3804
 
3805
+ # Contains information of the usage of the foundation model.
3806
+ #
3807
+ # @!attribute [rw] input_tokens
3808
+ # Contains information about the input tokens from the foundation
3809
+ # model usage.
3810
+ # @return [Integer]
3811
+ #
3812
+ # @!attribute [rw] output_tokens
3813
+ # Contains information about the output tokens from the foundation
3814
+ # model usage.
3815
+ # @return [Integer]
3816
+ #
3817
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/Usage AWS API Documentation
3818
+ #
3819
+ class Usage < Struct.new(
3820
+ :input_tokens,
3821
+ :output_tokens)
3822
+ SENSITIVE = []
3823
+ include Aws::Structure
3824
+ end
3825
+
3718
3826
  # Input validation failed. Check your request parameters and retry the
3719
3827
  # request.
3720
3828
  #
@@ -3799,3 +3907,4 @@ module Aws::BedrockAgentRuntime
3799
3907
 
3800
3908
  end
3801
3909
  end
3910
+
@@ -11,17 +11,7 @@
11
11
  require 'aws-sdk-core'
12
12
  require 'aws-sigv4'
13
13
 
14
- require_relative 'aws-sdk-bedrockagentruntime/types'
15
- require_relative 'aws-sdk-bedrockagentruntime/client_api'
16
- require_relative 'aws-sdk-bedrockagentruntime/plugins/endpoints.rb'
17
- require_relative 'aws-sdk-bedrockagentruntime/client'
18
- require_relative 'aws-sdk-bedrockagentruntime/errors'
19
- require_relative 'aws-sdk-bedrockagentruntime/resource'
20
- require_relative 'aws-sdk-bedrockagentruntime/endpoint_parameters'
21
- require_relative 'aws-sdk-bedrockagentruntime/endpoint_provider'
22
- require_relative 'aws-sdk-bedrockagentruntime/endpoints'
23
- require_relative 'aws-sdk-bedrockagentruntime/customizations'
24
- require_relative 'aws-sdk-bedrockagentruntime/event_streams'
14
+ Aws::Plugins::GlobalConfiguration.add_identifier(:bedrockagentruntime)
25
15
 
26
16
  # This module provides support for Agents for Amazon Bedrock Runtime. This module is available in the
27
17
  # `aws-sdk-bedrockagentruntime` gem.
@@ -52,7 +42,21 @@ require_relative 'aws-sdk-bedrockagentruntime/event_streams'
52
42
  #
53
43
  # @!group service
54
44
  module Aws::BedrockAgentRuntime
45
+ autoload :Types, 'aws-sdk-bedrockagentruntime/types'
46
+ autoload :ClientApi, 'aws-sdk-bedrockagentruntime/client_api'
47
+ module Plugins
48
+ autoload :Endpoints, 'aws-sdk-bedrockagentruntime/plugins/endpoints.rb'
49
+ end
50
+ autoload :Client, 'aws-sdk-bedrockagentruntime/client'
51
+ autoload :Errors, 'aws-sdk-bedrockagentruntime/errors'
52
+ autoload :Resource, 'aws-sdk-bedrockagentruntime/resource'
53
+ autoload :EndpointParameters, 'aws-sdk-bedrockagentruntime/endpoint_parameters'
54
+ autoload :EndpointProvider, 'aws-sdk-bedrockagentruntime/endpoint_provider'
55
+ autoload :Endpoints, 'aws-sdk-bedrockagentruntime/endpoints'
56
+ autoload :EventStreams, 'aws-sdk-bedrockagentruntime/event_streams'
55
57
 
56
- GEM_VERSION = '1.17.0'
58
+ GEM_VERSION = '1.26.0'
57
59
 
58
60
  end
61
+
62
+ require_relative 'aws-sdk-bedrockagentruntime/customizations'
data/sig/client.rbs CHANGED
@@ -15,6 +15,7 @@ module Aws
15
15
  ?credentials: untyped,
16
16
  ?region: String,
17
17
  ?access_key_id: String,
18
+ ?account_id: String,
18
19
  ?active_endpoint_cache: bool,
19
20
  ?adaptive_retry_wait_to_fill: bool,
20
21
  ?client_side_monitoring: bool,
@@ -53,6 +54,7 @@ module Aws
53
54
  ?session_token: String,
54
55
  ?sigv4a_signing_region_set: Array[String],
55
56
  ?stub_responses: untyped,
57
+ ?telemetry_provider: Aws::Telemetry::TelemetryProviderBase,
56
58
  ?token_provider: untyped,
57
59
  ?use_dualstack_endpoint: bool,
58
60
  ?use_fips_endpoint: bool,
@@ -217,6 +219,7 @@ module Aws
217
219
  api_result: {
218
220
  action_group: ::String,
219
221
  api_path: ::String?,
222
+ confirmation_state: ("CONFIRM" | "DENY")?,
220
223
  http_method: ::String?,
221
224
  http_status_code: ::Integer?,
222
225
  response_body: Hash[::String, {
@@ -226,6 +229,7 @@ module Aws
226
229
  }?,
227
230
  function_result: {
228
231
  action_group: ::String,
232
+ confirmation_state: ("CONFIRM" | "DENY")?,
229
233
  function: ::String?,
230
234
  response_body: Hash[::String, {
231
235
  body: ::String?
data/sig/resource.rbs CHANGED
@@ -15,6 +15,7 @@ module Aws
15
15
  ?credentials: untyped,
16
16
  ?region: String,
17
17
  ?access_key_id: String,
18
+ ?account_id: String,
18
19
  ?active_endpoint_cache: bool,
19
20
  ?adaptive_retry_wait_to_fill: bool,
20
21
  ?client_side_monitoring: bool,
@@ -53,6 +54,7 @@ module Aws
53
54
  ?session_token: String,
54
55
  ?sigv4a_signing_region_set: Array[String],
55
56
  ?stub_responses: untyped,
57
+ ?telemetry_provider: Aws::Telemetry::TelemetryProviderBase,
56
58
  ?token_provider: untyped,
57
59
  ?use_dualstack_endpoint: bool,
58
60
  ?use_fips_endpoint: bool,
data/sig/types.rbs CHANGED
@@ -33,6 +33,7 @@ module Aws::BedrockAgentRuntime
33
33
 
34
34
  class ApiInvocationInput
35
35
  attr_accessor action_group: ::String
36
+ attr_accessor action_invocation_type: ("RESULT" | "USER_CONFIRMATION" | "USER_CONFIRMATION_AND_RESULT")
36
37
  attr_accessor api_path: ::String
37
38
  attr_accessor http_method: ::String
38
39
  attr_accessor parameters: ::Array[Types::ApiParameter]
@@ -55,6 +56,7 @@ module Aws::BedrockAgentRuntime
55
56
  class ApiResult
56
57
  attr_accessor action_group: ::String
57
58
  attr_accessor api_path: ::String
59
+ attr_accessor confirmation_state: ("CONFIRM" | "DENY")
58
60
  attr_accessor http_method: ::String
59
61
  attr_accessor http_status_code: ::Integer
60
62
  attr_accessor response_body: ::Hash[::String, Types::ContentBody]
@@ -232,6 +234,7 @@ module Aws::BedrockAgentRuntime
232
234
 
233
235
  class FunctionInvocationInput
234
236
  attr_accessor action_group: ::String
237
+ attr_accessor action_invocation_type: ("RESULT" | "USER_CONFIRMATION" | "USER_CONFIRMATION_AND_RESULT")
235
238
  attr_accessor function: ::String
236
239
  attr_accessor parameters: ::Array[Types::FunctionParameter]
237
240
  SENSITIVE: []
@@ -246,6 +249,7 @@ module Aws::BedrockAgentRuntime
246
249
 
247
250
  class FunctionResult
248
251
  attr_accessor action_group: ::String
252
+ attr_accessor confirmation_state: ("CONFIRM" | "DENY")
249
253
  attr_accessor function: ::String
250
254
  attr_accessor response_body: ::Hash[::String, Types::ContentBody]
251
255
  attr_accessor response_state: ("FAILURE" | "REPROMPT")
@@ -534,6 +538,11 @@ module Aws::BedrockAgentRuntime
534
538
  SENSITIVE: []
535
539
  end
536
540
 
541
+ class Metadata
542
+ attr_accessor usage: Types::Usage
543
+ SENSITIVE: [:usage]
544
+ end
545
+
537
546
  class ModelInvocationInput
538
547
  attr_accessor inference_configuration: Types::InferenceConfiguration
539
548
  attr_accessor override_lambda: ::String
@@ -561,18 +570,28 @@ module Aws::BedrockAgentRuntime
561
570
  SENSITIVE: []
562
571
  end
563
572
 
573
+ class OrchestrationModelInvocationOutput
574
+ attr_accessor metadata: Types::Metadata
575
+ attr_accessor raw_response: Types::RawResponse
576
+ attr_accessor trace_id: ::String
577
+ SENSITIVE: [:metadata, :raw_response]
578
+ end
579
+
564
580
  class OrchestrationTrace
565
581
  attr_accessor invocation_input: Types::InvocationInput
566
582
  attr_accessor model_invocation_input: Types::ModelInvocationInput
583
+ attr_accessor model_invocation_output: Types::OrchestrationModelInvocationOutput
567
584
  attr_accessor observation: Types::Observation
568
585
  attr_accessor rationale: Types::Rationale
569
586
  attr_accessor unknown: untyped
570
- SENSITIVE: [:invocation_input, :model_invocation_input, :observation, :rationale]
587
+ SENSITIVE: [:invocation_input, :model_invocation_input, :model_invocation_output, :observation, :rationale]
571
588
 
572
589
  class InvocationInput < OrchestrationTrace
573
590
  end
574
591
  class ModelInvocationInput < OrchestrationTrace
575
592
  end
593
+ class ModelInvocationOutput < OrchestrationTrace
594
+ end
576
595
  class Observation < OrchestrationTrace
577
596
  end
578
597
  class Rationale < OrchestrationTrace
@@ -674,6 +693,11 @@ module Aws::BedrockAgentRuntime
674
693
  SENSITIVE: [:text]
675
694
  end
676
695
 
696
+ class RawResponse
697
+ attr_accessor content: ::String
698
+ SENSITIVE: []
699
+ end
700
+
677
701
  class RepromptResponse
678
702
  attr_accessor source: ("ACTION_GROUP" | "KNOWLEDGE_BASE" | "PARSER")
679
703
  attr_accessor text: ::String
@@ -929,6 +953,12 @@ module Aws::BedrockAgentRuntime
929
953
  SENSITIVE: [:trace]
930
954
  end
931
955
 
956
+ class Usage
957
+ attr_accessor input_tokens: ::Integer
958
+ attr_accessor output_tokens: ::Integer
959
+ SENSITIVE: []
960
+ end
961
+
932
962
  class ValidationException
933
963
  attr_accessor message: ::String
934
964
  attr_accessor event_type: untyped
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.17.0
4
+ version: 1.26.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-07-18 00:00:00.000000000 Z
11
+ date: 2024-09-24 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.201.0
22
+ version: 3.207.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,21 +29,21 @@ dependencies:
29
29
  version: '3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 3.201.0
32
+ version: 3.207.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '1.1'
39
+ version: '1.5'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '1.1'
46
+ version: '1.5'
47
47
  description: Official AWS Ruby gem for Agents for Amazon Bedrock Runtime. This gem
48
48
  is part of the AWS SDK for Ruby.
49
49
  email: