aws-sdk-bedrockagentruntime 1.7.0 → 1.8.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: 3a7807ae877e929d1ebf772ede849e026038aef63d4cab849617d61b17ca4ab2
4
- data.tar.gz: 65456ef078ed1cf91f3f6bb9771417e2a8754a9112f73f40a967c8e2d931a04c
3
+ metadata.gz: 677ee4abe3ff579c74b42e6bb3a5fd2d6902ffc804379f04ae1764715222a66a
4
+ data.tar.gz: e56a89c3cfc206a3e71c12131e57454fd1298308c32c2e896be2340d07affba1
5
5
  SHA512:
6
- metadata.gz: c87fb48cd5dca38d6bc19cab8ffd706e48d38b824eb5fab4bcada125e8c03de0b2bf8e9fa2952390d2b3a52b5f9691a9c4ef1dbfd41750f7841d9ae1af99b0b7
7
- data.tar.gz: 5c541812632089ec05e6323e2297a14795fd4964742bd7fab30c5ca2d365828c62c9babe1460cbcd9d0aa866364692cf21fafdc191e81fcad22b5362b8672258
6
+ metadata.gz: 3670e5753b0ea6a251feaae6c8dbb76e3f79b300f6206451c5281ce75e660088d480039a4a706076c849b506329b783853dee61d40be7d39c5251634d8283570
7
+ data.tar.gz: 1dee8de6e1ec9f86b5a48f9afe0ae34acbb80002bd638c573557e60de547bc31036a6064777b93df2d962d0de2802b6bbf7fe5b18473784082b50b11b7810035
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.8.0 (2024-05-09)
5
+ ------------------
6
+
7
+ * Feature - This release adds support to provide guardrail configuration and modify inference parameters that are then used in RetrieveAndGenerate API in Agents for Amazon Bedrock.
8
+
4
9
  1.7.0 (2024-04-25)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.7.0
1
+ 1.8.0
@@ -423,13 +423,13 @@ module Aws::BedrockAgentRuntime
423
423
 
424
424
  # @!group API Operations
425
425
 
426
- # Sends a prompt for the agent to process and respond to. Use return
427
- # control event type for function calling.
428
- #
429
426
  # <note markdown="1"> The CLI doesn't support `InvokeAgent`.
430
427
  #
431
428
  # </note>
432
429
  #
430
+ # Sends a prompt for the agent to process and respond to. Note the
431
+ # following fields for the request:
432
+ #
433
433
  # * To continue the same conversation with an agent, use the same
434
434
  # `sessionId` value in the request.
435
435
  #
@@ -442,9 +442,8 @@ module Aws::BedrockAgentRuntime
442
442
  # * End a conversation by setting `endSession` to `true`.
443
443
  #
444
444
  # * In the `sessionState` object, you can include attributes for the
445
- # session or prompt or parameters returned from the action group.
446
- #
447
- # * Use return control event type for function calling.
445
+ # session or prompt or, if you configured an action group to return
446
+ # control, results from invocation of the action group.
448
447
  #
449
448
  # The response is returned in the `bytes` field of the `chunk` object.
450
449
  #
@@ -454,6 +453,10 @@ module Aws::BedrockAgentRuntime
454
453
  # * If you set `enableTrace` to `true` in the request, you can trace the
455
454
  # agent's steps and reasoning process that led it to the response.
456
455
  #
456
+ # * If the action predicted was configured to return control, the
457
+ # response returns parameters for the action, elicited from the user,
458
+ # in the `returnControl` field.
459
+ #
457
460
  # * Errors are also surfaced in the response.
458
461
  #
459
462
  #
@@ -480,6 +483,11 @@ module Aws::BedrockAgentRuntime
480
483
  # @option params [String] :input_text
481
484
  # The prompt text to send the agent.
482
485
  #
486
+ # <note markdown="1"> If you include `returnControlInvocationResults` in the `sessionState`
487
+ # field, the `inputText` field will be ignored.
488
+ #
489
+ # </note>
490
+ #
483
491
  # @option params [required, String] :session_id
484
492
  # The unique identifier of the session. Use the same value across
485
493
  # requests to continue the same conversation.
@@ -488,6 +496,11 @@ module Aws::BedrockAgentRuntime
488
496
  # Contains parameters that specify various attributes of the session.
489
497
  # For more information, see [Control session context][1].
490
498
  #
499
+ # <note markdown="1"> If you include `returnControlInvocationResults` in the `sessionState`
500
+ # field, the `inputText` field will be ignored.
501
+ #
502
+ # </note>
503
+ #
491
504
  #
492
505
  #
493
506
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html
@@ -1049,6 +1062,7 @@ module Aws::BedrockAgentRuntime
1049
1062
  # @return [Types::RetrieveAndGenerateResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1050
1063
  #
1051
1064
  # * {Types::RetrieveAndGenerateResponse#citations #citations} => Array&lt;Types::Citation&gt;
1065
+ # * {Types::RetrieveAndGenerateResponse#guardrail_action #guardrail_action} => String
1052
1066
  # * {Types::RetrieveAndGenerateResponse#output #output} => Types::RetrieveAndGenerateOutput
1053
1067
  # * {Types::RetrieveAndGenerateResponse#session_id #session_id} => String
1054
1068
  #
@@ -1061,6 +1075,22 @@ module Aws::BedrockAgentRuntime
1061
1075
  # retrieve_and_generate_configuration: {
1062
1076
  # external_sources_configuration: {
1063
1077
  # generation_configuration: {
1078
+ # additional_model_request_fields: {
1079
+ # "AdditionalModelRequestFieldsKey" => {
1080
+ # },
1081
+ # },
1082
+ # guardrail_configuration: {
1083
+ # guardrail_id: "GuardrailConfigurationGuardrailIdString", # required
1084
+ # guardrail_version: "GuardrailConfigurationGuardrailVersionString", # required
1085
+ # },
1086
+ # inference_config: {
1087
+ # text_inference_config: {
1088
+ # max_tokens: 1,
1089
+ # stop_sequences: ["RAGStopSequencesMemberString"],
1090
+ # temperature: 1.0,
1091
+ # top_p: 1.0,
1092
+ # },
1093
+ # },
1064
1094
  # prompt_template: {
