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.
@@ -25,7 +25,13 @@ module Aws::BedrockAgentRuntime
25
25
  include Aws::Structure
26
26
  end
27
27
 
28
- # Contains information about the action group being invoked.
28
+ # Contains information about the action group being invoked. For more
29
+ # information about the possible structures, see the InvocationInput tab
30
+ # in [OrchestrationTrace][1] in the Amazon Bedrock User Guide.
31
+ #
32
+ #
33
+ #
34
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/trace-orchestration.html
29
35
  #
30
36
  # @!attribute [rw] action_group_name
31
37
  # The name of the action group.
@@ -35,6 +41,10 @@ module Aws::BedrockAgentRuntime
35
41
  # The path to the API to call, based off the action group.
36
42
  # @return [String]
37
43
  #
44
+ # @!attribute [rw] function
45
+ # The function in the action group to call.
46
+ # @return [String]
47
+ #
38
48
  # @!attribute [rw] parameters
39
49
  # The parameters in the Lambda input event.
40
50
  # @return [Array<Types::Parameter>]
@@ -52,10 +62,11 @@ module Aws::BedrockAgentRuntime
52
62
  class ActionGroupInvocationInput < Struct.new(
53
63
  :action_group_name,
54
64
  :api_path,
65
+ :function,
55
66
  :parameters,
56
67
  :request_body,
57
68
  :verb)
58
- SENSITIVE = [:action_group_name, :api_path, :verb]
69
+ SENSITIVE = [:action_group_name, :api_path, :function, :verb]
59
70
  include Aws::Structure
60
71
  end
61
72
 
@@ -75,6 +86,170 @@ module Aws::BedrockAgentRuntime
75
86
  include Aws::Structure
76
87
  end
77
88
 
89
+ # Contains information about the API operation that the agent predicts
90
+ # should be called.
91
+ #
92
+ # This data type is used in the following API operations:
93
+ #
94
+ # * In the `returnControl` field of the [Retrieve response][1]
95
+ #
96
+ # ^
97
+ #
98
+ #
99
+ #
100
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
101
+ #
102
+ # @!attribute [rw] action_group
103
+ # The action group that the API operation belongs to.
104
+ # @return [String]
105
+ #
106
+ # @!attribute [rw] api_path
107
+ # The path to the API operation.
108
+ # @return [String]
109
+ #
110
+ # @!attribute [rw] http_method
111
+ # The HTTP method of the API operation.
112
+ # @return [String]
113
+ #
114
+ # @!attribute [rw] parameters
115
+ # The parameters to provide for the API request, as the agent elicited
116
+ # from the user.
117
+ # @return [Array<Types::ApiParameter>]
118
+ #
119
+ # @!attribute [rw] request_body
120
+ # The request body to provide for the API request, as the agent
121
+ # elicited from the user.
122
+ # @return [Types::ApiRequestBody]
123
+ #
124
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ApiInvocationInput AWS API Documentation
125
+ #
126
+ class ApiInvocationInput < Struct.new(
127
+ :action_group,
128
+ :api_path,
129
+ :http_method,
130
+ :parameters,
131
+ :request_body)
132
+ SENSITIVE = [:api_path]
133
+ include Aws::Structure
134
+ end
135
+
136
+ # Information about a parameter to provide to the API request.
137
+ #
138
+ # This data type is used in the following API operations:
139
+ #
140
+ # * [Retrieve response][1]
141
+ #
142
+ # ^
143
+ #
144
+ #
145
+ #
146
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
147
+ #
148
+ # @!attribute [rw] name
149
+ # The name of the parameter.
150
+ # @return [String]
151
+ #
152
+ # @!attribute [rw] type
153
+ # The data type for the parameter.
154
+ # @return [String]
155
+ #
156
+ # @!attribute [rw] value
157
+ # The value of the parameter.
158
+ # @return [String]
159
+ #
160
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ApiParameter AWS API Documentation
161
+ #
162
+ class ApiParameter < Struct.new(
163
+ :name,
164
+ :type,
165
+ :value)
166
+ SENSITIVE = []
167
+ include Aws::Structure
168
+ end
169
+
170
+ # The request body to provide for the API request, as the agent elicited
171
+ # from the user.
172
+ #
173
+ # This data type is used in the following API operations:
174
+ #
175
+ # * [Retrieve response][1]
176
+ #
177
+ # ^
178
+ #
179
+ #
180
+ #
181
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
182
+ #
183
+ # @!attribute [rw] content
184
+ # The content of the request body. The key of the object in this field
185
+ # is a media type defining the format of the request body.
186
+ # @return [Hash<String,Types::PropertyParameters>]
187
+ #
188
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ApiRequestBody AWS API Documentation
189
+ #
190
+ class ApiRequestBody < Struct.new(
191
+ :content)
192
+ SENSITIVE = []
193
+ include Aws::Structure
194
+ end
195
+
196
+ # Contains information about the API operation that was called from the
197
+ # action group and the response body that was returned.
198
+ #
199
+ # This data type is used in the following API operations:
200
+ #
201
+ # * In the `returnControlInvocationResults` of the [Retrieve request][1]
202
+ #
203
+ # ^
204
+ #
205
+ #
206
+ #
207
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax
208
+ #
209
+ # @!attribute [rw] action_group
210
+ # The action group that the API operation belongs to.
211
+ # @return [String]
212
+ #
213
+ # @!attribute [rw] api_path
214
+ # The path to the API operation.
215
+ # @return [String]
216
+ #
217
+ # @!attribute [rw] http_method
218
+ # The HTTP method for the API operation.
219
+ # @return [String]
220
+ #
221
+ # @!attribute [rw] http_status_code
222
+ # http status code from API execution response (for example: 200, 400,
223
+ # 500).
224
+ # @return [Integer]
225
+ #
226
+ # @!attribute [rw] response_body
227
+ # 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.
230
+ # @return [Hash<String,Types::ContentBody>]
231
+ #
232
+ # @!attribute [rw] response_state
233
+ # Controls the final response state returned to end user when
234
+ # API/Function execution failed. When this state is FAILURE, the
235
+ # request would fail with dependency failure exception. When this
236
+ # state is REPROMPT, the API/function response will be sent to model
237
+ # for re-prompt
238
+ # @return [String]
239
+ #
240
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ApiResult AWS API Documentation
241
+ #
242
+ class ApiResult < Struct.new(
243
+ :action_group,
244
+ :api_path,
245
+ :http_method,
246
+ :http_status_code,
247
+ :response_body,
248
+ :response_state)
249
+ SENSITIVE = [:api_path]
250
+ include Aws::Structure
251
+ end
252
+
78
253
  # Contains citations for a part of an agent response.
