aws-sdk-bedrockagentruntime 1.4.0 → 1.6.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.
@@ -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.4.0'
56
+ GEM_VERSION = '1.6.0'
57
57
 
58
58
  end
data/sig/client.rbs CHANGED
@@ -87,10 +87,33 @@ module Aws
87
87
  agent_id: ::String,
88
88
  ?enable_trace: bool,
89
89
  ?end_session: bool,
90
- input_text: ::String,
90
+ ?input_text: ::String,
91
91
  session_id: ::String,
92
92
  ?session_state: {
93
+ invocation_id: ::String?,
93
94
  prompt_session_attributes: Hash[::String, ::String]?,
95
+ return_control_invocation_results: Array[
96
+ {
97
+ api_result: {
98
+ action_group: ::String,
99
+ api_path: ::String?,
100
+ http_method: ::String?,
101
+ http_status_code: ::Integer?,
102
+ response_body: Hash[::String, {
103
+ body: ::String?
104
+ }]?,
105
+ response_state: ("FAILURE" | "REPROMPT")?
106
+ }?,
107
+ function_result: {
108
+ action_group: ::String,
109
+ function: ::String?,
110
+ response_body: Hash[::String, {
111
+ body: ::String?
112
+ }]?,
113
+ response_state: ("FAILURE" | "REPROMPT")?
114
+ }?
115
+ },
116
+ ]?,
94
117
  session_attributes: Hash[::String, ::String]?
95
118
  }
96
119
  ) ?{ (*untyped) -> void } -> _InvokeAgentResponseSuccess
@@ -107,6 +130,59 @@ module Aws
107
130
  ?next_token: ::String,
108
131
  ?retrieval_configuration: {
109
132
  vector_search_configuration: {
133
+ filter: {
134
+ and_all: Array[
135
+ untyped,
136
+ ]?,
137
+ equals: {
138
+ key: ::String,
139
+ value: {
140
+ }
141
+ }?,
142
+ greater_than: {
143
+ key: ::String,
144
+ value: {
145
+ }
146
+ }?,
147
+ greater_than_or_equals: {
148
+ key: ::String,
149
+ value: {
150
+ }
151
+ }?,
152
+ in: {
153
+ key: ::String,
154
+ value: {
155
+ }
156
+ }?,
157
+ less_than: {
158
+ key: ::String,
159
+ value: {
160
+ }
161
+ }?,
162
+ less_than_or_equals: {
163
+ key: ::String,
164
+ value: {
165
+ }
166
+ }?,
167
+ not_equals: {
168
+ key: ::String,
169
+ value: {
170
+ }
171
+ }?,
172
+ not_in: {
173
+ key: ::String,
174
+ value: {
175
+ }
176
+ }?,
177
+ or_all: Array[
178
+ untyped,
179
+ ]?,
180
+ starts_with: {
181
+ key: ::String,
182
+ value: {
183
+ }
184
+ }?
185
+ }?,
110
186
  number_of_results: ::Integer?,
111
187
  override_search_type: ("HYBRID" | "SEMANTIC")?
112
188
  }
@@ -129,6 +205,27 @@ module Aws
129
205
  text: ::String
130
206
  },