1065
1095
  # text_prompt_template: "TextPromptTemplate",
1066
1096
  # },
@@ -1082,6 +1112,22 @@ module Aws::BedrockAgentRuntime
1082
1112
  # },
1083
1113
  # knowledge_base_configuration: {
1084
1114
  # generation_configuration: {
1115
+ # additional_model_request_fields: {
1116
+ # "AdditionalModelRequestFieldsKey" => {
1117
+ # },
1118
+ # },
1119
+ # guardrail_configuration: {
1120
+ # guardrail_id: "GuardrailConfigurationGuardrailIdString", # required
1121
+ # guardrail_version: "GuardrailConfigurationGuardrailVersionString", # required
1122
+ # },
1123
+ # inference_config: {
1124
+ # text_inference_config: {
1125
+ # max_tokens: 1,
1126
+ # stop_sequences: ["RAGStopSequencesMemberString"],
1127
+ # temperature: 1.0,
1128
+ # top_p: 1.0,
1129
+ # },
1130
+ # },
1085
1131
  # prompt_template: {
1086
1132
  # text_prompt_template: "TextPromptTemplate",
1087
1133
  # },
@@ -1171,6 +1217,7 @@ module Aws::BedrockAgentRuntime
1171
1217
  # resp.citations[0].retrieved_references[0].location.s3_location.uri #=> String
1172
1218
  # resp.citations[0].retrieved_references[0].location.type #=> String, one of "S3"
1173
1219
  # resp.citations[0].retrieved_references[0].metadata #=> Hash
1220
+ # resp.guardrail_action #=> String, one of "INTERVENED", "NONE"
1174
1221
  # resp.output.text #=> String
1175
1222
  # resp.session_id #=> String
1176
1223
  #
@@ -1196,7 +1243,7 @@ module Aws::BedrockAgentRuntime
1196
1243
  params: params,
1197
1244
  config: config)
1198
1245
  context[:gem_name] = 'aws-sdk-bedrockagentruntime'
1199
- context[:gem_version] = '1.7.0'
1246
+ context[:gem_version] = '1.8.0'
1200
1247
  Seahorse::Client::Request.new(handlers, context)
1201
1248
  end
1202
1249
 
@@ -18,6 +18,9 @@ module Aws::BedrockAgentRuntime
18
18
  ActionGroupInvocationOutput = Shapes::StructureShape.new(name: 'ActionGroupInvocationOutput')
19
19
  ActionGroupName = Shapes::StringShape.new(name: 'ActionGroupName')
20
20
  ActionGroupOutputString = Shapes::StringShape.new(name: 'ActionGroupOutputString')
21
+ AdditionalModelRequestFields = Shapes::MapShape.new(name: 'AdditionalModelRequestFields')
22
+ AdditionalModelRequestFieldsKey = Shapes::StringShape.new(name: 'AdditionalModelRequestFieldsKey')
23
+ AdditionalModelRequestFieldsValue = Shapes::DocumentShape.new(name: 'AdditionalModelRequestFieldsValue', document: true)
21
24
  AgentAliasId = Shapes::StringShape.new(name: 'AgentAliasId')
22
25
  AgentId = Shapes::StringShape.new(name: 'AgentId')
23
26
  AgentVersion = Shapes::StringShape.new(name: 'AgentVersion')
@@ -62,7 +65,12 @@ module Aws::BedrockAgentRuntime
62
65
  FunctionResult = Shapes::StructureShape.new(name: 'FunctionResult')
63
66
  GeneratedResponsePart = Shapes::StructureShape.new(name: 'GeneratedResponsePart')
64
67
  GenerationConfiguration = Shapes::StructureShape.new(name: 'GenerationConfiguration')
68
+ GuadrailAction = Shapes::StringShape.new(name: 'GuadrailAction')
69
+ GuardrailConfiguration = Shapes::StructureShape.new(name: 'GuardrailConfiguration')
70
+ GuardrailConfigurationGuardrailIdString = Shapes::StringShape.new(name: 'GuardrailConfigurationGuardrailIdString')
71
+ GuardrailConfigurationGuardrailVersionString = Shapes::StringShape.new(name: 'GuardrailConfigurationGuardrailVersionString')
65
72
  Identifier = Shapes::StringShape.new(name: 'Identifier')
73
+ InferenceConfig = Shapes::StructureShape.new(name: 'InferenceConfig')
66
74
  InferenceConfiguration = Shapes::StructureShape.new(name: 'InferenceConfiguration')
67
75
  InputText = Shapes::StringShape.new(name: 'InputText')
68
76
  Integer = Shapes::IntegerShape.new(name: 'Integer')
@@ -88,6 +96,7 @@ module Aws::BedrockAgentRuntime
88
96
  KnowledgeBaseVectorSearchConfiguration = Shapes::StructureShape.new(name: 'KnowledgeBaseVectorSearchConfiguration')
89
97
  KnowledgeBaseVectorSearchConfigurationNumberOfResultsInteger = Shapes::IntegerShape.new(name: 'KnowledgeBaseVectorSearchConfigurationNumberOfResultsInteger')
90
98
  LambdaArn = Shapes::StringShape.new(name: 'LambdaArn')
99
+ MaxTokens = Shapes::IntegerShape.new(name: 'MaxTokens')
91
100
  MaximumLength = Shapes::IntegerShape.new(name: 'MaximumLength')
92
101
  MimeType = Shapes::StringShape.new(name: 'MimeType')
93
102
  ModelInvocationInput = Shapes::StructureShape.new(name: 'ModelInvocationInput')
@@ -112,6 +121,8 @@ module Aws::BedrockAgentRuntime
112
121
  PromptText = Shapes::StringShape.new(name: 'PromptText')
113
122
  PromptType = Shapes::StringShape.new(name: 'PromptType')
114
123
  PropertyParameters = Shapes::StructureShape.new(name: 'PropertyParameters')
