aws-sdk-bedrockagentruntime 1.1.0 → 1.3.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.1.0'
56
+ GEM_VERSION = '1.3.0'
57
57
 
58
58
  end
data/sig/client.rbs CHANGED
@@ -83,61 +83,68 @@ 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
- number_of_results: ::Integer
110
+ number_of_results: ::Integer?,
111
+ override_search_type: ("HYBRID" | "SEMANTIC")?
113
112
  }
114
113
  },
115
- ?next_token: ::String
114
+ retrieval_query: {
115
+ text: ::String
116
+ }
116
117
  ) -> _RetrieveResponseSuccess
117
118
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _RetrieveResponseSuccess
118
119
 
119
120
  interface _RetrieveAndGenerateResponseSuccess
120
121
  include ::Seahorse::Client::_ResponseSuccess[Types::RetrieveAndGenerateResponse]
121
- def session_id: () -> ::String
122
- def output: () -> Types::RetrieveAndGenerateOutput
123
122
  def citations: () -> ::Array[Types::Citation]
123
+ def output: () -> Types::RetrieveAndGenerateOutput
124
+ def session_id: () -> ::String
124
125
  end
125
126
  # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockAgentRuntime/Client.html#retrieve_and_generate-instance_method
126
127
  def retrieve_and_generate: (
127
- ?session_id: ::String,
128
128
  input: {
129
129
  text: ::String
130
130
  },
131
131
  ?retrieve_and_generate_configuration: {
132
- type: ("KNOWLEDGE_BASE"),
133
132
  knowledge_base_configuration: {
134
133
  knowledge_base_id: ::String,
135
- model_arn: ::String
136
- }?
134
+ model_arn: ::String,
135
+ retrieval_configuration: {
136
+ vector_search_configuration: {
137
+ number_of_results: ::Integer?,
138
+ override_search_type: ("HYBRID" | "SEMANTIC")?
139
+ }
140
+ }?
141
+ }?,
142
+ type: ("KNOWLEDGE_BASE")
137
143
  },
138
144
  ?session_configuration: {
139
145
  kms_key_arn: ::String
140
- }
146
+ },
147
+ ?session_id: ::String
141
148
  ) -> _RetrieveAndGenerateResponseSuccess
142
149
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _RetrieveAndGenerateResponseSuccess
143
150
  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
 
@@ -72,15 +72,15 @@ module Aws::BedrockAgentRuntime
72
72
 
73
73
  class GeneratedResponsePart
74
74
  attr_accessor text_response_part: Types::TextResponsePart
75
- SENSITIVE: []
75
+ SENSITIVE: [:text_response_part]
76
76
  end
77
77
 
78
78
  class InferenceConfiguration
79
- attr_accessor temperature: ::Float
80
- attr_accessor top_p: ::Float
81
- attr_accessor top_k: ::Integer
82
79
  attr_accessor maximum_length: ::Integer
83
80
  attr_accessor stop_sequences: ::Array[::String]
81
+ attr_accessor temperature: ::Float
82
+ attr_accessor top_k: ::Integer
83
+ attr_accessor top_p: ::Float
84
84
  SENSITIVE: []
85
85
  end
86
86
 
@@ -91,21 +91,21 @@ module Aws::BedrockAgentRuntime
91
91
  end
92
92
 
93
93
  class InvocationInput
94
- attr_accessor trace_id: ::String
95
- attr_accessor invocation_type: ("ACTION_GROUP" | "KNOWLEDGE_BASE" | "FINISH")
96
94
  attr_accessor action_group_invocation_input: Types::ActionGroupInvocationInput
95
+ attr_accessor invocation_type: ("ACTION_GROUP" | "KNOWLEDGE_BASE" | "FINISH")
97
96
  attr_accessor knowledge_base_lookup_input: Types::KnowledgeBaseLookupInput
97
+ attr_accessor trace_id: ::String
98
98
  SENSITIVE: []
99
99
  end
100
100
 
101
101
  class InvokeAgentRequest
102
- attr_accessor session_state: Types::SessionState
103
- attr_accessor agent_id: ::String
104
102
  attr_accessor agent_alias_id: ::String
105
- attr_accessor session_id: ::String
106
- attr_accessor end_session: bool
103
+ attr_accessor agent_id: ::String
107
104
  attr_accessor enable_trace: bool
105
+ attr_accessor end_session: bool
108
106
  attr_accessor input_text: ::String
