aws-sdk-bedrockagent 1.20.0 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a70c499077cbaacd2eac2117840c3582bf001036d96b4de1ed7f831fa3f1a817
4
- data.tar.gz: 520d7cb2efe36812db626cc83fff84bf54315ac62f076d55b3c9e8e94017530e
3
+ metadata.gz: 5823b0a385ecf5bfd8da8fc673945bc5dd80ee73a0cdbb0b1aa4d78731dc7a5e
4
+ data.tar.gz: 2e51b4755fa3b3f3b26118d447937d7112adc873d516c53aefed044d40d0c1b3
5
5
  SHA512:
6
- metadata.gz: 953a43ae0c1a968c54d1e5b96525634005b808efbd7d506c011b7ff691ea1b08521c9d6b9475ee64ab74232a64da1492f70851aa0f22ce1c9e5d606fad221819
7
- data.tar.gz: 2ab3d68c65f8be14b5c7feebfeae955c92408b280fb7a025c9b294fcadf5a7cc8235ec9cdef354601e62c987d97554764a7aa95538a13a122cc96b3aecdc6722
6
+ metadata.gz: 7347d5bbc975e31c11a7646765f79b6e4389b1e187ec6f20ecddcbdfdb3769b288345a20ea5ab2565584e0e8d36047e51e02023c2353a529f3c3c604a921e81b
7
+ data.tar.gz: ff50a8193fe7643af64d785996b3678a20c9a57efbfbab9502d1f66f0573c2995f97a8832c3f1b91e04ccab4aa398e004176a78128fa20a251f4e29e38c7be9a
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.22.0 (2024-09-04)
5
+ ------------------
6
+
7
+ * Feature - Add support for user metadata inside PromptVariant.
8
+
9
+ 1.21.0 (2024-09-03)
10
+ ------------------
11
+
12
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
13
+
4
14
  1.20.0 (2024-08-23)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.20.0
1
+ 1.22.0
@@ -32,6 +32,7 @@ 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
 
@@ -83,6 +84,7 @@ module Aws::BedrockAgent
83
84
  add_plugin(Aws::Plugins::RequestCompression)
84
85
  add_plugin(Aws::Plugins::DefaultsMode)
85
86
  add_plugin(Aws::Plugins::RecursionDetection)
87
+ add_plugin(Aws::Plugins::Telemetry)
86
88
  add_plugin(Aws::Plugins::Sign)
87
89
  add_plugin(Aws::Plugins::Protocols::RestJson)
88
90
  add_plugin(Aws::BedrockAgent::Plugins::Endpoints)
@@ -330,6 +332,16 @@ module Aws::BedrockAgent
330
332
  # ** Please note ** When response stubbing is enabled, no HTTP
331
333
  # requests are made, and retries are disabled.
332
334
  #
335
+ # @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
336
+ # Allows you to provide a telemetry provider, which is used to
337
+ # emit telemetry data. By default, uses `NoOpTelemetryProvider` which
338
+ # will not record or emit any telemetry data. The SDK supports the
339
+ # following telemetry providers:
340
+ #
341
+ # * OpenTelemetry (OTel) - To use the OTel provider, install and require the
342
+ # `opentelemetry-sdk` gem and then, pass in an instance of a
343
+ # `Aws::Telemetry::OTelProvider` for telemetry provider.
344
+ #
333
345
  # @option options [Aws::TokenProvider] :token_provider
334
346
  # A Bearer Token Provider. This can be an instance of any one of the
335
347
  # following classes:
@@ -511,10 +523,14 @@ module Aws::BedrockAgent
511
523
  # to use advanced prompts, include a `promptOverrideConfiguration`
512
524
  # object. For more information, see [Advanced prompts][2].
513
525
  #
514
- # * If you agent fails to be created, the response returns a list of
526
+ # * If your agent fails to be created, the response returns a list of
515
527
  # `failureReasons` alongside a list of `recommendedActions` for you to