124
+ RAGStopSequences = Shapes::ListShape.new(name: 'RAGStopSequences')
125
+ RAGStopSequencesMemberString = Shapes::StringShape.new(name: 'RAGStopSequencesMemberString')
115
126
  Rationale = Shapes::StructureShape.new(name: 'Rationale')
116
127
  RationaleString = Shapes::StringShape.new(name: 'RationaleString')
117
128
  RepromptResponse = Shapes::StructureShape.new(name: 'RepromptResponse')
@@ -157,6 +168,7 @@ module Aws::BedrockAgentRuntime
157
168
  StopSequences = Shapes::ListShape.new(name: 'StopSequences')
158
169
  String = Shapes::StringShape.new(name: 'String')
159
170
  Temperature = Shapes::FloatShape.new(name: 'Temperature')
171
+ TextInferenceConfig = Shapes::StructureShape.new(name: 'TextInferenceConfig')
160
172
  TextPromptTemplate = Shapes::StringShape.new(name: 'TextPromptTemplate')
161
173
  TextResponsePart = Shapes::StructureShape.new(name: 'TextResponsePart')
162
174
  ThrottlingException = Shapes::StructureShape.new(name: 'ThrottlingException')
@@ -184,6 +196,9 @@ module Aws::BedrockAgentRuntime
184
196
  ActionGroupInvocationOutput.add_member(:text, Shapes::ShapeRef.new(shape: ActionGroupOutputString, location_name: "text"))
185
197
  ActionGroupInvocationOutput.struct_class = Types::ActionGroupInvocationOutput
186
198
 
199
+ AdditionalModelRequestFields.key = Shapes::ShapeRef.new(shape: AdditionalModelRequestFieldsKey)
200
+ AdditionalModelRequestFields.value = Shapes::ShapeRef.new(shape: AdditionalModelRequestFieldsValue)
201
+
187
202
  ApiContentMap.key = Shapes::ShapeRef.new(shape: String)
188
203
  ApiContentMap.value = Shapes::ShapeRef.new(shape: PropertyParameters)
189
204
 
@@ -250,6 +265,9 @@ module Aws::BedrockAgentRuntime
250
265
 
251
266
  ExternalSources.member = Shapes::ShapeRef.new(shape: ExternalSource)
252
267
 
268
+ ExternalSourcesGenerationConfiguration.add_member(:additional_model_request_fields, Shapes::ShapeRef.new(shape: AdditionalModelRequestFields, location_name: "additionalModelRequestFields"))
269
+ ExternalSourcesGenerationConfiguration.add_member(:guardrail_configuration, Shapes::ShapeRef.new(shape: GuardrailConfiguration, location_name: "guardrailConfiguration"))
270
+ ExternalSourcesGenerationConfiguration.add_member(:inference_config, Shapes::ShapeRef.new(shape: InferenceConfig, location_name: "inferenceConfig"))
253
271
  ExternalSourcesGenerationConfiguration.add_member(:prompt_template, Shapes::ShapeRef.new(shape: PromptTemplate, location_name: "promptTemplate"))
254
272
  ExternalSourcesGenerationConfiguration.struct_class = Types::ExternalSourcesGenerationConfiguration
255
273
 
@@ -290,9 +308,19 @@ module Aws::BedrockAgentRuntime
290
308
  GeneratedResponsePart.add_member(:text_response_part, Shapes::ShapeRef.new(shape: TextResponsePart, location_name: "textResponsePart"))
291
309
  GeneratedResponsePart.struct_class = Types::GeneratedResponsePart
292
310
 
311
+ GenerationConfiguration.add_member(:additional_model_request_fields, Shapes::ShapeRef.new(shape: AdditionalModelRequestFields, location_name: "additionalModelRequestFields"))
312
+ GenerationConfiguration.add_member(:guardrail_configuration, Shapes::ShapeRef.new(shape: GuardrailConfiguration, location_name: "guardrailConfiguration"))
313
+ GenerationConfiguration.add_member(:inference_config, Shapes::ShapeRef.new(shape: InferenceConfig, location_name: "inferenceConfig"))
293
314
  GenerationConfiguration.add_member(:prompt_template, Shapes::ShapeRef.new(shape: PromptTemplate, location_name: "promptTemplate"))
294
315
  GenerationConfiguration.struct_class = Types::GenerationConfiguration
295
316
 
317
+ GuardrailConfiguration.add_member(:guardrail_id, Shapes::ShapeRef.new(shape: GuardrailConfigurationGuardrailIdString, required: true, location_name: "guardrailId"))
318
+ GuardrailConfiguration.add_member(:guardrail_version, Shapes::ShapeRef.new(shape: GuardrailConfigurationGuardrailVersionString, required: true, location_name: "guardrailVersion"))
319
+ GuardrailConfiguration.struct_class = Types::GuardrailConfiguration
320
+
321
+ InferenceConfig.add_member(:text_inference_config, Shapes::ShapeRef.new(shape: TextInferenceConfig, location_name: "textInferenceConfig"))
322
+ InferenceConfig.struct_class = Types::InferenceConfig
323
+
296
324
  InferenceConfiguration.add_member(:maximum_length, Shapes::ShapeRef.new(shape: MaximumLength, location_name: "maximumLength"))
297
325
  InferenceConfiguration.add_member(:stop_sequences, Shapes::ShapeRef.new(shape: StopSequences, location_name: "stopSequences"))
298
326
  InferenceConfiguration.add_member(:temperature, Shapes::ShapeRef.new(shape: Temperature, location_name: "temperature"))
@@ -457,6 +485,8 @@ module Aws::BedrockAgentRuntime
457
485
  PropertyParameters.add_member(:properties, Shapes::ShapeRef.new(shape: ParameterList, location_name: "properties"))
458
486
  PropertyParameters.struct_class = Types::PropertyParameters
459
487
 
488
+ RAGStopSequences.member = Shapes::ShapeRef.new(shape: RAGStopSequencesMemberString)
489
+
460
490
  Rationale.add_member(:text, Shapes::ShapeRef.new(shape: RationaleString, location_name: "text"))
461
491
  Rationale.add_member(:trace_id, Shapes::ShapeRef.new(shape: TraceId, location_name: "traceId"))