79
254
  #
80
255
  # @!attribute [rw] citations
@@ -111,6 +286,31 @@ module Aws::BedrockAgentRuntime
111
286
  include Aws::Structure
112
287
  end
113
288
 
289
+ # This property contains the document to chat with, along with its
290
+ # attributes.
291
+ #
292
+ # @!attribute [rw] content_type
293
+ # The MIME type of the document contained in the wrapper object.
294
+ # @return [String]
295
+ #
296
+ # @!attribute [rw] data
297
+ # The byte value of the file to upload, encoded as a Base-64 string.
298
+ # @return [String]
299
+ #
300
+ # @!attribute [rw] identifier
301
+ # The file name of the document contained in the wrapper object.
302
+ # @return [String]
303
+ #
304
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ByteContentDoc AWS API Documentation
305
+ #
306
+ class ByteContentDoc < Struct.new(
307
+ :content_type,
308
+ :data,
309
+ :identifier)
310
+ SENSITIVE = [:data, :identifier]
311
+ include Aws::Structure
312
+ end
313
+
114
314
  # An object containing a segment of the generated response that is based
115
315
  # on a source in the knowledge base, alongside information about the
116
316
  # source.
@@ -159,6 +359,31 @@ module Aws::BedrockAgentRuntime
159
359
  include Aws::Structure
160
360
  end
161
361
 
362
+ # Contains the body of the API response.
363
+ #
364
+ # This data type is used in the following API operations:
365
+ #
366
+ # * In the `returnControlInvocationResults` field of the [Retrieve
367
+ # request][1]
368
+ #
369
+ # ^
370
+ #
371
+ #
372
+ #
373
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax
374
+ #
375
+ # @!attribute [rw] body
376
+ # The body of the API response.
377
+ # @return [String]
378
+ #
379
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ContentBody AWS API Documentation
380
+ #
381
+ class ContentBody < Struct.new(
382
+ :body)
383
+ SENSITIVE = []
384
+ include Aws::Structure
385
+ end
386
+
162
387
  # There was an issue with a dependency. Check the resource
163
388
  # configurations and retry the request.
164
389
  #
@@ -180,6 +405,76 @@ module Aws::BedrockAgentRuntime
180
405
  include Aws::Structure
181
406
  end
182
407
 