107
+ attr_accessor session_id: ::String
108
+ attr_accessor session_state: Types::SessionState
109
109
  SENSITIVE: [:input_text]
110
110
  end
111
111
 
@@ -117,9 +117,9 @@ module Aws::BedrockAgentRuntime
117
117
  end
118
118
 
119
119
  class KnowledgeBaseLookupInput
120
- attr_accessor text: ::String
121
120
  attr_accessor knowledge_base_id: ::String
122
- SENSITIVE: [:text, :knowledge_base_id]
121
+ attr_accessor text: ::String
122
+ SENSITIVE: [:knowledge_base_id, :text]
123
123
  end
124
124
 
125
125
  class KnowledgeBaseLookupOutput
@@ -141,56 +141,58 @@ module Aws::BedrockAgentRuntime
141
141
  attr_accessor content: Types::RetrievalResultContent
142
142
  attr_accessor location: Types::RetrievalResultLocation
143
143
  attr_accessor score: ::Float
144
- SENSITIVE: []
144
+ SENSITIVE: [:content, :location]
145
145
  end
146
146
 
147
147
  class KnowledgeBaseRetrieveAndGenerateConfiguration
148
148
  attr_accessor knowledge_base_id: ::String
149
149
  attr_accessor model_arn: ::String
150
+ attr_accessor retrieval_configuration: Types::KnowledgeBaseRetrievalConfiguration
150
151
  SENSITIVE: []
151
152
  end
152
153
 
153
154
  class KnowledgeBaseVectorSearchConfiguration
154
155
  attr_accessor number_of_results: ::Integer
156
+ attr_accessor override_search_type: ("HYBRID" | "SEMANTIC")
155
157
  SENSITIVE: []
156
158
  end
157
159
 
158
160
  class ModelInvocationInput
159
- attr_accessor trace_id: ::String
160
- attr_accessor text: ::String
161
- attr_accessor type: ("PRE_PROCESSING" | "ORCHESTRATION" | "KNOWLEDGE_BASE_RESPONSE_GENERATION" | "POST_PROCESSING")
162
161
  attr_accessor inference_configuration: Types::InferenceConfiguration
163
162
  attr_accessor override_lambda: ::String
164
- attr_accessor prompt_creation_mode: ("DEFAULT" | "OVERRIDDEN")
165
163
  attr_accessor parser_mode: ("DEFAULT" | "OVERRIDDEN")
164
+ attr_accessor prompt_creation_mode: ("DEFAULT" | "OVERRIDDEN")
165
+ attr_accessor text: ::String
166
+ attr_accessor trace_id: ::String
167
+ attr_accessor type: ("PRE_PROCESSING" | "ORCHESTRATION" | "KNOWLEDGE_BASE_RESPONSE_GENERATION" | "POST_PROCESSING")
166
168
  SENSITIVE: [:text]
167
169
  end
168
170
 
169
171
  class Observation
170
- attr_accessor trace_id: ::String
171
- attr_accessor type: ("ACTION_GROUP" | "KNOWLEDGE_BASE" | "FINISH" | "ASK_USER" | "REPROMPT")
172
172
  attr_accessor action_group_invocation_output: Types::ActionGroupInvocationOutput
173
- attr_accessor knowledge_base_lookup_output: Types::KnowledgeBaseLookupOutput
174
173
  attr_accessor final_response: Types::FinalResponse
174
+ attr_accessor knowledge_base_lookup_output: Types::KnowledgeBaseLookupOutput
175
175
  attr_accessor reprompt_response: Types::RepromptResponse
176
+ attr_accessor trace_id: ::String
177
+ attr_accessor type: ("ACTION_GROUP" | "KNOWLEDGE_BASE" | "FINISH" | "ASK_USER" | "REPROMPT")
176
178
  SENSITIVE: [:reprompt_response]
177
179
  end
178
180
 
179
181
  class OrchestrationTrace
180
- attr_accessor rationale: Types::Rationale
181
182
  attr_accessor invocation_input: Types::InvocationInput
182
- attr_accessor observation: Types::Observation
183
183
  attr_accessor model_invocation_input: Types::ModelInvocationInput
184
+ attr_accessor observation: Types::Observation
185
+ attr_accessor rationale: Types::Rationale
184
186
  attr_accessor unknown: untyped
185
- SENSITIVE: [:rationale, :invocation_input, :observation, :model_invocation_input]
187
+ SENSITIVE: [:invocation_input, :model_invocation_input, :observation, :rationale]
186
188
 