462
492
  Rationale.struct_class = Types::Rationale
@@ -547,6 +577,7 @@ module Aws::BedrockAgentRuntime
547
577
  RetrieveAndGenerateRequest.struct_class = Types::RetrieveAndGenerateRequest
548
578
 
549
579
  RetrieveAndGenerateResponse.add_member(:citations, Shapes::ShapeRef.new(shape: Citations, location_name: "citations"))
580
+ RetrieveAndGenerateResponse.add_member(:guardrail_action, Shapes::ShapeRef.new(shape: GuadrailAction, location_name: "guardrailAction"))
550
581
  RetrieveAndGenerateResponse.add_member(:output, Shapes::ShapeRef.new(shape: RetrieveAndGenerateOutput, required: true, location_name: "output"))
551
582
  RetrieveAndGenerateResponse.add_member(:session_id, Shapes::ShapeRef.new(shape: SessionId, required: true, location_name: "sessionId"))
552
583
  RetrieveAndGenerateResponse.struct_class = Types::RetrieveAndGenerateResponse
@@ -598,6 +629,12 @@ module Aws::BedrockAgentRuntime
598
629
 
599
630
  StopSequences.member = Shapes::ShapeRef.new(shape: String)
600
631
 
632
+ TextInferenceConfig.add_member(:max_tokens, Shapes::ShapeRef.new(shape: MaxTokens, location_name: "maxTokens"))
633
+ TextInferenceConfig.add_member(:stop_sequences, Shapes::ShapeRef.new(shape: RAGStopSequences, location_name: "stopSequences"))
634
+ TextInferenceConfig.add_member(:temperature, Shapes::ShapeRef.new(shape: Temperature, location_name: "temperature"))
635
+ TextInferenceConfig.add_member(:top_p, Shapes::ShapeRef.new(shape: TopP, location_name: "topP"))
636
+ TextInferenceConfig.struct_class = Types::TextInferenceConfig
637
+
601
638
  TextResponsePart.add_member(:span, Shapes::ShapeRef.new(shape: Span, location_name: "span"))
602
639
  TextResponsePart.add_member(:text, Shapes::ShapeRef.new(shape: String, location_name: "text"))
603
640
  TextResponsePart.struct_class = Types::TextResponsePart
@@ -91,13 +91,13 @@ module Aws::BedrockAgentRuntime
91
91
  #
92
92
  # This data type is used in the following API operations:
93
93
  #
94
- # * In the `returnControl` field of the [Retrieve response][1]
94
+ # * In the `returnControl` field of the [InvokeAgent response][1]
95
95
  #
96
96
  # ^
97
97
  #
98
98
  #
99
99
  #
100
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
100
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax
101
101
  #
102
102
  # @!attribute [rw] action_group
103
103
  # The action group that the API operation belongs to.
@@ -137,13 +137,13 @@ module Aws::BedrockAgentRuntime
137
137
  #
138
138
  # This data type is used in the following API operations:
139
139
  #
140
- # * [Retrieve response][1]
140
+ # * [InvokeAgent response][1]
141
141
  #
142
142
  # ^
143
143
  #
144
144
  #
145
145
  #
146
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
146
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax
147
147
  #
148
148
  # @!attribute [rw] name
149
149
  # The name of the parameter.
@@ -172,13 +172,13 @@ module Aws::BedrockAgentRuntime
172
172
  #
173
173
  # This data type is used in the following API operations:
174
174
  #
175
- # * [Retrieve response][1]
175
+ # * [InvokeAgent response][1]
176
176
  #
177
177
  # ^
178
178
  #
179
179
  #
180
180
  #
181
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
181
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax
182
182
  #
183
183
  # @!attribute [rw] content
184
184
  # The content of the request body. The key of the object in this field
@@ -198,13 +198,14 @@ module Aws::BedrockAgentRuntime
198
198
  #
199
199
  # This data type is used in the following API operations:
200
200
  #
201
- # * In the `returnControlInvocationResults` of the [Retrieve request][1]
201
+ # * In the `returnControlInvocationResults` of the [InvokeAgent
202
+ # request][1]
202
203
  #
203
204
  # ^
204
205
  #
205
206
  #
206
207
  #
207
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax
208
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_RequestSyntax
208
209
  #
209
210
  # @!attribute [rw] action_group
210
211
  # The action group that the API operation belongs to.
@@ -225,8 +226,8 @@ module Aws::BedrockAgentRuntime
225
226
  #
226
227
  # @!attribute [rw] response_body
227
228
  # The response body from the API operation. The key of the object is
228
- # the content type. The response may be returned directly or from the
229
- # Lambda function.
229
+ # the content type (currently, only `TEXT` is supported). The response
230
+ # may be returned directly or from the Lambda function.
230
231
  # @return [Hash<String,Types::ContentBody>]
231
232
  #
232
233
  # @!attribute [rw] response_state
@@ -317,13 +318,13 @@ module Aws::BedrockAgentRuntime
317
318
  #
318
319
  # This data type is used in the following API operations:
319
320
  #
320
- # * [Retrieve response][1] – in the `citations` field
321
+ # * [InvokeAgent response][1] – in the `citations` field
321
322
  #
322
323
  # * [RetrieveAndGenerate response][2] – in the `citations` field
323
324
  #
324
325
  #
325
326
  #
326
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
327
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax
327
328
  # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax
328
329
  #
329
330
  # @!attribute [rw] generated_response_part
@@ -363,14 +364,14 @@ module Aws::BedrockAgentRuntime
363
364
  #
364
365
  # This data type is used in the following API operations:
365
366
  #
366
- # * In the `returnControlInvocationResults` field of the [Retrieve
367
+ # * In the `returnControlInvocationResults` field of the [InvokeAgent
367
368
  # request][1]
368
369
  #
369
370
  # ^
370
371
  #
371
372
  #
372
373
  #
373
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax
374
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_RequestSyntax
374
375
  #
375
376
  # @!attribute [rw] body
376
377
  # The body of the API response.
