aws-sdk-bedrockagentruntime 1.2.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.2.0'
56
+ GEM_VERSION = '1.4.0'
57
57
 
58
58
  end
data/sig/client.rbs CHANGED
@@ -83,55 +83,58 @@ module Aws
83
83
  end
84
84
  # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockAgentRuntime/Client.html#invoke_agent-instance_method
85
85
  def invoke_agent: (
86
- ?session_state: {
87
- session_attributes: Hash[::String, ::String]?,
88
- prompt_session_attributes: Hash[::String, ::String]?
89
- },
90
- agent_id: ::String,
91
86
  agent_alias_id: ::String,
92
- session_id: ::String,
93
- ?end_session: bool,
87
+ agent_id: ::String,
94
88
  ?enable_trace: bool,
95
- input_text: ::String
89
+ ?end_session: bool,
90
+ input_text: ::String,
91
+ session_id: ::String,
92
+ ?session_state: {
93
+ prompt_session_attributes: Hash[::String, ::String]?,
94
+ session_attributes: Hash[::String, ::String]?
95
+ }
96
96
  ) ?{ (*untyped) -> void } -> _InvokeAgentResponseSuccess
97
97
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _InvokeAgentResponseSuccess
98
98
 
99
99
  interface _RetrieveResponseSuccess
100
100
  include ::Seahorse::Client::_ResponseSuccess[Types::RetrieveResponse]
101
- def retrieval_results: () -> ::Array[Types::KnowledgeBaseRetrievalResult]
102
101
  def next_token: () -> ::String
102
+ def retrieval_results: () -> ::Array[Types::KnowledgeBaseRetrievalResult]
103
103
  end
104
104
  # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockAgentRuntime/Client.html#retrieve-instance_method
105
105
  def retrieve: (
106
106
  knowledge_base_id: ::String,
107
- retrieval_query: {
108
- text: ::String
109
- },
107
+ ?next_token: ::String,
110
108
  ?retrieval_configuration: {
111
109
  vector_search_configuration: {
112
110
  number_of_results: ::Integer?,
113
111
  override_search_type: ("HYBRID" | "SEMANTIC")?
114
112
  }
115
113
  },
116
- ?next_token: ::String
114
+ retrieval_query: {
115
+ text: ::String
116
+ }
117
117
  ) -> _RetrieveResponseSuccess
118
118
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _RetrieveResponseSuccess
119
119
 
120
120
  interface _RetrieveAndGenerateResponseSuccess
121
121
  include ::Seahorse::Client::_ResponseSuccess[Types::RetrieveAndGenerateResponse]
122
- def session_id: () -> ::String
123
- def output: () -> Types::RetrieveAndGenerateOutput
124
122
  def citations: () -> ::Array[Types::Citation]
123
+ def output: () -> Types::RetrieveAndGenerateOutput
124
+ def session_id: () -> ::String
125
125
  end
126
126
  # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockAgentRuntime/Client.html#retrieve_and_generate-instance_method
127
127
  def retrieve_and_generate: (
128
- ?session_id: ::String,
129
128
  input: {
130
129
  text: ::String
131
130
  },
132
131
  ?retrieve_and_generate_configuration: {
133
- type: ("KNOWLEDGE_BASE"),
134
132
  knowledge_base_configuration: {
133
+ generation_configuration: {
134
+ prompt_template: {
135
+ text_prompt_template: ::String?
136
+ }?
137
+ }?,
135
138
  knowledge_base_id: ::String,
136
139
  model_arn: ::String,
137
140
  retrieval_configuration: {
@@ -140,11 +143,13 @@ module Aws
140
143
  override_search_type: ("HYBRID" | "SEMANTIC")?
141
144
  }
142
145
  }?
143
- }?
146
+ }?,
147
+ type: ("KNOWLEDGE_BASE")
144
148
  },
145
149
  ?session_configuration: {
146
150
  kms_key_arn: ::String
147
- }
151
+ },
152
+ ?session_id: ::String
148
153
  ) -> _RetrieveAndGenerateResponseSuccess
149
154
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _RetrieveAndGenerateResponseSuccess
150
155
  end
data/sig/types.rbs CHANGED
@@ -16,11 +16,11 @@ module Aws::BedrockAgentRuntime
16
16
 
17
17
  class ActionGroupInvocationInput
18
18
  attr_accessor action_group_name: ::String
19
- attr_accessor verb: ::String
20
19
  attr_accessor api_path: ::String
21
20
  attr_accessor parameters: ::Array[Types::Parameter]
22
21
  attr_accessor request_body: Types::RequestBody
23
- SENSITIVE: [:action_group_name, :verb, :api_path]
22
+ attr_accessor verb: ::String
23
+ SENSITIVE: [:action_group_name, :api_path, :verb]
24
24
  end
25
25
 
26
26
  class ActionGroupInvocationOutput
@@ -60,8 +60,8 @@ module Aws::BedrockAgentRuntime
60
60
  end
61
61
 
62
62
  class FailureTrace
63
- attr_accessor trace_id: ::String
64
63
  attr_accessor failure_reason: ::String
64
+ attr_accessor trace_id: ::String
65
65
  SENSITIVE: [:failure_reason]
66
66
  end
67
67
 
@@ -75,12 +75,17 @@ module Aws::BedrockAgentRuntime
75
75
  SENSITIVE: [:text_response_part]
76
76
  end
77
77
 
78
+ class GenerationConfiguration
79
+ attr_accessor prompt_template: Types::PromptTemplate
80
+ SENSITIVE: []
81
+ end
82
+
78
83
  class InferenceConfiguration
79
- attr_accessor temperature: ::Float
80
- attr_accessor top_p: ::Float
81
- attr_accessor top_k: ::Integer
82
84
  attr_accessor maximum_length: ::Integer
83
85
  attr_accessor stop_sequences: ::Array[::String]
86
+ attr_accessor temperature: ::Float
87
+ attr_accessor top_k: ::Integer
88
+ attr_accessor top_p: ::Float
84
89
  SENSITIVE: []
85
90
  end
86
91
 
@@ -91,21 +96,21 @@ module Aws::BedrockAgentRuntime
91
96
  end
92
97
 
93
98
  class InvocationInput
94
- attr_accessor trace_id: ::String
95
- attr_accessor invocation_type: ("ACTION_GROUP" | "KNOWLEDGE_BASE" | "FINISH")
96
99
  attr_accessor action_group_invocation_input: Types::ActionGroupInvocationInput
100
+ attr_accessor invocation_type: ("ACTION_GROUP" | "KNOWLEDGE_BASE" | "FINISH")
97
101
  attr_accessor knowledge_base_lookup_input: Types::KnowledgeBaseLookupInput
102
+ attr_accessor trace_id: ::String
98
103
  SENSITIVE: []
99
104
  end
100
105
 
101
106
  class InvokeAgentRequest
102
- attr_accessor session_state: Types::SessionState
103
- attr_accessor agent_id: ::String
104
107
  attr_accessor agent_alias_id: ::String
105
- attr_accessor session_id: ::String
106
- attr_accessor end_session: bool
108
+ attr_accessor agent_id: ::String
107
109
  attr_accessor enable_trace: bool
110
+ attr_accessor end_session: bool
108
111
  attr_accessor input_text: ::String
112
+ attr_accessor session_id: ::String
113
+ attr_accessor session_state: Types::SessionState
109
114
  SENSITIVE: [:input_text]
110
115
  end
111
116
 
@@ -117,9 +122,9 @@ module Aws::BedrockAgentRuntime
117
122
  end
118
123
 
119
124
  class KnowledgeBaseLookupInput
120
- attr_accessor text: ::String
121
125
  attr_accessor knowledge_base_id: ::String
122
- SENSITIVE: [:text, :knowledge_base_id]
126
+ attr_accessor text: ::String
127
+ SENSITIVE: [:knowledge_base_id, :text]
123
128
  end
124
129
 
125
130
  class KnowledgeBaseLookupOutput
@@ -145,6 +150,7 @@ module Aws::BedrockAgentRuntime
145
150
  end
146
151
 
147
152
  class KnowledgeBaseRetrieveAndGenerateConfiguration
153
+ attr_accessor generation_configuration: Types::GenerationConfiguration
148
154
  attr_accessor knowledge_base_id: ::String
149
155
  attr_accessor model_arn: ::String
150
156
  attr_accessor retrieval_configuration: Types::KnowledgeBaseRetrievalConfiguration
@@ -158,41 +164,41 @@ module Aws::BedrockAgentRuntime
158
164
  end
159
165
 
160
166
  class ModelInvocationInput
161
- attr_accessor trace_id: ::String
162
- attr_accessor text: ::String
163
- attr_accessor type: ("PRE_PROCESSING" | "ORCHESTRATION" | "KNOWLEDGE_BASE_RESPONSE_GENERATION" | "POST_PROCESSING")
164
167
  attr_accessor inference_configuration: Types::InferenceConfiguration
165
168
  attr_accessor override_lambda: ::String
166
- attr_accessor prompt_creation_mode: ("DEFAULT" | "OVERRIDDEN")
167
169
  attr_accessor parser_mode: ("DEFAULT" | "OVERRIDDEN")
170
+ attr_accessor prompt_creation_mode: ("DEFAULT" | "OVERRIDDEN")
171
+ attr_accessor text: ::String
172
+ attr_accessor trace_id: ::String
173
+ attr_accessor type: ("PRE_PROCESSING" | "ORCHESTRATION" | "KNOWLEDGE_BASE_RESPONSE_GENERATION" | "POST_PROCESSING")
168
174
  SENSITIVE: [:text]
169
175
  end
170
176
 
171
177
  class Observation
172
- attr_accessor trace_id: ::String
173
- attr_accessor type: ("ACTION_GROUP" | "KNOWLEDGE_BASE" | "FINISH" | "ASK_USER" | "REPROMPT")
174
178
  attr_accessor action_group_invocation_output: Types::ActionGroupInvocationOutput
175
- attr_accessor knowledge_base_lookup_output: Types::KnowledgeBaseLookupOutput
176
179
  attr_accessor final_response: Types::FinalResponse
180
+ attr_accessor knowledge_base_lookup_output: Types::KnowledgeBaseLookupOutput
177
181
  attr_accessor reprompt_response: Types::RepromptResponse
182
+ attr_accessor trace_id: ::String
183
+ attr_accessor type: ("ACTION_GROUP" | "KNOWLEDGE_BASE" | "FINISH" | "ASK_USER" | "REPROMPT")
178
184
  SENSITIVE: [:reprompt_response]
179
185
  end
180
186
 
181
187
  class OrchestrationTrace
182
- attr_accessor rationale: Types::Rationale
183
188
  attr_accessor invocation_input: Types::InvocationInput
184
- attr_accessor observation: Types::Observation
185
189
  attr_accessor model_invocation_input: Types::ModelInvocationInput
190
+ attr_accessor observation: Types::Observation
191
+ attr_accessor rationale: Types::Rationale
186
192
  attr_accessor unknown: untyped
187
- SENSITIVE: [:rationale, :invocation_input, :observation, :model_invocation_input]
193
+ SENSITIVE: [:invocation_input, :model_invocation_input, :observation, :rationale]
188
194
 
189
- class Rationale < OrchestrationTrace
190
- end
191
195
  class InvocationInput < OrchestrationTrace
192
196
  end
197
+ class ModelInvocationInput < OrchestrationTrace
198
+ end
193
199
  class Observation < OrchestrationTrace
194
200
  end
195
- class ModelInvocationInput < OrchestrationTrace
201
+ class Rationale < OrchestrationTrace
196
202
  end
197
203
  class Unknown < OrchestrationTrace
198
204
  end
@@ -206,15 +212,15 @@ module Aws::BedrockAgentRuntime
206
212
  end
207
213
 
208
214
  class PayloadPart
209
- attr_accessor bytes: ::String
210
215
  attr_accessor attribution: Types::Attribution
216
+ attr_accessor bytes: ::String
211
217
  attr_accessor event_type: untyped
212
218
  SENSITIVE: [:bytes]
213
219
  end
214
220
 
215
221
  class PostProcessingModelInvocationOutput
216
- attr_accessor trace_id: ::String
217
222
  attr_accessor parsed_response: Types::PostProcessingParsedResponse
223
+ attr_accessor trace_id: ::String
218
224
  SENSITIVE: [:parsed_response]
219
225
  end
220
226
 
@@ -238,14 +244,14 @@ module Aws::BedrockAgentRuntime
238
244
  end
239
245
 
240
246
  class PreProcessingModelInvocationOutput
241
- attr_accessor trace_id: ::String
242
247
  attr_accessor parsed_response: Types::PreProcessingParsedResponse
248
+ attr_accessor trace_id: ::String
243
249
  SENSITIVE: [:parsed_response]
244
250
  end
245
251
 
246
252
  class PreProcessingParsedResponse
247
- attr_accessor rationale: ::String
248
253
  attr_accessor is_valid: bool
254
+ attr_accessor rationale: ::String
249
255
  SENSITIVE: [:rationale]
250
256
  end
251
257
 
@@ -263,15 +269,20 @@ module Aws::BedrockAgentRuntime
263
269
  end
264
270
  end
265
271
 
272
+ class PromptTemplate
273
+ attr_accessor text_prompt_template: ::String
274
+ SENSITIVE: [:text_prompt_template]
275
+ end
276
+
266
277
  class Rationale
267
- attr_accessor trace_id: ::String
268
278
  attr_accessor text: ::String
279
+ attr_accessor trace_id: ::String
269
280
  SENSITIVE: [:text]
270
281
  end
271
282
 
272
283
  class RepromptResponse
273
- attr_accessor text: ::String
274
284
  attr_accessor source: ("ACTION_GROUP" | "KNOWLEDGE_BASE" | "PARSER")
285
+ attr_accessor text: ::String
275
286
  SENSITIVE: [:source]
276
287
  end
277
288
 
@@ -292,8 +303,8 @@ module Aws::BedrockAgentRuntime
292
303
  end
293
304
 
294
305
  class RetrievalResultLocation
295
- attr_accessor type: ("S3")
296
306
  attr_accessor s3_location: Types::RetrievalResultS3Location
307
+ attr_accessor type: ("S3")
297
308
  SENSITIVE: []
298
309
  end
299
310
 
@@ -303,8 +314,8 @@ module Aws::BedrockAgentRuntime
303
314
  end
304
315
 
305
316
  class RetrieveAndGenerateConfiguration
306
- attr_accessor type: ("KNOWLEDGE_BASE")
307
317
  attr_accessor knowledge_base_configuration: Types::KnowledgeBaseRetrieveAndGenerateConfiguration
318
+ attr_accessor type: ("KNOWLEDGE_BASE")
308
319
  SENSITIVE: []
309
320
  end
310
321
 
@@ -319,17 +330,17 @@ module Aws::BedrockAgentRuntime
319
330
  end
320
331
 
321
332
  class RetrieveAndGenerateRequest
322
- attr_accessor session_id: ::String
323
333
  attr_accessor input: Types::RetrieveAndGenerateInput
324
334
  attr_accessor retrieve_and_generate_configuration: Types::RetrieveAndGenerateConfiguration
325
335
  attr_accessor session_configuration: Types::RetrieveAndGenerateSessionConfiguration
336
+ attr_accessor session_id: ::String
326
337
  SENSITIVE: [:input]
327
338
  end
328
339
 
329
340
  class RetrieveAndGenerateResponse
330
- attr_accessor session_id: ::String
331
- attr_accessor output: Types::RetrieveAndGenerateOutput
332
341
  attr_accessor citations: ::Array[Types::Citation]
342
+ attr_accessor output: Types::RetrieveAndGenerateOutput
343
+ attr_accessor session_id: ::String
333
344
  SENSITIVE: [:output]
334
345
  end
335
346
 
@@ -340,15 +351,15 @@ module Aws::BedrockAgentRuntime
340
351
 
341
352
  class RetrieveRequest
342
353
  attr_accessor knowledge_base_id: ::String
343
- attr_accessor retrieval_query: Types::KnowledgeBaseQuery
344
- attr_accessor retrieval_configuration: Types::KnowledgeBaseRetrievalConfiguration
345
354
  attr_accessor next_token: ::String
355
+ attr_accessor retrieval_configuration: Types::KnowledgeBaseRetrievalConfiguration
356
+ attr_accessor retrieval_query: Types::KnowledgeBaseQuery
346
357
  SENSITIVE: [:retrieval_query]
347
358
  end
348
359
 
349
360
  class RetrieveResponse
350
- attr_accessor retrieval_results: ::Array[Types::KnowledgeBaseRetrievalResult]
351
361
  attr_accessor next_token: ::String
362
+ attr_accessor retrieval_results: ::Array[Types::KnowledgeBaseRetrievalResult]
352
363
  SENSITIVE: [:retrieval_results]
353
364
  end
354
365
 
@@ -365,20 +376,20 @@ module Aws::BedrockAgentRuntime
365
376
  end
366
377
 
367
378
  class SessionState
368
- attr_accessor session_attributes: ::Hash[::String, ::String]
369
379
  attr_accessor prompt_session_attributes: ::Hash[::String, ::String]
380
+ attr_accessor session_attributes: ::Hash[::String, ::String]
370
381
  SENSITIVE: []
371
382
  end
372
383
 
373
384
  class Span
374
- attr_accessor start: ::Integer
375
385
  attr_accessor end: ::Integer
386
+ attr_accessor start: ::Integer
376
387
  SENSITIVE: []
377
388
  end
378
389
 
379
390
  class TextResponsePart
380
- attr_accessor text: ::String
381
391
  attr_accessor span: Types::Span
392
+ attr_accessor text: ::String
382
393
  SENSITIVE: []
383
394
  end
384
395
 
@@ -389,28 +400,28 @@ module Aws::BedrockAgentRuntime
389
400
  end
390
401
 
391
402
  class Trace
392
- attr_accessor pre_processing_trace: Types::PreProcessingTrace
403
+ attr_accessor failure_trace: Types::FailureTrace
393
404
  attr_accessor orchestration_trace: Types::OrchestrationTrace
394
405
  attr_accessor post_processing_trace: Types::PostProcessingTrace
395
- attr_accessor failure_trace: Types::FailureTrace
406
+ attr_accessor pre_processing_trace: Types::PreProcessingTrace
396
407
  attr_accessor unknown: untyped
397
- SENSITIVE: [:pre_processing_trace, :orchestration_trace, :post_processing_trace, :failure_trace]
408
+ SENSITIVE: [:failure_trace, :orchestration_trace, :post_processing_trace, :pre_processing_trace]
398
409
 
399
- class PreProcessingTrace < Trace
410
+ class FailureTrace < Trace
400
411
  end
401
412
  class OrchestrationTrace < Trace
402
413
  end
403
414
  class PostProcessingTrace < Trace
404
415
  end
405
- class FailureTrace < Trace
416
+ class PreProcessingTrace < Trace
406
417
  end
407
418
  class Unknown < Trace
408
419
  end
409
420
  end
410
421
 
411
422
  class TracePart
412
- attr_accessor agent_id: ::String
413
423
  attr_accessor agent_alias_id: ::String
424
+ attr_accessor agent_id: ::String
414
425
  attr_accessor session_id: ::String
415
426
  attr_accessor trace: Types::Trace
416
427
  attr_accessor event_type: untyped
@@ -424,7 +435,7 @@ module Aws::BedrockAgentRuntime
424
435
  end
425
436
 
426
437
  class ResponseStream < Enumerator[untyped, untyped]
427
- def event_types: () -> [:chunk, :trace, :internal_server_exception, :validation_exception, :resource_not_found_exception, :service_quota_exceeded_exception, :throttling_exception, :access_denied_exception, :conflict_exception, :dependency_failed_exception, :bad_gateway_exception]
438
+ def event_types: () -> [:access_denied_exception, :bad_gateway_exception, :chunk, :conflict_exception, :dependency_failed_exception, :internal_server_exception, :resource_not_found_exception, :service_quota_exceeded_exception, :throttling_exception, :trace, :validation_exception]
428
439
  end
429
440
  end
430
441
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-bedrockagentruntime
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.4.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-02-28 00:00:00.000000000 Z
11
+ date: 2024-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core