516
528
  # troubleshoot.
517
529
  #
530
+ # * The agent instructions will not be honored if your agent has only
531
+ # one knowledge base, uses default prompts, has no action group, and
532
+ # user input is disabled.
533
+ #
518
534
  #
519
535
  #
520
536
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-configure-memory.html
@@ -2005,6 +2021,12 @@ module Aws::BedrockAgent
2005
2021
  # top_p: 1.0,
2006
2022
  # },
2007
2023
  # },
2024
+ # metadata: [
2025
+ # {
2026
+ # key: "PromptMetadataKey", # required
2027
+ # value: "PromptMetadataValue", # required
2028
+ # },
2029
+ # ],
2008
2030
  # model_id: "PromptModelIdentifier",
2009
2031
  # name: "PromptVariantName", # required
2010
2032
  # template_configuration: {
@@ -2039,6 +2061,9 @@ module Aws::BedrockAgent
2039
2061
  # resp.variants[0].inference_configuration.text.temperature #=> Float
2040
2062
  # resp.variants[0].inference_configuration.text.top_k #=> Integer
2041
2063
  # resp.variants[0].inference_configuration.text.top_p #=> Float
2064
+ # resp.variants[0].metadata #=> Array
2065
+ # resp.variants[0].metadata[0].key #=> String
2066
+ # resp.variants[0].metadata[0].value #=> String
2042
2067
  # resp.variants[0].model_id #=> String
2043
2068
  # resp.variants[0].name #=> String
2044
2069
  # resp.variants[0].template_configuration.text.input_variables #=> Array
@@ -2133,6 +2158,9 @@ module Aws::BedrockAgent
2133
2158
  # resp.variants[0].inference_configuration.text.temperature #=> Float
2134
2159
  # resp.variants[0].inference_configuration.text.top_k #=> Integer
2135
2160
  # resp.variants[0].inference_configuration.text.top_p #=> Float
2161
+ # resp.variants[0].metadata #=> Array
2162
+ # resp.variants[0].metadata[0].key #=> String
2163
+ # resp.variants[0].metadata[0].value #=> String
2136
2164
  # resp.variants[0].model_id #=> String
2137
2165
  # resp.variants[0].name #=> String
2138
2166
  # resp.variants[0].template_configuration.text.input_variables #=> Array
@@ -3379,6 +3407,9 @@ module Aws::BedrockAgent
3379
3407
  # resp.variants[0].inference_configuration.text.temperature #=> Float
3380
3408
  # resp.variants[0].inference_configuration.text.top_k #=> Integer
3381
3409
  # resp.variants[0].inference_configuration.text.top_p #=> Float
3410
+ # resp.variants[0].metadata #=> Array
3411
+ # resp.variants[0].metadata[0].key #=> String
3412
+ # resp.variants[0].metadata[0].value #=> String
3382
3413
  # resp.variants[0].model_id #=> String
3383
3414
  # resp.variants[0].name #=> String
3384
3415
  # resp.variants[0].template_configuration.text.input_variables #=> Array
@@ -5554,6 +5585,12 @@ module Aws::BedrockAgent
5554
5585
  # top_p: 1.0,
5555
5586
  # },
5556
5587
  # },
5588
+ # metadata: [
5589
+ # {
5590
+ # key: "PromptMetadataKey", # required
5591
+ # value: "PromptMetadataValue", # required
5592
+ # },
5593
+ # ],
5557
5594
  # model_id: "PromptModelIdentifier",
5558
5595
  # name: "PromptVariantName", # required
5559
5596
  # template_configuration: {
@@ -5588,6 +5625,9 @@ module Aws::BedrockAgent
5588
5625
  # resp.variants[0].inference_configuration.text.temperature #=> Float
5589
5626
  # resp.variants[0].inference_configuration.text.top_k #=> Integer
5590
5627
  # resp.variants[0].inference_configuration.text.top_p #=> Float