@@ -434,6 +435,22 @@ module Aws::BedrockAgentRuntime
434
435
  # Contains the generation configuration of the external source wrapper
435
436
  # object.
436
437
  #
438
+ # @!attribute [rw] additional_model_request_fields
439
+ # Additional model parameters and their corresponding values not
440
+ # included in the textInferenceConfig structure for an external
441
+ # source. Takes in custom model parameters specific to the language
442
+ # model being used.
443
+ # @return [Hash<String,Hash,Array,String,Numeric,Boolean>]
444
+ #
445
+ # @!attribute [rw] guardrail_configuration
446
+ # The configuration details for the guardrail.
447
+ # @return [Types::GuardrailConfiguration]
448
+ #
449
+ # @!attribute [rw] inference_config
450
+ # Configuration settings for inference when using RetrieveAndGenerate
451
+ # to generate responses while using an external source.
452
+ # @return [Types::InferenceConfig]
453
+ #
437
454
  # @!attribute [rw] prompt_template
438
455
  # Contain the textPromptTemplate string for the external source
439
456
  # wrapper object.
@@ -442,6 +459,9 @@ module Aws::BedrockAgentRuntime
442
459
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ExternalSourcesGenerationConfiguration AWS API Documentation
443
460
  #
444
461
  class ExternalSourcesGenerationConfiguration < Struct.new(
462
+ :additional_model_request_fields,
463
+ :guardrail_configuration,
464
+ :inference_config,
445
465
  :prompt_template)
446
466
  SENSITIVE = []
447
467
  include Aws::Structure
@@ -545,13 +565,13 @@ module Aws::BedrockAgentRuntime
545
565
  #
546
566
  # This data type is used in the following API operations:
547
567
  #
548
- # * In the `returnControl` field of the [Retrieve response][1]
568
+ # * In the `returnControl` field of the [InvokeAgent response][1]
549
569
  #
550
570
  # ^
551
571
  #
552
572
  #
553
573
  #
554
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
574
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax
555
575
  #
556
576
  # @!attribute [rw] action_group
557
577
  # The action group that the function belongs to.
@@ -579,13 +599,13 @@ module Aws::BedrockAgentRuntime
579
599
  #
580
600
  # This data type is used in the following API operations:
581
601
  #
582
- # * In the `returnControl` field of the [Retrieve response][1]
602
+ # * In the `returnControl` field of the [InvokeAgent response][1]
583
603
  #
584
604
  # ^
585
605
  #
586
606
  #
587
607
  #
588
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
608
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax
589
609
  #
590
610
  # @!attribute [rw] name
591
611
  # The name of the parameter.
@@ -614,13 +634,14 @@ module Aws::BedrockAgentRuntime
614
634
  #
615
635
  # This data type is used in the following API operations:
616
636
  #
617
- # * In the `returnControlInvocationResults` of the [Retrieve request][1]
637
+ # * In the `returnControlInvocationResults` of the [InvokeAgent
638
+ # request][1]
618
639
  #
619
640
  # ^
620
641
  #
621
642
  #
622
643
  #
623
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax
644
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_RequestSyntax
624
645
  #
625
646
  # @!attribute [rw] action_group
626
647
  # The action group that the function belongs to.
@@ -631,8 +652,10 @@ module Aws::BedrockAgentRuntime
631
652
  # @return [String]
632
653
  #
633
654
  # @!attribute [rw] response_body
634
- # The response from the function call using the parameters. The
635
- # response may be returned directly or from the Lambda function.
655
+ # The response from the function call using the parameters. The key of
656
+ # the object is the content type (currently, only `TEXT` is
657
+ # supported). The response may be returned directly or from the Lambda
658
+ # function.
636
659
  # @return [Hash<String,Types::ContentBody>]
637
660
  #
638
661
  # @!attribute [rw] response_state
@@ -659,14 +682,14 @@ module Aws::BedrockAgentRuntime
659
682
  #
660
683
  # This data type is used in the following API operations:
661
684
  #
662
- # * [Retrieve response][1] – in the `generatedResponsePart` field
685
+ # * [InvokeAgent response][1] – in the `generatedResponsePart` field
663
686
  #
664
687
  # * [RetrieveAndGenerate response][2] – in the `generatedResponsePart`
665
688
  # field
666
689
  #
667
690
  #
668
691
  #
669
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
692
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax
670
693
  # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax
671
694
  #
672
695
  # @!attribute [rw] text_response_part
@@ -695,6 +718,22 @@ module Aws::BedrockAgentRuntime
695
718
  #
696
719
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax
697
720
  #
721
+ # @!attribute [rw] additional_model_request_fields
722
+ # Additional model parameters and corresponding values not included in
723
+ # the textInferenceConfig structure for a knowledge base. This allows
724
+ # users to provide custom model parameters specific to the language
725
+ # model being used.
726
+ # @return [Hash<String,Hash,Array,String,Numeric,Boolean>]
727
+ #
728
+ # @!attribute [rw] guardrail_configuration
729
+ # The configuration details for the guardrail.
730
+ # @return [Types::GuardrailConfiguration]
731
+ #
732
+ # @!attribute [rw] inference_config
733
+ # Configuration settings for inference when using RetrieveAndGenerate
734
+ # to generate responses while using a knowledge base as a source.
735
+ # @return [Types::InferenceConfig]
736
+ #
698
737
  # @!attribute [rw] prompt_template
699
738
  # Contains the template for the prompt that's sent to the model for
700
739
  # response generation.
@@ -703,11 +742,49 @@ module Aws::BedrockAgentRuntime
703
742
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GenerationConfiguration AWS API Documentation
704
743
  #
705
744
  class GenerationConfiguration < Struct.new(
745
+ :additional_model_request_fields,
746
+ :guardrail_configuration,
747
+ :inference_config,
706
748
  :prompt_template)
707
749
  SENSITIVE = []
708
750
  include Aws::Structure
709
751
  end
710
752
 
753
+ # The configuration details for the guardrail.
754
+ #
755
+ # @!attribute [rw] guardrail_id
756
+ # The unique identifier for the guardrail.
757
+ # @return [String]
758
+ #
759
+ # @!attribute [rw] guardrail_version
760
+ # The version of the guardrail.
761
+ # @return [String]
762
+ #
763
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GuardrailConfiguration AWS API Documentation
764
+ #
765
+ class GuardrailConfiguration < Struct.new(
766
+ :guardrail_id,
767
+ :guardrail_version)
768
+ SENSITIVE = []
769
+ include Aws::Structure
770
+ end
771
+
772
+ # The configuration for inference settings when generating responses
773
+ # using RetrieveAndGenerate.
774
+ #
775
+ # @!attribute [rw] text_inference_config
776
+ # Configuration settings specific to text generation while generating
777
+ # responses using RetrieveAndGenerate.
778
+ # @return [Types::TextInferenceConfig]
779
+ #
780
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InferenceConfig AWS API Documentation
781
+ #
782
+ class InferenceConfig < Struct.new(
783
+ :text_inference_config)
784
+ SENSITIVE = []
785
+ include Aws::Structure
786
+ end
787
+
711
788
  # Specifications about the inference parameters that were provided
712
789
  # alongside the prompt. These are specified in the
713
790
  # [PromptOverrideConfiguration][1] object that was set when the agent
@@ -816,13 +893,13 @@ module Aws::BedrockAgentRuntime
816
893
  #
817
894
  # This data type is used in the following API operations:
818
895
  #
819
- # * In the `returnControl` field of the [Retrieve response][1]
896
+ # * In the `returnControl` field of the [InvokeAgent response][1]
820
897
  #
821
898
  # ^
822
899
  #
823
900
  #
824
901
  #
825
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
902
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax
826
903
  #
827
904
  # @note InvocationInputMember is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of InvocationInputMember corresponding to the set member.
828
905
  #
@@ -851,17 +928,21 @@ module Aws::BedrockAgentRuntime
851
928
  class Unknown < InvocationInputMember; end
852
929
  end
853
930
 
854
- # A result from the action group invocation.
931
+ # A result from the invocation of an action. For more information, see
932
+ # [Return control to the agent developer][1] and [Control session
933
+ # context][2].
855
934
  #
856
935
  # This data type is used in the following API operations:
857
936
  #
858
- # * [Retrieve request][1]
937
+ # * [InvokeAgent request][3]
859
938
  #
860
939
  # ^
861
940
  #
862
941
  #
863
942
  #
864
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax
943
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-returncontrol.html
944
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html
945
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_RequestSyntax
865
946
  #
866
947
  # @note InvocationResultMember is a union - when making an API calls you must set exactly one of the members.
867
948
  #
@@ -911,6 +992,11 @@ module Aws::BedrockAgentRuntime
911
992
  #
912
993
  # @!attribute [rw] input_text
913
994
  # The prompt text to send the agent.
995
+ #
996
+ # <note markdown="1"> If you include `returnControlInvocationResults` in the
997
+ # `sessionState` field, the `inputText` field will be ignored.
998
+ #
999
+ # </note>
914
1000
  # @return [String]
915
1001
  #
916
1002
  # @!attribute [rw] session_id
@@ -922,6 +1008,11 @@ module Aws::BedrockAgentRuntime
922
1008
  # Contains parameters that specify various attributes of the session.
923
1009
  # For more information, see [Control session context][1].
924
1010
  #
1011
+ # <note markdown="1"> If you include `returnControlInvocationResults` in the
1012
+ # `sessionState` field, the `inputText` field will be ignored.
1013
+ #
1014
+ # </note>
1015
+ #
925
1016
  #
926
1017
  #
927
1018
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html
@@ -1838,12 +1929,13 @@ module Aws::BedrockAgentRuntime
1838
1929
  #
1839
1930
  # * [RetrieveAndGenerate response][2] – in the `content` field
1840
1931
  #
1841
- # * [Retrieve response][1] – in the `content` field
1932
+ # * [InvokeAgent response][3] – in the `content` field
1842
1933
  #
1843
1934
  #
1844
1935
  #
1845
1936
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
1846
1937
  # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax
1938
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax
1847
1939
  #
1848
1940
  # @!attribute [rw] text
1849
1941
  # The cited text from the data source.
@@ -1865,12 +1957,13 @@ module Aws::BedrockAgentRuntime
1865
1957
  #
1866
1958
  # * [RetrieveAndGenerate response][2] – in the `location` field
1867
1959
  #
1868
- # * [Retrieve response][1] – in the `locatino` field
1960
+ # * [InvokeAgent response][3] – in the `locatino` field
1869
1961
  #
1870
1962
  #
1871
1963
  #
1872
1964
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
1873
1965
  # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax
1966
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax
1874
1967
  #
1875
1968
  # @!attribute [rw] s3_location
1876
1969
  # Contains the S3 location of the data source.
@@ -1897,12 +1990,13 @@ module Aws::BedrockAgentRuntime
1897
1990
  #
1898
1991
  # * [RetrieveAndGenerate response][2] – in the `s3Location` field
1899
1992
  #
1900
- # * [Retrieve response][1] – in the `s3Location` field
1993
+ # * [InvokeAgent response][3] – in the `s3Location` field
1901
1994
  #
1902
1995
  #
1903
1996
  #
1904
1997
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
1905
1998
  # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax
1999
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax
1906
2000
  #
1907
2001
  # @!attribute [rw] uri
1908
2002
  # The S3 URI of the data source.
@@ -2039,6 +2133,10 @@ module Aws::BedrockAgentRuntime
2039
2133
  # sources.
2040
2134
  # @return [Array<Types::Citation>]
2041
2135
  #
2136
+ # @!attribute [rw] guardrail_action
2137
+ # Specifies if there is a guardrail intervention in the response.
2138
+ # @return [String]
2139
+ #
2042
2140
  # @!attribute [rw] output
2043
2141
  # Contains the response generated from querying the knowledge base.
2044
2142
  # @return [Types::RetrieveAndGenerateOutput]
@@ -2052,6 +2150,7 @@ module Aws::BedrockAgentRuntime
2052
2150
  #