131
207
  ?retrieve_and_generate_configuration: {
208
+ external_sources_configuration: {
209
+ generation_configuration: {
210
+ prompt_template: {
211
+ text_prompt_template: ::String?
212
+ }?
213
+ }?,
214
+ model_arn: ::String,
215
+ sources: Array[
216
+ {
217
+ byte_content: {
218
+ content_type: ::String,
219
+ data: ::String,
220
+ identifier: ::String
221
+ }?,
222
+ s3_location: {
223
+ uri: ::String
224
+ }?,
225
+ source_type: ("S3" | "BYTE_CONTENT")
226
+ },
227
+ ]
228
+ }?,
132
229
  knowledge_base_configuration: {
133
230
  generation_configuration: {
134
231
  prompt_template: {
@@ -139,12 +236,65 @@ module Aws
139
236
  model_arn: ::String,
140
237
  retrieval_configuration: {
141
238
  vector_search_configuration: {
239
+ filter: {
240
+ and_all: Array[
241
+ untyped,
242
+ ]?,
243
+ equals: {
244
+ key: ::String,
245
+ value: {
246
+ }
247
+ }?,
248
+ greater_than: {
249
+ key: ::String,
250
+ value: {
251
+ }
252
+ }?,
253
+ greater_than_or_equals: {
254
+ key: ::String,
255
+ value: {
256
+ }
257
+ }?,
258
+ in: {
259
+ key: ::String,
260
+ value: {
261
+ }
262
+ }?,
263
+ less_than: {
264
+ key: ::String,
265
+ value: {
266
+ }
267
+ }?,
268
+ less_than_or_equals: {
269
+ key: ::String,
270
+ value: {
271
+ }
272
+ }?,
273
+ not_equals: {
274
+ key: ::String,
275
+ value: {
276
+ }
277
+ }?,
278
+ not_in: {
279
+ key: ::String,
280
+ value: {
281
+ }
282
+ }?,
283
+ or_all: Array[
284
+ untyped,
285
+ ]?,
286
+ starts_with: {
287
+ key: ::String,
288
+ value: {
289
+ }
290
+ }?
291
+ }?,
142
292
  number_of_results: ::Integer?,
143
293
  override_search_type: ("HYBRID" | "SEMANTIC")?
144
294
  }
145
295
  }?
146
296
  }?,
147
- type: ("KNOWLEDGE_BASE")
297
+ type: ("KNOWLEDGE_BASE" | "EXTERNAL_SOURCES")
148
298
  },
149
299
  ?session_configuration: {
150
300
  kms_key_arn: ::String
data/sig/types.rbs CHANGED
@@ -17,10 +17,11 @@ module Aws::BedrockAgentRuntime
17
17
  class ActionGroupInvocationInput
18
18
  attr_accessor action_group_name: ::String
19
19
  attr_accessor api_path: ::String
20
+ attr_accessor function: ::String
20
21
  attr_accessor parameters: ::Array[Types::Parameter]
21
22
  attr_accessor request_body: Types::RequestBody
22
23
  attr_accessor verb: ::String
23
- SENSITIVE: [:action_group_name, :api_path, :verb]
24
+ SENSITIVE: [:action_group_name, :api_path, :function, :verb]
24
25
  end
25
26
 
26
27
  class ActionGroupInvocationOutput
@@ -28,6 +29,37 @@ module Aws::BedrockAgentRuntime
28
29
  SENSITIVE: [:text]
29
30
  end
30
31
 
32
+ class ApiInvocationInput
33
+ attr_accessor action_group: ::String
34
+ attr_accessor api_path: ::String
35
+ attr_accessor http_method: ::String
36
+ attr_accessor parameters: ::Array[Types::ApiParameter]
37
+ attr_accessor request_body: Types::ApiRequestBody
38
+ SENSITIVE: [:api_path]
39
+ end
40
+
41
+ class ApiParameter
42
+ attr_accessor name: ::String
43
+ attr_accessor type: ::String
44
+ attr_accessor value: ::String
45
+ SENSITIVE: []
46
+ end
47
+
48
+ class ApiRequestBody
49
+ attr_accessor content: ::Hash[::String, Types::PropertyParameters]
50
+ SENSITIVE: []
51
+ end
52
+
53
+ class ApiResult
54
+ attr_accessor action_group: ::String
55
+ attr_accessor api_path: ::String
56
+ attr_accessor http_method: ::String
57
+ attr_accessor http_status_code: ::Integer
58
+ attr_accessor response_body: ::Hash[::String, Types::ContentBody]
59
+ attr_accessor response_state: ("FAILURE" | "REPROMPT")
60
+ SENSITIVE: [:api_path]
61
+ end
62
+
31
63
  class Attribution
32
64
  attr_accessor citations: ::Array[Types::Citation]
33
65
  SENSITIVE: []
@@ -40,6 +72,13 @@ module Aws::BedrockAgentRuntime
40
72
  SENSITIVE: []
41
73
  end
42
74
 
75
+ class ByteContentDoc
76
+ attr_accessor content_type: ::String
77
+ attr_accessor data: ::String
78
+ attr_accessor identifier: ::String
79
+ SENSITIVE: [:data, :identifier]
80
+ end
81
+
43
82
  class Citation
44
83
  attr_accessor generated_response_part: Types::GeneratedResponsePart
45
84
  attr_accessor retrieved_references: ::Array[Types::RetrievedReference]
@@ -52,6 +91,11 @@ module Aws::BedrockAgentRuntime
52
91
  SENSITIVE: []
53
92
  end
54
93
 
94
+ class ContentBody
95
+ attr_accessor body: ::String
96
+ SENSITIVE: []
97
+ end
98
+
55
99
  class DependencyFailedException
56
100
  attr_accessor message: ::String
57
101
  attr_accessor resource_name: ::String
@@ -59,17 +103,64 @@ module Aws::BedrockAgentRuntime
59
103
  SENSITIVE: []
60
104
  end
61
105
 
106
+ class ExternalSource
107
+ attr_accessor byte_content: Types::ByteContentDoc
108
+ attr_accessor s3_location: Types::S3ObjectDoc
109
+ attr_accessor source_type: ("S3" | "BYTE_CONTENT")
110
+ SENSITIVE: []
111
+ end
112
+
113
+ class ExternalSourcesGenerationConfiguration
114
+ attr_accessor prompt_template: Types::PromptTemplate
115
+ SENSITIVE: []
116
+ end
117
+
118
+ class ExternalSourcesRetrieveAndGenerateConfiguration
119
+ attr_accessor generation_configuration: Types::ExternalSourcesGenerationConfiguration
120
+ attr_accessor model_arn: ::String
121
+ attr_accessor sources: ::Array[Types::ExternalSource]
122
+ SENSITIVE: []
123
+ end
124
+
62
125
  class FailureTrace
63
126
  attr_accessor failure_reason: ::String
64
127
  attr_accessor trace_id: ::String
65
128
  SENSITIVE: [:failure_reason]
66
129
  end
67
130
 
131
+ class FilterAttribute
132
+ attr_accessor key: ::String
133
+ attr_accessor value: untyped
134
+ SENSITIVE: []
135
+ end
136
+
68
137
  class FinalResponse
69
138
  attr_accessor text: ::String
70
139
  SENSITIVE: [:text]
71
140
  end
72
141
 
142
+ class FunctionInvocationInput
143
+ attr_accessor action_group: ::String
144
+ attr_accessor function: ::String
145
+ attr_accessor parameters: ::Array[Types::FunctionParameter]
146
+ SENSITIVE: []
147
+ end
148
+
149
+ class FunctionParameter
150
+ attr_accessor name: ::String
151
+ attr_accessor type: ::String
152
+ attr_accessor value: ::String
153
+ SENSITIVE: []
154
+ end
155
+
156
+ class FunctionResult
157
+ attr_accessor action_group: ::String
158
+ attr_accessor function: ::String
159
+ attr_accessor response_body: ::Hash[::String, Types::ContentBody]
160
+ attr_accessor response_state: ("FAILURE" | "REPROMPT")
161
+ SENSITIVE: []
162
+ end
163
+
73
164
  class GeneratedResponsePart
74
165
  attr_accessor text_response_part: Types::TextResponsePart
75
166
  SENSITIVE: [:text_response_part]
@@ -103,6 +194,34 @@ module Aws::BedrockAgentRuntime
103
194
  SENSITIVE: []
104
195
  end
105
196
 
197
+ class InvocationInputMember
198
+ attr_accessor api_invocation_input: Types::ApiInvocationInput
199
+ attr_accessor function_invocation_input: Types::FunctionInvocationInput
200
+ attr_accessor unknown: untyped
201
+ SENSITIVE: []
202
+
203
+ class ApiInvocationInput < InvocationInputMember
204
+ end
205
+ class FunctionInvocationInput < InvocationInputMember
206
+ end
207
+ class Unknown < InvocationInputMember
208
+ end
209
+ end
210
+
211
+ class InvocationResultMember
212
+ attr_accessor api_result: Types::ApiResult
213
+ attr_accessor function_result: Types::FunctionResult
214
+ attr_accessor unknown: untyped
215
+ SENSITIVE: []
216
+
217
+ class ApiResult < InvocationResultMember
218
+ end
219
+ class FunctionResult < InvocationResultMember
220
+ end
221
+ class Unknown < InvocationResultMember
222
+ end
223
+ end
224
+
106
225
  class InvokeAgentRequest
107
226
  attr_accessor agent_alias_id: ::String
108
227
  attr_accessor agent_id: ::String
@@ -145,8 +264,9 @@ module Aws::BedrockAgentRuntime
145
264
  class KnowledgeBaseRetrievalResult
146
265
  attr_accessor content: Types::RetrievalResultContent
147
266
  attr_accessor location: Types::RetrievalResultLocation
267
+ attr_accessor metadata: ::Hash[::String, untyped]
148
268
  attr_accessor score: ::Float
149
- SENSITIVE: [:content, :location]
269
+ SENSITIVE: [:content, :location, :metadata]
150
270
  end
151
271
 
152
272
  class KnowledgeBaseRetrieveAndGenerateConfiguration
@@ -158,9 +278,10 @@ module Aws::BedrockAgentRuntime
158
278
  end
159
279
 
160
280
  class KnowledgeBaseVectorSearchConfiguration
281
+ attr_accessor filter: Types::RetrievalFilter
161
282
  attr_accessor number_of_results: ::Integer
162
283
  attr_accessor override_search_type: ("HYBRID" | "SEMANTIC")
163
- SENSITIVE: []
284
+ SENSITIVE: [:filter]
164
285
  end
165
286
 
166
287
  class ModelInvocationInput
@@ -274,6 +395,11 @@ module Aws::BedrockAgentRuntime
274
395
  SENSITIVE: [:text_prompt_template]
275
396
  end
276
397
 
398
+ class PropertyParameters
399
+ attr_accessor properties: ::Array[Types::Parameter]
400
+ SENSITIVE: []
401
+ end
402
+
277
403
  class Rationale
278
404
  attr_accessor text: ::String
279
405
  attr_accessor trace_id: ::String
@@ -297,6 +423,47 @@ module Aws::BedrockAgentRuntime
297
423
  SENSITIVE: []
298
424
  end
299
425
 
426
+ class RetrievalFilter
427
+ attr_accessor and_all: ::Array[Types::RetrievalFilter]
428
+ attr_accessor equals: Types::FilterAttribute
429
+ attr_accessor greater_than: Types::FilterAttribute
430
+ attr_accessor greater_than_or_equals: Types::FilterAttribute
431
+ attr_accessor in: Types::FilterAttribute
432
+ attr_accessor less_than: Types::FilterAttribute
433
+ attr_accessor less_than_or_equals: Types::FilterAttribute
434
+ attr_accessor not_equals: Types::FilterAttribute
435
+ attr_accessor not_in: Types::FilterAttribute
436
+ attr_accessor or_all: ::Array[Types::RetrievalFilter]
437
+ attr_accessor starts_with: Types::FilterAttribute
438
+ attr_accessor unknown: untyped
439
+ SENSITIVE: []
440
+
441
+ class AndAll < RetrievalFilter
442
+ end
443
+ class Equals < RetrievalFilter
444
+ end
445
+ class GreaterThan < RetrievalFilter
446
+ end
447
+ class GreaterThanOrEquals < RetrievalFilter
448
+ end
449
+ class In < RetrievalFilter
450
+ end
451
+ class LessThan < RetrievalFilter
452
+ end
453
+ class LessThanOrEquals < RetrievalFilter
454
+ end
455
+ class NotEquals < RetrievalFilter
456
+ end
457
+ class NotIn < RetrievalFilter
458
+ end
459
+ class OrAll < RetrievalFilter
460
+ end
461
+ class StartsWith < RetrievalFilter
462
+ end
463
+ class Unknown < RetrievalFilter
464
+ end
465
+ end
466
+
300
467
  class RetrievalResultContent
301
468
  attr_accessor text: ::String
302
469
  SENSITIVE: []
@@ -314,8 +481,9 @@ module Aws::BedrockAgentRuntime
314
481
  end
315
482
 
316
483
  class RetrieveAndGenerateConfiguration
484
+ attr_accessor external_sources_configuration: Types::ExternalSourcesRetrieveAndGenerateConfiguration
317
485
  attr_accessor knowledge_base_configuration: Types::KnowledgeBaseRetrieveAndGenerateConfiguration
318
- attr_accessor type: ("KNOWLEDGE_BASE")
486
+ attr_accessor type: ("KNOWLEDGE_BASE" | "EXTERNAL_SOURCES")
319
487
  SENSITIVE: []
320
488
  end
321
489
 
@@ -366,7 +534,20 @@ module Aws::BedrockAgentRuntime
366
534
  class RetrievedReference
367
535
  attr_accessor content: Types::RetrievalResultContent
368
536
  attr_accessor location: Types::RetrievalResultLocation
369
- SENSITIVE: [:content, :location]
537
+ attr_accessor metadata: ::Hash[::String, untyped]
538
+ SENSITIVE: [:content, :location, :metadata]
539
+ end
540
+
541
+ class ReturnControlPayload
542
+ attr_accessor invocation_id: ::String
543
+ attr_accessor invocation_inputs: ::Array[Types::InvocationInputMember]
544
+ attr_accessor event_type: untyped
545
+ SENSITIVE: []
546
+ end
547
+
548
+ class S3ObjectDoc
549
+ attr_accessor uri: ::String
550
+ SENSITIVE: []
370
551
  end
371
552
 
372
553
  class ServiceQuotaExceededException
@@ -376,7 +557,9 @@ module Aws::BedrockAgentRuntime
376
557
  end
377
558
 
378
559
  class SessionState
560
+ attr_accessor invocation_id: ::String
379
561
  attr_accessor prompt_session_attributes: ::Hash[::String, ::String]
562
+ attr_accessor return_control_invocation_results: ::Array[Types::InvocationResultMember]
380
563
  attr_accessor session_attributes: ::Hash[::String, ::String]
381
564
  SENSITIVE: []
382
565
  end
@@ -422,6 +605,7 @@ module Aws::BedrockAgentRuntime
422
605
  class TracePart
423
606
  attr_accessor agent_alias_id: ::String
424
607
  attr_accessor agent_id: ::String
608
+ attr_accessor agent_version: ::String
425
609
  attr_accessor session_id: ::String
426
610
  attr_accessor trace: Types::Trace
427
611
  attr_accessor event_type: untyped
@@ -435,7 +619,7 @@ module Aws::BedrockAgentRuntime
435
619
  end
436
620
 
437
621
  class ResponseStream < Enumerator[untyped, untyped]
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]
622
+ def event_types: () -> [:access_denied_exception, :bad_gateway_exception, :chunk, :conflict_exception, :dependency_failed_exception, :internal_server_exception, :resource_not_found_exception, :return_control, :service_quota_exceeded_exception, :throttling_exception, :trace, :validation_exception]
439
623
  end
440
624
  end
441
625
  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.4.0
4
+ version: 1.6.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-03-26 00:00:00.000000000 Z
11
+ date: 2024-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core