5628
+ # resp.variants[0].metadata #=> Array
5629
+ # resp.variants[0].metadata[0].key #=> String
5630
+ # resp.variants[0].metadata[0].value #=> String
5591
5631
  # resp.variants[0].model_id #=> String
5592
5632
  # resp.variants[0].name #=> String
5593
5633
  # resp.variants[0].template_configuration.text.input_variables #=> Array
@@ -5611,14 +5651,19 @@ module Aws::BedrockAgent
5611
5651
  # @api private
5612
5652
  def build_request(operation_name, params = {})
5613
5653
  handlers = @handlers.for(operation_name)
5654
+ tracer = config.telemetry_provider.tracer_provider.tracer(
5655
+ Aws::Telemetry.module_to_tracer_name('Aws::BedrockAgent')
5656
+ )
5614
5657
  context = Seahorse::Client::RequestContext.new(
5615
5658
  operation_name: operation_name,
5616
5659
  operation: config.api.operation(operation_name),
5617
5660
  client: self,
5618
5661
  params: params,
5619
- config: config)
5662
+ config: config,
5663
+ tracer: tracer
5664
+ )
5620
5665
  context[:gem_name] = 'aws-sdk-bedrockagent'
5621
- context[:gem_version] = '1.20.0'
5666
+ context[:gem_version] = '1.22.0'
5622
5667
  Seahorse::Client::Request.new(handlers, context)
5623
5668
  end
5624
5669
 
@@ -337,6 +337,10 @@ module Aws::BedrockAgent
337
337
  PromptInputVariable = Shapes::StructureShape.new(name: 'PromptInputVariable')
338
338
  PromptInputVariableName = Shapes::StringShape.new(name: 'PromptInputVariableName')
339
339
  PromptInputVariablesList = Shapes::ListShape.new(name: 'PromptInputVariablesList')
340
+ PromptMetadataEntry = Shapes::StructureShape.new(name: 'PromptMetadataEntry')
341
+ PromptMetadataKey = Shapes::StringShape.new(name: 'PromptMetadataKey')
342
+ PromptMetadataList = Shapes::ListShape.new(name: 'PromptMetadataList')
343
+ PromptMetadataValue = Shapes::StringShape.new(name: 'PromptMetadataValue')
340
344
  PromptModelIdentifier = Shapes::StringShape.new(name: 'PromptModelIdentifier')
341
345
  PromptModelInferenceConfiguration = Shapes::StructureShape.new(name: 'PromptModelInferenceConfiguration')
342
346
  PromptName = Shapes::StringShape.new(name: 'PromptName')
@@ -1589,6 +1593,12 @@ module Aws::BedrockAgent
1589
1593
 
1590
1594
  PromptInputVariablesList.member = Shapes::ShapeRef.new(shape: PromptInputVariable)
1591
1595
 
1596
+ PromptMetadataEntry.add_member(:key, Shapes::ShapeRef.new(shape: PromptMetadataKey, required: true, location_name: "key"))
1597
+ PromptMetadataEntry.add_member(:value, Shapes::ShapeRef.new(shape: PromptMetadataValue, required: true, location_name: "value"))
1598
+ PromptMetadataEntry.struct_class = Types::PromptMetadataEntry
1599
+
1600
+ PromptMetadataList.member = Shapes::ShapeRef.new(shape: PromptMetadataEntry)
1601
+
1592
1602
  PromptModelInferenceConfiguration.add_member(:max_tokens, Shapes::ShapeRef.new(shape: MaximumLength, location_name: "maxTokens"))
1593
1603
  PromptModelInferenceConfiguration.add_member(:stop_sequences, Shapes::ShapeRef.new(shape: StopSequences, location_name: "stopSequences"))
1594
1604
  PromptModelInferenceConfiguration.add_member(:temperature, Shapes::ShapeRef.new(shape: Temperature, location_name: "temperature"))
@@ -1618,6 +1628,7 @@ module Aws::BedrockAgent
1618
1628
  PromptTemplateConfiguration.struct_class = Types::PromptTemplateConfiguration