408
+ # The unique external source of the content contained in the wrapper
409
+ # object.
410
+ #
411
+ # @!attribute [rw] byte_content
412
+ # The identifier, contentType, and data of the external source wrapper
413
+ # object.
414
+ # @return [Types::ByteContentDoc]
415
+ #
416
+ # @!attribute [rw] s3_location
417
+ # The S3 location of the external source wrapper object.
418
+ # @return [Types::S3ObjectDoc]
419
+ #
420
+ # @!attribute [rw] source_type
421
+ # The source type of the external source wrapper object.
422
+ # @return [String]
423
+ #
424
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ExternalSource AWS API Documentation
425
+ #
426
+ class ExternalSource < Struct.new(
427
+ :byte_content,
428
+ :s3_location,
429
+ :source_type)
430
+ SENSITIVE = []
431
+ include Aws::Structure
432
+ end
433
+
434
+ # Contains the generation configuration of the external source wrapper
435
+ # object.
436
+ #
437
+ # @!attribute [rw] prompt_template
438
+ # Contain the textPromptTemplate string for the external source
439
+ # wrapper object.
440
+ # @return [Types::PromptTemplate]
441
+ #
442
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ExternalSourcesGenerationConfiguration AWS API Documentation
443
+ #
444
+ class ExternalSourcesGenerationConfiguration < Struct.new(
445
+ :prompt_template)
446
+ SENSITIVE = []
447
+ include Aws::Structure
448
+ end
449
+
450
+ # The configurations of the external source wrapper object in the
451
+ # retrieveAndGenerate function.
452
+ #
453
+ # @!attribute [rw] generation_configuration
454
+ # The prompt used with the external source wrapper object with the
455
+ # retrieveAndGenerate function.
456
+ # @return [Types::ExternalSourcesGenerationConfiguration]
457
+ #
458
+ # @!attribute [rw] model_arn
459
+ # The modelArn used with the external source wrapper object in the
460
+ # retrieveAndGenerate function.
461
+ # @return [String]
462
+ #
463
+ # @!attribute [rw] sources
464
+ # The document used with the external source wrapper object in the
465
+ # retrieveAndGenerate function.
466
+ # @return [Array<Types::ExternalSource>]
467
+ #
468
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ExternalSourcesRetrieveAndGenerateConfiguration AWS API Documentation
469
+ #
470
+ class ExternalSourcesRetrieveAndGenerateConfiguration < Struct.new(
471
+ :generation_configuration,
472
+ :model_arn,
473
+ :sources)
474
+ SENSITIVE = []
475
+ include Aws::Structure
476
+ end
477
+
183
478
  # Contains information about the failure of the interaction.
184
479
  #
185
480
  # @!attribute [rw] failure_reason
@@ -199,6 +494,38 @@ module Aws::BedrockAgentRuntime
199
494
  include Aws::Structure
200
495
  end
201
496
 
497
+ # Specifies the name that the metadata attribute must match and the
498
+ # value to which to compare the value of the metadata attribute. For
499
+ # more information, see [Query configurations][1].
500
+ #
501
+ # This data type is used in the following API operations:
502
+ #
503
+ # * [RetrieveAndGenerate request][2]
504
+ #
505
+ # ^
506
+ #
507
+ #
508
+ #
509
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
510
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax
511
+ #
512
+ # @!attribute [rw] key
513
+ # The name that the metadata attribute must match.
514
+ # @return [String]
515
+ #
516
+ # @!attribute [rw] value
517
+ # The value to whcih to compare the value of the metadata attribute.
518
+ # @return [Hash,Array,String,Numeric,Boolean]
519
+ #
520
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FilterAttribute AWS API Documentation
521
+ #
522
+ class FilterAttribute < Struct.new(
523
+ :key,
524
+ :value)
525
+ SENSITIVE = []
526
+ include Aws::Structure
527
+ end
528
+
202
529
  # Contains details about the response to the user.
203
530
  #
204
531
  # @!attribute [rw] text
@@ -213,6 +540,120 @@ module Aws::BedrockAgentRuntime
213
540
  include Aws::Structure
214
541
  end
215
542
 
543
+ # Contains information about the function that the agent predicts should
544
+ # be called.
545
+ #
546
+ # This data type is used in the following API operations:
547
+ #
548
+ # * In the `returnControl` field of the [Retrieve response][1]
549
+ #
550
+ # ^
551
+ #
552
+ #
553
+ #
554
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
555
+ #
556
+ # @!attribute [rw] action_group
557
+ # The action group that the function belongs to.
558
+ # @return [String]
559
+ #
560
+ # @!attribute [rw] function
561
+ # The name of the function.
562
+ # @return [String]
563
+ #
564
+ # @!attribute [rw] parameters
565
+ # A list of parameters of the function.
566
+ # @return [Array<Types::FunctionParameter>]
567
+ #
568
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FunctionInvocationInput AWS API Documentation
569
+ #
570
+ class FunctionInvocationInput < Struct.new(
571
+ :action_group,
572
+ :function,
573
+ :parameters)
574
+ SENSITIVE = []
575
+ include Aws::Structure
576
+ end
577
+
578
+ # Contains information about a parameter of the function.
579
+ #
580
+ # This data type is used in the following API operations:
581
+ #
582
+ # * In the `returnControl` field of the [Retrieve response][1]
583
+ #
584
+ # ^
585
+ #
586
+ #
587
+ #
588
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
589
+ #
590
+ # @!attribute [rw] name
591
+ # The name of the parameter.
592
+ # @return [String]
593
+ #
594
+ # @!attribute [rw] type
595
+ # The data type of the parameter.
596
+ # @return [String]
597
+ #
598
+ # @!attribute [rw] value
599
+ # The value of the parameter.
600
+ # @return [String]
601
+ #
602
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FunctionParameter AWS API Documentation
603
+ #
604
+ class FunctionParameter < Struct.new(
605
+ :name,
606
+ :type,
607
+ :value)
608
+ SENSITIVE = []
609
+ include Aws::Structure
610
+ end
611
+
612
+ # Contains information about the function that was called from the
613
+ # action group and the response that was returned.
614
+ #
615
+ # This data type is used in the following API operations:
616
+ #
617
+ # * In the `returnControlInvocationResults` of the [Retrieve request][1]
618
+ #
619
+ # ^
620
+ #
621
+ #
622
+ #
623
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax
624
+ #
625
+ # @!attribute [rw] action_group
626
+ # The action group that the function belongs to.
627
+ # @return [String]
628
+ #
629
+ # @!attribute [rw] function
630
+ # The name of the function that was called.
631
+ # @return [String]
632
+ #
633
+ # @!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.
636
+ # @return [Hash<String,Types::ContentBody>]
637
+ #
638
+ # @!attribute [rw] response_state
639
+ # Controls the final response state returned to end user when
640
+ # API/Function execution failed. When this state is FAILURE, the
641
+ # request would fail with dependency failure exception. When this
642
+ # state is REPROMPT, the API/function response will be sent to model
643
+ # for re-prompt
644
+ # @return [String]
645
+ #
646
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FunctionResult AWS API Documentation
647
+ #
648
+ class FunctionResult < Struct.new(
649
+ :action_group,
650
+ :function,
651
+ :response_body,
652
+ :response_state)
653
+ SENSITIVE = []
654
+ include Aws::Structure
655
+ end
656
+
216
657
  # Contains metadata about a part of the generated response that is
217
658
  # accompanied by a citation.
218
659
  #
@@ -370,6 +811,83 @@ module Aws::BedrockAgentRuntime
370
811
  include Aws::Structure
371
812
  end
372
813
 
814
+ # Contains details about the API operation or function that the agent
815
+ # predicts should be called.
816
+ #
817
+ # This data type is used in the following API operations:
818
+ #
819
+ # * In the `returnControl` field of the [Retrieve response][1]
820
+ #
821
+ # ^
822
+ #
823
+ #
824
+ #
825
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
826
+ #
827
+ # @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
+ #
829
+ # @!attribute [rw] api_invocation_input
830
+ # Contains information about the API operation that the agent predicts
831
+ # should be called.
832
+ # @return [Types::ApiInvocationInput]
833
+ #
834
+ # @!attribute [rw] function_invocation_input
835
+ # Contains information about the function that the agent predicts
836
+ # should be called.
837
+ # @return [Types::FunctionInvocationInput]
838
+ #
839
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvocationInputMember AWS API Documentation
840
+ #
841
+ class InvocationInputMember < Struct.new(
842
+ :api_invocation_input,
843
+ :function_invocation_input,
844
+ :unknown)
845
+ SENSITIVE = []
846
+ include Aws::Structure
847
+ include Aws::Structure::Union
848
+
849
+ class ApiInvocationInput < InvocationInputMember; end
850
+ class FunctionInvocationInput < InvocationInputMember; end
851
+ class Unknown < InvocationInputMember; end
852
+ end
853
+
854
+ # A result from the action group invocation.
855
+ #
856
+ # This data type is used in the following API operations:
857
+ #
858
+ # * [Retrieve request][1]
859
+ #
860
+ # ^
861
+ #
862
+ #
863
+ #
864
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax
865
+ #
866
+ # @note InvocationResultMember is a union - when making an API calls you must set exactly one of the members.
867
+ #
868
+ # @!attribute [rw] api_result
869
+ # The result from the API response from the action group invocation.
870
+ # @return [Types::ApiResult]
871
+ #
872
+ # @!attribute [rw] function_result
873
+ # The result from the function from the action group invocation.
874
+ # @return [Types::FunctionResult]
875
+ #
876
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvocationResultMember AWS API Documentation
877
+ #
878
+ class InvocationResultMember < Struct.new(
879
+ :api_result,
880
+ :function_result,
881
+ :unknown)
882
+ SENSITIVE = []
883
+ include Aws::Structure
884
+ include Aws::Structure::Union
885
+
886
+ class ApiResult < InvocationResultMember; end
887
+ class FunctionResult < InvocationResultMember; end
888
+ class Unknown < InvocationResultMember; end
889
+ end
890
+
373
891
  # @!attribute [rw] agent_alias_id
374
892
  # The alias of the agent to use.
375
893
  # @return [String]
@@ -558,6 +1076,15 @@ module Aws::BedrockAgentRuntime
558
1076
  # Contains information about the location of the data source.
559
1077
  # @return [Types::RetrievalResultLocation]
560
1078
  #
1079
+ # @!attribute [rw] metadata
1080
+ # Contains metadata attributes and their values for the file in the
1081
+ # data source. For more information, see [Metadata and filtering][1].
1082
+ #
1083
+ #
1084
+ #
1085
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-ds.html#kb-ds-metadata
1086
+ # @return [Hash<String,Hash,Array,String,Numeric,Boolean>]
1087
+ #
561
1088
  # @!attribute [rw] score
562
1089
  # The level of relevance of the result to the query.
563
1090
  # @return [Float]
@@ -567,8 +1094,9 @@ module Aws::BedrockAgentRuntime
567
1094
  class KnowledgeBaseRetrievalResult < Struct.new(
568
1095
  :content,
569
1096
  :location,
1097
+ :metadata,
570
1098
  :score)
571
- SENSITIVE = [:content, :location]
1099
+ SENSITIVE = [:content, :location, :metadata]
572
1100
  include Aws::Structure
573
1101
  end
574
1102
 
@@ -632,6 +1160,16 @@ module Aws::BedrockAgentRuntime
632
1160
  # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax
633
1161
  # [3]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax
634
1162
  #
1163
+ # @!attribute [rw] filter
1164
+ # Specifies the filters to use on the metadata in the knowledge base
1165
+ # data sources before returning results. For more information, see
1166
+ # [Query configurations][1].
1167
+ #
1168
+ #
1169
+ #
1170
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
1171
+ # @return [Types::RetrievalFilter]
1172
+ #
635
1173
  # @!attribute [rw] number_of_results
636
1174
  # The number of source chunks to retrieve.
637
1175
  # @return [Integer]
@@ -654,9 +1192,10 @@ module Aws::BedrockAgentRuntime
654
1192
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseVectorSearchConfiguration AWS API Documentation
655
1193
  #
656
1194
  class KnowledgeBaseVectorSearchConfiguration < Struct.new(
1195
+ :filter,
657
1196
  :number_of_results,
658
1197
  :override_search_type)
659
- SENSITIVE = []
1198
+ SENSITIVE = [:filter]
660
1199
  include Aws::Structure
661
1200
  end
662
1201
 
@@ -848,7 +1387,7 @@ module Aws::BedrockAgentRuntime
848
1387
  class Unknown < OrchestrationTrace; end
849
1388
  end
850
1389
 
851
- # A parameter in the Lambda input event.
1390
+ # A parameter for the API request or function.
852
1391
  #
853
1392
  # @!attribute [rw] name
854
1393
  # The name of the parameter.
@@ -1056,7 +1595,7 @@ module Aws::BedrockAgentRuntime
1056
1595
  #
1057
1596
  # This data type is used in the following API operations:
1058
1597
  #
1059
- # * [RetrieveAndGenerate request][2]
1598
+ # * [RetrieveAndGenerate request][2] – in the `filter` field
1060
1599
  #
1061
1600
  # ^
1062
1601
  #
@@ -1092,6 +1631,20 @@ module Aws::BedrockAgentRuntime
1092
1631
  include Aws::Structure
1093
1632
  end
1094
1633
 
1634
+ # Contains the parameters in the request body.
1635
+ #
1636
+ # @!attribute [rw] properties
1637
+ # A list of parameters in the request body.
1638
+ # @return [Array<Types::Parameter>]
1639
+ #
1640
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PropertyParameters AWS API Documentation
1641
+ #
1642
+ class PropertyParameters < Struct.new(
1643
+ :properties)
1644
+ SENSITIVE = []
1645
+ include Aws::Structure
1646
+ end
1647
+
1095
1648
  # Contains the reasoning, based on the input, that the agent uses to
1096
1649
  # justify carrying out an action group or getting information from a
1097
1650
  # knowledge base.
@@ -1132,7 +1685,7 @@ module Aws::BedrockAgentRuntime
1132
1685
  include Aws::Structure
1133
1686
  end
1134
1687
 
1135
- # The parameters in the request body for the Lambda input event.
1688
+ # The parameters in the API request body.
1136
1689
  #
1137
1690
  # @!attribute [rw] content
1138
1691
  # The content in the request body.
@@ -1146,8 +1699,8 @@ module Aws::BedrockAgentRuntime
1146
1699
  include Aws::Structure
1147
1700
  end
1148
1701
 
1149
- # The specified resource ARN was not found. Check the ARN and try your
1150
- # request again.
1702
+ # The specified resource Amazon Resource Name (ARN) was not found. Check
1703
+ # the Amazon Resource Name (ARN) and try your request again.
1151
1704
  #
1152
1705
  # @!attribute [rw] message
1153
1706
  # @return [String]
@@ -1161,6 +1714,122 @@ module Aws::BedrockAgentRuntime
1161
1714
  include Aws::Structure
1162
1715
  end
1163
1716
 
1717
+ # Specifies the filters to use on the metadata attributes in the
1718
+ # knowledge base data sources before returning results. For more
1719
+ # information, see [Query configurations][1].
1720
+ #
1721
+ # This data type is used in the following API operations:
1722
+ #
1723
+ # * [Retrieve request][2] – in the `filter` field
1724
+ #
1725
+ # * [RetrieveAndGenerate request][3] – in the `filter` field
1726
+ #
1727
+ #
1728
+ #
1729
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
1730
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax
1731
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax
1732
+ #
1733
+ # @note RetrievalFilter is a union - when making an API calls you must set exactly one of the members.
1734
+ #
1735
+ # @!attribute [rw] and_all
1736
+ # Knowledge base data sources whose metadata attributes fulfill all
1737
+ # the filter conditions inside this list are returned.
1738
+ # @return [Array<Types::RetrievalFilter>]
1739
+ #
1740
+ # @!attribute [rw] equals
1741
+ # Knowledge base data sources that contain a metadata attribute whose
1742
+ # name matches the `key` and whose value matches the `value` in this
1743
+ # object are returned.
1744
+ # @return [Types::FilterAttribute]
1745
+ #
1746
+ # @!attribute [rw] greater_than
1747
+ # Knowledge base data sources that contain a metadata attribute whose
1748
+ # name matches the `key` and whose value is greater than the `value`
1749
+ # in this object are returned.
1750
+ # @return [Types::FilterAttribute]
1751
+ #
1752
+ # @!attribute [rw] greater_than_or_equals
1753
+ # Knowledge base data sources that contain a metadata attribute whose
1754
+ # name matches the `key` and whose value is greater than or equal to
1755
+ # the `value` in this object are returned.
1756
+ # @return [Types::FilterAttribute]
1757
+ #
1758
+ # @!attribute [rw] in
1759
+ # Knowledge base data sources that contain a metadata attribute whose
1760
+ # name matches the `key` and whose value is in the list specified in
1761
+ # the `value` in this object are returned.
1762
+ # @return [Types::FilterAttribute]
1763
+ #
1764
+ # @!attribute [rw] less_than
1765
+ # Knowledge base data sources that contain a metadata attribute whose
1766
+ # name matches the `key` and whose value is less than the `value` in
1767
+ # this object are returned.
1768
+ # @return [Types::FilterAttribute]
1769
+ #
1770
+ # @!attribute [rw] less_than_or_equals
1771
+ # Knowledge base data sources that contain a metadata attribute whose
1772
+ # name matches the `key` and whose value is less than or equal to the
1773
+ # `value` in this object are returned.
1774
+ # @return [Types::FilterAttribute]
1775
+ #
1776
+ # @!attribute [rw] not_equals
1777
+ # Knowledge base data sources that contain a metadata attribute whose
1778
+ # name matches the `key` and whose value doesn't match the `value` in
1779
+ # this object are returned.
1780
+ # @return [Types::FilterAttribute]
1781
+ #
1782
+ # @!attribute [rw] not_in
1783
+ # Knowledge base data sources that contain a metadata attribute whose
1784
+ # name matches the `key` and whose value isn't in the list specified
1785
+ # in the `value` in this object are returned.
1786
+ # @return [Types::FilterAttribute]
1787
+ #
1788
+ # @!attribute [rw] or_all
1789
+ # Knowledge base data sources whose metadata attributes fulfill at
1790
+ # least one of the filter conditions inside this list are returned.
1791
+ # @return [Array<Types::RetrievalFilter>]
1792
+ #
1793
+ # @!attribute [rw] starts_with
1794
+ # Knowledge base data sources that contain a metadata attribute whose
1795
+ # name matches the `key` and whose value starts with the `value` in
1796
+ # this object are returned. This filter is currently only supported
1797
+ # for Amazon OpenSearch Serverless vector stores.
1798
+ # @return [Types::FilterAttribute]
1799
+ #
1800
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrievalFilter AWS API Documentation
1801
+ #
1802
+ class RetrievalFilter < Struct.new(
1803
+ :and_all,
1804
+ :equals,
1805
+ :greater_than,
1806
+ :greater_than_or_equals,
1807
+ :in,
1808
+ :less_than,
1809
+ :less_than_or_equals,
1810
+ :not_equals,
1811
+ :not_in,
1812
+ :or_all,
1813
+ :starts_with,
1814
+ :unknown)
1815
+ SENSITIVE = []
1816
+ include Aws::Structure
1817
+ include Aws::Structure::Union
1818
+
1819
+ class AndAll < RetrievalFilter; end
1820
+ class Equals < RetrievalFilter; end
1821
+ class GreaterThan < RetrievalFilter; end
1822
+ class GreaterThanOrEquals < RetrievalFilter; end
1823
+ class In < RetrievalFilter; end
1824
+ class LessThan < RetrievalFilter; end
1825
+ class LessThanOrEquals < RetrievalFilter; end
1826
+ class NotEquals < RetrievalFilter; end
1827
+ class NotIn < RetrievalFilter; end
1828
+ class OrAll < RetrievalFilter; end
1829
+ class StartsWith < RetrievalFilter; end
1830
+ class Unknown < RetrievalFilter; end
1831
+ end
1832
+
1164
1833
  # Contains the cited text from the data source.
1165
1834
  #
1166
1835
  # This data type is used in the following API operations:
@@ -1260,6 +1929,11 @@ module Aws::BedrockAgentRuntime
1260
1929
  #
1261
1930
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax
1262
1931
  #
1932
+ # @!attribute [rw] external_sources_configuration
1933
+ # The configuration used with the external source wrapper object in
1934
+ # the retrieveAndGenerate function.
1935
+ # @return [Types::ExternalSourcesRetrieveAndGenerateConfiguration]
1936
+ #
1263
1937
  # @!attribute [rw] knowledge_base_configuration
1264
1938
  # Contains details about the resource being queried.
1265
1939
  # @return [Types::KnowledgeBaseRetrieveAndGenerateConfiguration]
@@ -1271,6 +1945,7 @@ module Aws::BedrockAgentRuntime
1271
1945
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveAndGenerateConfiguration AWS API Documentation
1272
1946
  #
1273
1947
  class RetrieveAndGenerateConfiguration < Struct.new(
1948
+ :external_sources_configuration,
1274
1949
  :knowledge_base_configuration,
1275
1950
  :type)
1276
1951
  SENSITIVE = []
@@ -1483,12 +2158,69 @@ module Aws::BedrockAgentRuntime
1483
2158
  # Contains information about the location of the data source.
1484
2159
  # @return [Types::RetrievalResultLocation]
1485
2160
  #
2161
+ # @!attribute [rw] metadata
2162
+ # Contains metadata attributes and their values for the file in the
2163
+ # data source. For more information, see [Metadata and filtering][1].
2164
+ #
2165
+ #
2166
+ #
2167
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-ds.html#kb-ds-metadata
2168
+ # @return [Hash<String,Hash,Array,String,Numeric,Boolean>]
2169
+ #
1486
2170
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrievedReference AWS API Documentation
1487
2171
  #
1488
2172
  class RetrievedReference < Struct.new(
1489
2173
  :content,
1490
- :location)
1491
- SENSITIVE = [:content, :location]
2174
+ :location,
2175
+ :metadata)
2176
+ SENSITIVE = [:content, :location, :metadata]
2177
+ include Aws::Structure
2178
+ end
2179
+
2180
+ # Contains information to return from the action group that the agent
2181
+ # has predicted to invoke.
2182
+ #
2183
+ # This data type is used in the following API operations:
2184
+ #
2185
+ # * [Retrieve response][1]
2186
+ #
2187
+ # ^
2188
+ #
2189
+ #
2190
+ #
2191
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_ResponseSyntax
2192
+ #
2193
+ # @!attribute [rw] invocation_id
2194
+ # The identifier of the action group invocation.
2195
+ # @return [String]
2196
+ #
2197
+ # @!attribute [rw] invocation_inputs
2198
+ # A list of objects that contain information about the parameters and
2199
+ # inputs that need to be sent into the API operation or function,
2200
+ # based on what the agent determines from its session with the user.
2201
+ # @return [Array<Types::InvocationInputMember>]
2202
+ #
2203
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ReturnControlPayload AWS API Documentation
2204
+ #
2205
+ class ReturnControlPayload < Struct.new(
2206
+ :invocation_id,
2207
+ :invocation_inputs,
2208
+ :event_type)
2209
+ SENSITIVE = []
2210
+ include Aws::Structure
2211
+ end
2212
+
2213
+ # The unique wrapper object of the document from the S3 location.
2214
+ #
2215
+ # @!attribute [rw] uri
2216
+ # The file location of the S3 wrapper object.
2217
+ # @return [String]
2218
+ #
2219
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/S3ObjectDoc AWS API Documentation
2220
+ #
2221
+ class S3ObjectDoc < Struct.new(
2222
+ :uri)
2223
+ SENSITIVE = []
1492
2224
  include Aws::Structure
1493
2225
  end
1494
2226
 
@@ -1521,6 +2253,10 @@ module Aws::BedrockAgentRuntime
1521
2253
  # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html
1522
2254
  # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html
1523
2255
  #
2256
+ # @!attribute [rw] invocation_id
2257
+ # The identifier of the invocation.
2258
+ # @return [String]
2259
+ #
1524
2260
  # @!attribute [rw] prompt_session_attributes
1525
2261
  # Contains attributes that persist across a prompt and the values of
1526
2262
  # those attributes. These attributes replace the
@@ -1533,6 +2269,11 @@ module Aws::BedrockAgentRuntime
1533
2269
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html
1534
2270
  # @return [Hash<String,String>]
1535
2271
  #
2272
+ # @!attribute [rw] return_control_invocation_results
2273
+ # Contains information about the results from the action group
2274
+ # invocation.
2275
+ # @return [Array<Types::InvocationResultMember>]
2276
+ #
1536
2277
  # @!attribute [rw] session_attributes
1537
2278
  # Contains attributes that persist across a session and the values of
1538
2279
  # those attributes.
@@ -1541,7 +2282,9 @@ module Aws::BedrockAgentRuntime
1541
2282
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/SessionState AWS API Documentation
1542
2283
  #
1543
2284
  class SessionState < Struct.new(
2285
+ :invocation_id,
1544
2286
  :prompt_session_attributes,
2287
+ :return_control_invocation_results,
1545
2288
  :session_attributes)
1546
2289
  SENSITIVE = []
1547
2290
  include Aws::Structure
@@ -1692,6 +2435,10 @@ module Aws::BedrockAgentRuntime
1692
2435
  # The unique identifier of the agent.
1693
2436
  # @return [String]
1694
2437
  #
2438
+ # @!attribute [rw] agent_version
2439
+ # The version of the agent.
2440
+ # @return [String]
2441
+ #
1695
2442
  # @!attribute [rw] session_id
1696
2443
  # The unique identifier of the session with the agent.
1697
2444
  # @return [String]
@@ -1713,6 +2460,7 @@ module Aws::BedrockAgentRuntime
1713
2460
  class TracePart < Struct.new(
1714
2461
  :agent_alias_id,
1715
2462
  :agent_id,
2463
+ :agent_version,
1716
2464
  :session_id,
1717
2465
  :trace,
1718
2466
  :event_type)
@@ -1754,6 +2502,7 @@ module Aws::BedrockAgentRuntime
1754
2502
  :dependency_failed_exception,
1755
2503
  :internal_server_exception,
1756
2504
  :resource_not_found_exception,
2505
+ :return_control,
1757
2506
  :service_quota_exceeded_exception,
1758
2507
  :throttling_exception,
1759
2508
  :trace,