2053
2151
  class RetrieveAndGenerateResponse < Struct.new(
2054
2152
  :citations,
2153
+ :guardrail_action,
2055
2154
  :output,
2056
2155
  :session_id)
2057
2156
  SENSITIVE = [:output]
@@ -2143,12 +2242,12 @@ module Aws::BedrockAgentRuntime
2143
2242
  # * [RetrieveAndGenerate response][1] – in the `retrievedReferences`
2144
2243
  # field
2145
2244
  #
2146
- # * [Retrieve response][2] – in the `retrievedReferences` field
2245
+ # * [InvokeAgent response][2] – in the `retrievedReferences` field
2147
2246
  #
2148
2247
  #
2149
2248
  #
2150
2249
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax
2151
- # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
2250
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax
2152
2251
  #
2153
2252
  # @!attribute [rw] content
2154
2253
  # Contains the cited text from the data source.
@@ -2182,13 +2281,13 @@ module Aws::BedrockAgentRuntime
2182
2281
  #
2183
2282
  # This data type is used in the following API operations:
2184
2283
  #
2185
- # * [Retrieve response][1]
2284
+ # * [InvokeAgent response][1]
2186
2285
  #
2187
2286
  # ^
2188
2287
  #
2189
2288
  #
2190
2289
  #
2191
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
2290
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax
2192
2291
  #
2193
2292
  # @!attribute [rw] invocation_id
2194
2293
  # The identifier of the action group invocation.
@@ -2254,7 +2353,17 @@ module Aws::BedrockAgentRuntime
2254
2353
  # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html
2255
2354
  #
2256
2355
  # @!attribute [rw] invocation_id
2257
- # The identifier of the invocation.
2356
+ # The identifier of the invocation of an action. This value must match
2357
+ # the `invocationId` returned in the `InvokeAgent` response for the
2358
+ # action whose results are provided in the
2359
+ # `returnControlInvocationResults` field. For more information, see
2360
+ # [Return control to the agent developer][1] and [Control session
2361
+ # context][2].
2362
+ #
2363
+ #
2364
+ #
2365
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-returncontrol.html
2366
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html
2258
2367
  # @return [String]
2259
2368
  #
2260
2369
  # @!attribute [rw] prompt_session_attributes
@@ -2271,7 +2380,17 @@ module Aws::BedrockAgentRuntime
2271
2380
  #
2272
2381
  # @!attribute [rw] return_control_invocation_results
2273
2382
  # Contains information about the results from the action group
2274
- # invocation.
2383
+ # invocation. For more information, see [Return control to the agent
2384
+ # developer][1] and [Control session context][2].
2385
+ #
2386
+ # <note markdown="1"> If you include this field, the `inputText` field will be ignored.
2387
+ #
2388
+ # </note>
2389
+ #
2390
+ #
2391
+ #
2392
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-returncontrol.html
2393
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html
2275
2394
  # @return [Array<Types::InvocationResultMember>]
2276
2395
  #
2277
2396
  # @!attribute [rw] session_attributes
@@ -2297,12 +2416,12 @@ module Aws::BedrockAgentRuntime
2297
2416
  #
2298
2417
  # * [RetrieveAndGenerate response][1] – in the `span` field
2299
2418
  #
2300
- # * [Retrieve response][2] – in the `span` field
2419
+ # * [InvokeAgent response][2] – in the `span` field
2301
2420
  #
2302
2421
  #
2303
2422
  #
2304
2423
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax
2305
- # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
2424
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax
2306
2425
  #
2307
2426
  # @!attribute [rw] end
2308
2427
  # Where the text with a citation ends in the generated output.
@@ -2321,6 +2440,62 @@ module Aws::BedrockAgentRuntime
2321
2440
  include Aws::Structure
2322
2441
  end
2323
2442
 
2443
+ # Configuration settings for text generation using a language model via
2444
+ # the RetrieveAndGenerate operation. Includes parameters like
2445
+ # temperature, top-p, maximum token count, and stop sequences.
2446
+ #
2447
+ # <note markdown="1"> The valid range of `maxTokens` depends on the accepted values for your
2448
+ # chosen model's inference parameters. To see the inference parameters
2449
+ # for your model, see [Inference parameters for foundation models.][1]
2450
+ #
2451
+ # </note>
2452
+ #
2453
+ #
2454
+ #
2455
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html
2456
+ #
2457
+ # @!attribute [rw] max_tokens
2458
+ # The maximum number of tokens to generate in the output text. Do not
2459
+ # use the minimum of 0 or the maximum of 65536. The limit values
2460
+ # described here are arbitary values, for actual values consult the
2461
+ # limits defined by your specific model.
2462
+ # @return [Integer]
2463
+ #
2464
+ # @!attribute [rw] stop_sequences
2465
+ # A list of sequences of characters that, if generated, will cause the
2466
+ # model to stop generating further tokens. Do not use a minimum length
2467
+ # of 1 or a maximum length of 1000. The limit values described here
2468
+ # are arbitary values, for actual values consult the limits defined by
2469
+ # your specific model.
2470
+ # @return [Array<String>]
2471
+ #
2472
+ # @!attribute [rw] temperature
2473
+ # Controls the random-ness of text generated by the language model,
2474
+ # influencing how much the model sticks to the most predictable next
2475
+ # words versus exploring more surprising options. A lower temperature
2476
+ # value (e.g. 0.2 or 0.3) makes model outputs more deterministic or
2477
+ # predictable, while a higher temperature (e.g. 0.8 or 0.9) makes the
2478
+ # outputs more creative or unpredictable.
2479
+ # @return [Float]
2480
+ #
2481
+ # @!attribute [rw] top_p
2482
+ # A probability distribution threshold which controls what the model
2483
+ # considers for the set of possible next tokens. The model will only
2484
+ # consider the top p% of the probability distribution when generating
2485
+ # the next token.
2486
+ # @return [Float]
2487
+ #
2488
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/TextInferenceConfig AWS API Documentation
2489
+ #
2490
+ class TextInferenceConfig < Struct.new(
2491
+ :max_tokens,
2492
+ :stop_sequences,
2493
+ :temperature,
2494
+ :top_p)
2495
+ SENSITIVE = []
2496
+ include Aws::Structure
2497
+ end
2498
+
2324
2499
  # Contains the part of the generated text that contains a citation,
2325
2500
  # alongside where it begins and ends.
2326
2501
  #
@@ -2328,12 +2503,12 @@ module Aws::BedrockAgentRuntime
2328
2503
  #
2329
2504
  # * [RetrieveAndGenerate response][1] – in the `textResponsePart` field
2330
2505
  #
2331
- # * [Retrieve response][2] – in the `textResponsePart` field
2506
+ # * [InvokeAgent response][2] – in the `textResponsePart` field
2332
2507
  #
2333
2508
  #
2334
2509
  #
2335
2510
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax
2336
- # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
2511
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax
2337
2512
  #
2338
2513
  # @!attribute [rw] span
2339
2514
  # Contains information about where the text with a citation begins and
@@ -53,6 +53,6 @@ require_relative 'aws-sdk-bedrockagentruntime/event_streams'
53
53
  # @!group service
54
54
  module Aws::BedrockAgentRuntime
55
55
 
56
- GEM_VERSION = '1.7.0'
56
+ GEM_VERSION = '1.8.0'
57
57
 
58
58
  end
data/sig/client.rbs CHANGED
@@ -196,6 +196,7 @@ module Aws
196
196
  interface _RetrieveAndGenerateResponseSuccess
197
197
  include ::Seahorse::Client::_ResponseSuccess[Types::RetrieveAndGenerateResponse]
198
198
  def citations: () -> ::Array[Types::Citation]
199
+ def guardrail_action: () -> ("INTERVENED" | "NONE")
199
200
  def output: () -> Types::RetrieveAndGenerateOutput
200
201
  def session_id: () -> ::String
201
202
  end
@@ -207,6 +208,20 @@ module Aws
207
208
  ?retrieve_and_generate_configuration: {
208
209
  external_sources_configuration: {
209
210
  generation_configuration: {
211
+ additional_model_request_fields: Hash[::String, {
212
+ }]?,
213
+ guardrail_configuration: {
214
+ guardrail_id: ::String,
215
+ guardrail_version: ::String
216
+ }?,
217
+ inference_config: {
218
+ text_inference_config: {
219
+ max_tokens: ::Integer?,
220
+ stop_sequences: Array[::String]?,
221
+ temperature: ::Float?,
222
+ top_p: ::Float?
223
+ }?
224
+ }?,
210
225
  prompt_template: {
211
226
  text_prompt_template: ::String?
212
227
  }?
@@ -228,6 +243,20 @@ module Aws
228
243
  }?,
229
244
  knowledge_base_configuration: {
230
245
  generation_configuration: {
246
+ additional_model_request_fields: Hash[::String, {
247
+ }]?,
248
+ guardrail_configuration: {
249
+ guardrail_id: ::String,
250
+ guardrail_version: ::String
251
+ }?,
252
+ inference_config: {
253
+ text_inference_config: {
254
+ max_tokens: ::Integer?,
255
+ stop_sequences: Array[::String]?,
256
+ temperature: ::Float?,
257
+ top_p: ::Float?
258
+ }?
259
+ }?,
231
260
  prompt_template: {
232
261
  text_prompt_template: ::String?
233
262
  }?
data/sig/types.rbs CHANGED
@@ -111,6 +111,9 @@ module Aws::BedrockAgentRuntime
111
111
  end
112
112
 
113
113
  class ExternalSourcesGenerationConfiguration
114
+ attr_accessor additional_model_request_fields: ::Hash[::String, untyped]
115
+ attr_accessor guardrail_configuration: Types::GuardrailConfiguration
116
+ attr_accessor inference_config: Types::InferenceConfig
114
117
  attr_accessor prompt_template: Types::PromptTemplate
115
118
  SENSITIVE: []
116
119
  end
@@ -167,10 +170,24 @@ module Aws::BedrockAgentRuntime
167
170
  end
168
171
 
169
172
  class GenerationConfiguration
173
+ attr_accessor additional_model_request_fields: ::Hash[::String, untyped]
174
+ attr_accessor guardrail_configuration: Types::GuardrailConfiguration
175
+ attr_accessor inference_config: Types::InferenceConfig
170
176
  attr_accessor prompt_template: Types::PromptTemplate
171
177
  SENSITIVE: []
172
178
  end
173
179
 
180
+ class GuardrailConfiguration
181
+ attr_accessor guardrail_id: ::String
182
+ attr_accessor guardrail_version: ::String
183
+ SENSITIVE: []
184
+ end
185
+
186
+ class InferenceConfig
187
+ attr_accessor text_inference_config: Types::TextInferenceConfig
188
+ SENSITIVE: []
189
+ end
190
+
174
191
  class InferenceConfiguration
175
192
  attr_accessor maximum_length: ::Integer
176
193
  attr_accessor stop_sequences: ::Array[::String]
@@ -507,6 +524,7 @@ module Aws::BedrockAgentRuntime
507
524
 
508
525
  class RetrieveAndGenerateResponse
509
526
  attr_accessor citations: ::Array[Types::Citation]
527
+ attr_accessor guardrail_action: ("INTERVENED" | "NONE")
510
528
  attr_accessor output: Types::RetrieveAndGenerateOutput
511
529
  attr_accessor session_id: ::String
512
530
  SENSITIVE: [:output]
@@ -570,6 +588,14 @@ module Aws::BedrockAgentRuntime
570
588
  SENSITIVE: []
571
589
  end
572
590
 
591
+ class TextInferenceConfig
592
+ attr_accessor max_tokens: ::Integer
593
+ attr_accessor stop_sequences: ::Array[::String]
594
+ attr_accessor temperature: ::Float
595
+ attr_accessor top_p: ::Float
596
+ SENSITIVE: []
597
+ end
598
+
573
599
  class TextResponsePart
574
600
  attr_accessor span: Types::Span
575
601
  attr_accessor text: ::String
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.7.0
4
+ version: 1.8.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-04-25 00:00:00.000000000 Z
11
+ date: 2024-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core