1619
1629
 
1620
1630
  PromptVariant.add_member(:inference_configuration, Shapes::ShapeRef.new(shape: PromptInferenceConfiguration, location_name: "inferenceConfiguration"))
1631
+ PromptVariant.add_member(:metadata, Shapes::ShapeRef.new(shape: PromptMetadataList, location_name: "metadata"))
1621
1632
  PromptVariant.add_member(:model_id, Shapes::ShapeRef.new(shape: PromptModelIdentifier, location_name: "modelId"))
1622
1633
  PromptVariant.add_member(:name, Shapes::ShapeRef.new(shape: PromptVariantName, required: true, location_name: "name"))
1623
1634
  PromptVariant.add_member(:template_configuration, Shapes::ShapeRef.new(shape: PromptTemplateConfiguration, location_name: "templateConfiguration"))
@@ -5545,8 +5545,13 @@ module Aws::BedrockAgent
5545
5545
  #
5546
5546
  # * Anthropic Claude 3 Haiku - `anthropic.claude-3-haiku-20240307-v1:0`
5547
5547
  #
5548
- # You can get the ARN of a model with the action. Standard model usage
5549
- # charges apply for the foundation model parsing strategy.
5548
+ # You can get the ARN of a model with the [ListFoundationModels][1]
5549
+ # action. Standard model usage charges apply for the foundation model
5550
+ # parsing strategy.
5551
+ #
5552
+ #
5553
+ #
5554
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_ListFoundationModels.html
5550
5555
  #
5551
5556
  # @!attribute [rw] bedrock_foundation_model_configuration
5552
5557
  # Settings for a foundation model used to parse documents for a data
@@ -5982,6 +5987,31 @@ module Aws::BedrockAgent
5982
5987
  include Aws::Structure
5983
5988
  end
5984
5989
 
5990
+ # Contains a key-value pair that defines a metadata tag and value to
5991
+ # attach to a prompt variant. For more information, see [Create a prompt
5992
+ # using Prompt management][1].
5993
+ #
5994
+ #
5995
+ #
5996
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-create.html
5997
+ #
5998
+ # @!attribute [rw] key
5999
+ # The key of a metadata tag for a prompt variant.
6000
+ # @return [String]
6001
+ #
6002
+ # @!attribute [rw] value
6003
+ # The value of a metadata tag for a prompt variant.
6004
+ # @return [String]
6005
+ #
6006
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-2023-06-05/PromptMetadataEntry AWS API Documentation
6007
+ #
6008
+ class PromptMetadataEntry < Struct.new(
6009
+ :key,
6010
+ :value)
6011
+ SENSITIVE = [:key, :value]
6012
+ include Aws::Structure
6013
+ end
6014
+
5985
6015
  # Contains inference configurations related to model inference for a
5986
6016
  # prompt. For more information, see [Inference parameters][1].
5987
6017
  #
@@ -6153,6 +6183,16 @@ module Aws::BedrockAgent
6153
6183
  # Contains inference configurations for the prompt variant.
6154
6184
  # @return [Types::PromptInferenceConfiguration]
6155
6185
  #
6186
+ # @!attribute [rw] metadata
6187
+ # An array of objects, each containing a key-value pair that defines a
6188
+ # metadata tag and value to attach to a prompt variant. For more
6189
+ # information, see [Create a prompt using Prompt management][1].
6190
+ #
6191
+ #
6192
+ #
6193
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-create.html
6194
+ # @return [Array<Types::PromptMetadataEntry>]
6195
+ #
6156
6196
  # @!attribute [rw] model_id
6157
6197
  # The unique identifier of the model with which to run inference on
6158
6198
  # the prompt.
@@ -6174,11 +6214,12 @@ module Aws::BedrockAgent
6174
6214
  #
6175
6215
  class PromptVariant < Struct.new(
6176
6216
  :inference_configuration,
6217
+ :metadata,
6177
6218
  :model_id,
6178
6219
  :name,
6179
6220
  :template_configuration,
6180
6221
  :template_type)