187
- class Rationale < OrchestrationTrace
188
- end
189
189
  class InvocationInput < OrchestrationTrace
190
190
  end
191
+ class ModelInvocationInput < OrchestrationTrace
192
+ end
191
193
  class Observation < OrchestrationTrace
192
194
  end
193
- class ModelInvocationInput < OrchestrationTrace
195
+ class Rationale < OrchestrationTrace
194
196
  end
195
197
  class Unknown < OrchestrationTrace
196
198
  end
@@ -204,15 +206,15 @@ module Aws::BedrockAgentRuntime
204
206
  end
205
207
 
206
208
  class PayloadPart
207
- attr_accessor bytes: ::String
208
209
  attr_accessor attribution: Types::Attribution
210
+ attr_accessor bytes: ::String
209
211
  attr_accessor event_type: untyped
210
212
  SENSITIVE: [:bytes]
211
213
  end
212
214
 
213
215
  class PostProcessingModelInvocationOutput
214
- attr_accessor trace_id: ::String
215
216
  attr_accessor parsed_response: Types::PostProcessingParsedResponse
217
+ attr_accessor trace_id: ::String
216
218
  SENSITIVE: [:parsed_response]
217
219
  end
218
220
 
@@ -236,14 +238,14 @@ module Aws::BedrockAgentRuntime
236
238
  end
237
239
 
238
240
  class PreProcessingModelInvocationOutput
239
- attr_accessor trace_id: ::String
240
241
  attr_accessor parsed_response: Types::PreProcessingParsedResponse
242
+ attr_accessor trace_id: ::String
241
243
  SENSITIVE: [:parsed_response]
242
244
  end
243
245
 
244
246
  class PreProcessingParsedResponse
245
- attr_accessor rationale: ::String
246
247
  attr_accessor is_valid: bool
248
+ attr_accessor rationale: ::String
247
249
  SENSITIVE: [:rationale]
248
250
  end
249
251
 
@@ -262,14 +264,14 @@ module Aws::BedrockAgentRuntime
262
264
  end
263
265
 
264
266
  class Rationale
265
- attr_accessor trace_id: ::String
266
267
  attr_accessor text: ::String
268
+ attr_accessor trace_id: ::String
267
269
  SENSITIVE: [:text]
268
270
  end
269
271
 
270
272
  class RepromptResponse
271
- attr_accessor text: ::String
272
273
  attr_accessor source: ("ACTION_GROUP" | "KNOWLEDGE_BASE" | "PARSER")
274
+ attr_accessor text: ::String
273
275
  SENSITIVE: [:source]
274
276
  end
275
277
 
@@ -290,8 +292,8 @@ module Aws::BedrockAgentRuntime
290
292
  end
291
293
 
292
294
  class RetrievalResultLocation
293
- attr_accessor type: ("S3")
294
295
  attr_accessor s3_location: Types::RetrievalResultS3Location
296
+ attr_accessor type: ("S3")
295
297
  SENSITIVE: []
296
298
  end
297
299
 
@@ -301,8 +303,8 @@ module Aws::BedrockAgentRuntime
301
303
  end
302
304
 
303
305
  class RetrieveAndGenerateConfiguration
304
- attr_accessor type: ("KNOWLEDGE_BASE")
305
306
  attr_accessor knowledge_base_configuration: Types::KnowledgeBaseRetrieveAndGenerateConfiguration
307
+ attr_accessor type: ("KNOWLEDGE_BASE")
306
308
  SENSITIVE: []
307
309
  end
308
310
 
@@ -317,17 +319,17 @@ module Aws::BedrockAgentRuntime
317
319
  end
318
320
 
319
321
  class RetrieveAndGenerateRequest
320
- attr_accessor session_id: ::String
321
322
  attr_accessor input: Types::RetrieveAndGenerateInput
322
323
  attr_accessor retrieve_and_generate_configuration: Types::RetrieveAndGenerateConfiguration
323
324
  attr_accessor session_configuration: Types::RetrieveAndGenerateSessionConfiguration
325
+ attr_accessor session_id: ::String
324
326
  SENSITIVE: [:input]
325
327
  end
326
328
 
327
329
  class RetrieveAndGenerateResponse
328
- attr_accessor session_id: ::String
329
- attr_accessor output: Types::RetrieveAndGenerateOutput
330
330
  attr_accessor citations: ::Array[Types::Citation]
331
+ attr_accessor output: Types::RetrieveAndGenerateOutput
332
+ attr_accessor session_id: ::String
331
333
  SENSITIVE: [:output]
332
334
  end
333
335
 
@@ -338,22 +340,22 @@ module Aws::BedrockAgentRuntime
338
340
 
339
341
  class RetrieveRequest
340
342
  attr_accessor knowledge_base_id: ::String
341
- attr_accessor retrieval_query: Types::KnowledgeBaseQuery
342
- attr_accessor retrieval_configuration: Types::KnowledgeBaseRetrievalConfiguration
343
343
  attr_accessor next_token: ::String
344
+ attr_accessor retrieval_configuration: Types::KnowledgeBaseRetrievalConfiguration
345
+ attr_accessor retrieval_query: Types::KnowledgeBaseQuery
344
346
  SENSITIVE: [:retrieval_query]
345
347
  end
346
348
 
347
349
  class RetrieveResponse
348
- attr_accessor retrieval_results: ::Array[Types::KnowledgeBaseRetrievalResult]
349
350
  attr_accessor next_token: ::String
351
+ attr_accessor retrieval_results: ::Array[Types::KnowledgeBaseRetrievalResult]
350
352
  SENSITIVE: [:retrieval_results]
351
353
  end
352
354
 
353
355
  class RetrievedReference
354
356
  attr_accessor content: Types::RetrievalResultContent
355
357
  attr_accessor location: Types::RetrievalResultLocation
356
- SENSITIVE: []
358
+ SENSITIVE: [:content, :location]
357
359
  end
358
360
 
359
361
  class ServiceQuotaExceededException
@@ -363,20 +365,20 @@ module Aws::BedrockAgentRuntime
363
365
  end
364
366
 
365
367
  class SessionState
366
- attr_accessor session_attributes: ::Hash[::String, ::String]
367
368
  attr_accessor prompt_session_attributes: ::Hash[::String, ::String]
369
+ attr_accessor session_attributes: ::Hash[::String, ::String]
368
370
  SENSITIVE: []
369
371
  end
370
372
 
371
373
  class Span
372
- attr_accessor start: ::Integer
373
374
  attr_accessor end: ::Integer
375
+ attr_accessor start: ::Integer
374
376
  SENSITIVE: []
375
377
  end
376
378
 
377
379
  class TextResponsePart
378
- attr_accessor text: ::String
379
380
  attr_accessor span: Types::Span
381
+ attr_accessor text: ::String
380
382
  SENSITIVE: []
381
383
  end
382
384
 
@@ -387,28 +389,28 @@ module Aws::BedrockAgentRuntime
387
389
  end
388
390
 
389
391
  class Trace
390
- attr_accessor pre_processing_trace: Types::PreProcessingTrace
392
+ attr_accessor failure_trace: Types::FailureTrace
391
393
  attr_accessor orchestration_trace: Types::OrchestrationTrace
392
394
  attr_accessor post_processing_trace: Types::PostProcessingTrace
393
- attr_accessor failure_trace: Types::FailureTrace
395
+ attr_accessor pre_processing_trace: Types::PreProcessingTrace
394
396
  attr_accessor unknown: untyped
395
- SENSITIVE: [:pre_processing_trace, :orchestration_trace, :post_processing_trace, :failure_trace]
397
+ SENSITIVE: [:failure_trace, :orchestration_trace, :post_processing_trace, :pre_processing_trace]
396
398
 
397
- class PreProcessingTrace < Trace
399
+ class FailureTrace < Trace
398
400
  end
399
401
  class OrchestrationTrace < Trace
400
402
  end
401
403
  class PostProcessingTrace < Trace
402
404
  end
403
- class FailureTrace < Trace
405
+ class PreProcessingTrace < Trace
404
406
  end
405
407
  class Unknown < Trace
406
408
  end
407
409
  end
408
410
 
409
411
  class TracePart
410
- attr_accessor agent_id: ::String
411
412
  attr_accessor agent_alias_id: ::String
413
+ attr_accessor agent_id: ::String
412
414
  attr_accessor session_id: ::String
413
415
  attr_accessor trace: Types::Trace
414
416
  attr_accessor event_type: untyped
@@ -422,7 +424,7 @@ module Aws::BedrockAgentRuntime
422
424
  end
423
425
 
424
426
  class ResponseStream < Enumerator[untyped, untyped]
425
- 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]
427
+ 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]
426
428
  end
427
429
  end
428
430
  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.1.0
4
+ version: 1.3.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-01-26 00:00:00.000000000 Z
11
+ date: 2024-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core