6181
- SENSITIVE = []
6222
+ SENSITIVE = [:metadata]
6182
6223
  include Aws::Structure
6183
6224
  end
6184
6225
 
@@ -52,6 +52,6 @@ require_relative 'aws-sdk-bedrockagent/customizations'
52
52
  # @!group service
53
53
  module Aws::BedrockAgent
54
54
 
55
- GEM_VERSION = '1.20.0'
55
+ GEM_VERSION = '1.22.0'
56
56
 
57
57
  end
data/sig/client.rbs CHANGED
@@ -50,6 +50,7 @@ module Aws
50
50
  ?session_token: String,
51
51
  ?sigv4a_signing_region_set: Array[String],
52
52
  ?stub_responses: untyped,
53
+ ?telemetry_provider: Aws::Telemetry::TelemetryProviderBase,
53
54
  ?token_provider: untyped,
54
55
  ?use_dualstack_endpoint: bool,
55
56
  ?use_fips_endpoint: bool,
@@ -651,6 +652,12 @@ module Aws
651
652
  top_p: ::Float?
652
653
  }?
653
654
  }?,
655
+ metadata: Array[
656
+ {
657
+ key: ::String,
658
+ value: ::String
659
+ },
660
+ ]?,
654
661
  model_id: ::String?,
655
662
  name: ::String,
656
663
  template_configuration: {
@@ -1778,6 +1785,12 @@ module Aws
1778
1785
  top_p: ::Float?
1779
1786
  }?
1780
1787
  }?,
1788
+ metadata: Array[
1789
+ {
1790
+ key: ::String,
1791
+ value: ::String
1792
+ },
1793
+ ]?,
1781
1794
  model_id: ::String?,
1782
1795
  name: ::String,
1783
1796
  template_configuration: {
data/sig/resource.rbs CHANGED
@@ -50,6 +50,7 @@ module Aws
50
50
  ?session_token: String,
51
51
  ?sigv4a_signing_region_set: Array[String],
52
52
  ?stub_responses: untyped,
53
+ ?telemetry_provider: Aws::Telemetry::TelemetryProviderBase,
53
54
  ?token_provider: untyped,
54
55
  ?use_dualstack_endpoint: bool,
55
56
  ?use_fips_endpoint: bool,
data/sig/types.rbs CHANGED
@@ -1475,6 +1475,12 @@ module Aws::BedrockAgent
1475
1475
  SENSITIVE: []
1476
1476
  end
1477
1477
 
1478
+ class PromptMetadataEntry
1479
+ attr_accessor key: ::String
1480
+ attr_accessor value: ::String
1481
+ SENSITIVE: [:key, :value]
1482
+ end
1483
+
1478
1484
  class PromptModelInferenceConfiguration
1479
1485
  attr_accessor max_tokens: ::Integer
1480
1486
  attr_accessor stop_sequences: ::Array[::String]
@@ -1514,11 +1520,12 @@ module Aws::BedrockAgent
1514
1520
 
1515
1521
  class PromptVariant
1516
1522
  attr_accessor inference_configuration: Types::PromptInferenceConfiguration
1523
+ attr_accessor metadata: ::Array[Types::PromptMetadataEntry]
1517
1524
  attr_accessor model_id: ::String
1518
1525
  attr_accessor name: ::String
1519
1526
  attr_accessor template_configuration: Types::PromptTemplateConfiguration
1520
1527
  attr_accessor template_type: ("TEXT")
1521
- SENSITIVE: []
1528
+ SENSITIVE: [:metadata]
1522
1529
  end
1523
1530
 
1524
1531
  class RdsConfiguration
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-bedrockagent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.20.0
4
+ version: 1.22.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-08-23 00:00:00.000000000 Z
11
+ date: 2024-09-04 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.203.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.201.0
32
+ version: 3.203.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement