aws-sdk-bedrockagentruntime 1.34.0 → 1.35.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-bedrockagentruntime/client.rb +772 -7
- data/lib/aws-sdk-bedrockagentruntime/client_api.rb +218 -0
- data/lib/aws-sdk-bedrockagentruntime/event_streams.rb +89 -0
- data/lib/aws-sdk-bedrockagentruntime/types.rb +570 -3
- data/lib/aws-sdk-bedrockagentruntime.rb +1 -1
- data/sig/client.rbs +397 -4
- data/sig/types.rbs +167 -1
- metadata +2 -2
@@ -468,6 +468,45 @@ module Aws::BedrockAgentRuntime
|
|
468
468
|
include Aws::Structure
|
469
469
|
end
|
470
470
|
|
471
|
+
# Contains configurations for an Amazon Bedrock reranker model.
|
472
|
+
#
|
473
|
+
# @!attribute [rw] model_configuration
|
474
|
+
# Contains configurations for a reranker model.
|
475
|
+
# @return [Types::BedrockRerankingModelConfiguration]
|
476
|
+
#
|
477
|
+
# @!attribute [rw] number_of_results
|
478
|
+
# The number of results to return after reranking.
|
479
|
+
# @return [Integer]
|
480
|
+
#
|
481
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/BedrockRerankingConfiguration AWS API Documentation
|
482
|
+
#
|
483
|
+
class BedrockRerankingConfiguration < Struct.new(
|
484
|
+
:model_configuration,
|
485
|
+
:number_of_results)
|
486
|
+
SENSITIVE = []
|
487
|
+
include Aws::Structure
|
488
|
+
end
|
489
|
+
|
490
|
+
# Contains configurations for a reranker model.
|
491
|
+
#
|
492
|
+
# @!attribute [rw] additional_model_request_fields
|
493
|
+
# A JSON object whose keys are request fields for the model and whose
|
494
|
+
# values are values for those fields.
|
495
|
+
# @return [Hash<String,Hash,Array,String,Numeric,Boolean>]
|
496
|
+
#
|
497
|
+
# @!attribute [rw] model_arn
|
498
|
+
# The ARN of the reranker model.
|
499
|
+
# @return [String]
|
500
|
+
#
|
501
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/BedrockRerankingModelConfiguration AWS API Documentation
|
502
|
+
#
|
503
|
+
class BedrockRerankingModelConfiguration < Struct.new(
|
504
|
+
:additional_model_request_fields,
|
505
|
+
:model_arn)
|
506
|
+
SENSITIVE = []
|
507
|
+
include Aws::Structure
|
508
|
+
end
|
509
|
+
|
471
510
|
# This property contains the document to chat with, along with its
|
472
511
|
# attributes.
|
473
512
|
#
|
@@ -547,6 +586,21 @@ module Aws::BedrockAgentRuntime
|
|
547
586
|
include Aws::Structure
|
548
587
|
end
|
549
588
|
|
589
|
+
# A citation event.
|
590
|
+
#
|
591
|
+
# @!attribute [rw] citation
|
592
|
+
# The citation.
|
593
|
+
# @return [Types::Citation]
|
594
|
+
#
|
595
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/CitationEvent AWS API Documentation
|
596
|
+
#
|
597
|
+
class CitationEvent < Struct.new(
|
598
|
+
:citation,
|
599
|
+
:event_type)
|
600
|
+
SENSITIVE = []
|
601
|
+
include Aws::Structure
|
602
|
+
end
|
603
|
+
|
550
604
|
# Contains information about the code interpreter being invoked.
|
551
605
|
#
|
552
606
|
# @!attribute [rw] code
|
@@ -639,7 +693,7 @@ module Aws::BedrockAgentRuntime
|
|
639
693
|
# The trace behavior for the custom orchestration.
|
640
694
|
#
|
641
695
|
# @!attribute [rw] event
|
642
|
-
# The
|
696
|
+
# The event details used with the custom orchestration.
|
643
697
|
# @return [Types::CustomOrchestrationTraceEvent]
|
644
698
|
#
|
645
699
|
# @!attribute [rw] trace_id
|
@@ -655,7 +709,9 @@ module Aws::BedrockAgentRuntime
|
|
655
709
|
include Aws::Structure
|
656
710
|
end
|
657
711
|
|
658
|
-
# The event in the custom orchestration sequence.
|
712
|
+
# The event in the custom orchestration sequence. Events are the
|
713
|
+
# responses which the custom orchestration Lambda function sends as
|
714
|
+
# response to the agent.
|
659
715
|
#
|
660
716
|
# @!attribute [rw] text
|
661
717
|
# The text that prompted the event at this step.
|
@@ -824,6 +880,22 @@ module Aws::BedrockAgentRuntime
|
|
824
880
|
include Aws::Structure
|
825
881
|
end
|
826
882
|
|
883
|
+
# Contains information for a metadata field to include in or exclude
|
884
|
+
# from consideration when reranking.
|
885
|
+
#
|
886
|
+
# @!attribute [rw] field_name
|
887
|
+
# The name of a metadata field to include in or exclude from
|
888
|
+
# consideration when reranking.
|
889
|
+
# @return [String]
|
890
|
+
#
|
891
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FieldForReranking AWS API Documentation
|
892
|
+
#
|
893
|
+
class FieldForReranking < Struct.new(
|
894
|
+
:field_name)
|
895
|
+
SENSITIVE = []
|
896
|
+
include Aws::Structure
|
897
|
+
end
|
898
|
+
|
827
899
|
# Contains intermediate response for code interpreter if any files have
|
828
900
|
# been generated.
|
829
901
|
#
|
@@ -1746,6 +1818,21 @@ module Aws::BedrockAgentRuntime
|
|
1746
1818
|
include Aws::Structure
|
1747
1819
|
end
|
1748
1820
|
|
1821
|
+
# A guardrail event.
|
1822
|
+
#
|
1823
|
+
# @!attribute [rw] action
|
1824
|
+
# The guardrail action.
|
1825
|
+
# @return [String]
|
1826
|
+
#
|
1827
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GuardrailEvent AWS API Documentation
|
1828
|
+
#
|
1829
|
+
class GuardrailEvent < Struct.new(
|
1830
|
+
:action,
|
1831
|
+
:event_type)
|
1832
|
+
SENSITIVE = []
|
1833
|
+
include Aws::Structure
|
1834
|
+
end
|
1835
|
+
|
1749
1836
|
# The managed word details for the filter in the Guardrail.
|
1750
1837
|
#
|
1751
1838
|
# @!attribute [rw] action
|
@@ -1932,6 +2019,26 @@ module Aws::BedrockAgentRuntime
|
|
1932
2019
|
include Aws::Structure
|
1933
2020
|
end
|
1934
2021
|
|
2022
|
+
# Settings for implicit filtering, where a model generates a metadata
|
2023
|
+
# filter based on the prompt.
|
2024
|
+
#
|
2025
|
+
# @!attribute [rw] metadata_attributes
|
2026
|
+
# Metadata that can be used in a filter.
|
2027
|
+
# @return [Array<Types::MetadataAttributeSchema>]
|
2028
|
+
#
|
2029
|
+
# @!attribute [rw] model_arn
|
2030
|
+
# The model that generates the filter.
|
2031
|
+
# @return [String]
|
2032
|
+
#
|
2033
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ImplicitFilterConfiguration AWS API Documentation
|
2034
|
+
#
|
2035
|
+
class ImplicitFilterConfiguration < Struct.new(
|
2036
|
+
:metadata_attributes,
|
2037
|
+
:model_arn)
|
2038
|
+
SENSITIVE = [:metadata_attributes]
|
2039
|
+
include Aws::Structure
|
2040
|
+
end
|
2041
|
+
|
1935
2042
|
# The configuration for inference settings when generating responses
|
1936
2043
|
# using RetrieveAndGenerate.
|
1937
2044
|
#
|
@@ -2914,6 +3021,10 @@ module Aws::BedrockAgentRuntime
|
|
2914
3021
|
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
|
2915
3022
|
# @return [Types::RetrievalFilter]
|
2916
3023
|
#
|
3024
|
+
# @!attribute [rw] implicit_filter_configuration
|
3025
|
+
# Settings for implicit filtering.
|
3026
|
+
# @return [Types::ImplicitFilterConfiguration]
|
3027
|
+
#
|
2917
3028
|
# @!attribute [rw] number_of_results
|
2918
3029
|
# The number of source chunks to retrieve.
|
2919
3030
|
# @return [Integer]
|
@@ -2933,12 +3044,24 @@ module Aws::BedrockAgentRuntime
|
|
2933
3044
|
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-test.html
|
2934
3045
|
# @return [String]
|
2935
3046
|
#
|
3047
|
+
# @!attribute [rw] reranking_configuration
|
3048
|
+
# Contains configurations for reranking the retrieved results. For
|
3049
|
+
# more information, see [Improve the relevance of query responses with
|
3050
|
+
# a reranker model][1].
|
3051
|
+
#
|
3052
|
+
#
|
3053
|
+
#
|
3054
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/rerank.html
|
3055
|
+
# @return [Types::VectorSearchRerankingConfiguration]
|
3056
|
+
#
|
2936
3057
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseVectorSearchConfiguration AWS API Documentation
|
2937
3058
|
#
|
2938
3059
|
class KnowledgeBaseVectorSearchConfiguration < Struct.new(
|
2939
3060
|
:filter,
|
3061
|
+
:implicit_filter_configuration,
|
2940
3062
|
:number_of_results,
|
2941
|
-
:override_search_type
|
3063
|
+
:override_search_type,
|
3064
|
+
:reranking_configuration)
|
2942
3065
|
SENSITIVE = [:filter]
|
2943
3066
|
include Aws::Structure
|
2944
3067
|
end
|
@@ -3013,6 +3136,52 @@ module Aws::BedrockAgentRuntime
|
|
3013
3136
|
include Aws::Structure
|
3014
3137
|
end
|
3015
3138
|
|
3139
|
+
# Details about a metadata attribute.
|
3140
|
+
#
|
3141
|
+
# @!attribute [rw] description
|
3142
|
+
# The attribute's description.
|
3143
|
+
# @return [String]
|
3144
|
+
#
|
3145
|
+
# @!attribute [rw] key
|
3146
|
+
# The attribute's key.
|
3147
|
+
# @return [String]
|
3148
|
+
#
|
3149
|
+
# @!attribute [rw] type
|
3150
|
+
# The attribute's type.
|
3151
|
+
# @return [String]
|
3152
|
+
#
|
3153
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/MetadataAttributeSchema AWS API Documentation
|
3154
|
+
#
|
3155
|
+
class MetadataAttributeSchema < Struct.new(
|
3156
|
+
:description,
|
3157
|
+
:key,
|
3158
|
+
:type)
|
3159
|
+
SENSITIVE = []
|
3160
|
+
include Aws::Structure
|
3161
|
+
end
|
3162
|
+
|
3163
|
+
# Contains configurations for the metadata to use in reranking.
|
3164
|
+
#
|
3165
|
+
# @!attribute [rw] selection_mode
|
3166
|
+
# Specifies whether to consider all metadata when reranking, or only
|
3167
|
+
# the metadata that you select. If you specify `SELECTIVE`, include
|
3168
|
+
# the `selectiveModeConfiguration` field.
|
3169
|
+
# @return [String]
|
3170
|
+
#
|
3171
|
+
# @!attribute [rw] selective_mode_configuration
|
3172
|
+
# Contains configurations for the metadata fields to include or
|
3173
|
+
# exclude when considering reranking.
|
3174
|
+
# @return [Types::RerankingMetadataSelectiveModeConfiguration]
|
3175
|
+
#
|
3176
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/MetadataConfigurationForReranking AWS API Documentation
|
3177
|
+
#
|
3178
|
+
class MetadataConfigurationForReranking < Struct.new(
|
3179
|
+
:selection_mode,
|
3180
|
+
:selective_mode_configuration)
|
3181
|
+
SENSITIVE = []
|
3182
|
+
include Aws::Structure
|
3183
|
+
end
|
3184
|
+
|
3016
3185
|
# The input for the pre-processing step.
|
3017
3186
|
#
|
3018
3187
|
# * The `type` matches the agent step.
|
@@ -3885,6 +4054,213 @@ module Aws::BedrockAgentRuntime
|
|
3885
4054
|
include Aws::Structure
|
3886
4055
|
end
|
3887
4056
|
|
4057
|
+
# Contains information about a document to rerank. Choose the `type` to
|
4058
|
+
# define and include the field that corresponds to the type.
|
4059
|
+
#
|
4060
|
+
# @!attribute [rw] json_document
|
4061
|
+
# Contains a JSON document to rerank.
|
4062
|
+
# @return [Hash,Array,String,Numeric,Boolean]
|
4063
|
+
#
|
4064
|
+
# @!attribute [rw] text_document
|
4065
|
+
# Contains information about a text document to rerank.
|
4066
|
+
# @return [Types::RerankTextDocument]
|
4067
|
+
#
|
4068
|
+
# @!attribute [rw] type
|
4069
|
+
# The type of document to rerank.
|
4070
|
+
# @return [String]
|
4071
|
+
#
|
4072
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RerankDocument AWS API Documentation
|
4073
|
+
#
|
4074
|
+
class RerankDocument < Struct.new(
|
4075
|
+
:json_document,
|
4076
|
+
:text_document,
|
4077
|
+
:type)
|
4078
|
+
SENSITIVE = [:text_document]
|
4079
|
+
include Aws::Structure
|
4080
|
+
end
|
4081
|
+
|
4082
|
+
# Contains information about a query to submit to the reranker model.
|
4083
|
+
#
|
4084
|
+
# @!attribute [rw] text_query
|
4085
|
+
# Contains information about a text query.
|
4086
|
+
# @return [Types::RerankTextDocument]
|
4087
|
+
#
|
4088
|
+
# @!attribute [rw] type
|
4089
|
+
# The type of the query.
|
4090
|
+
# @return [String]
|
4091
|
+
#
|
4092
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RerankQuery AWS API Documentation
|
4093
|
+
#
|
4094
|
+
class RerankQuery < Struct.new(
|
4095
|
+
:text_query,
|
4096
|
+
:type)
|
4097
|
+
SENSITIVE = [:text_query]
|
4098
|
+
include Aws::Structure
|
4099
|
+
end
|
4100
|
+
|
4101
|
+
# @!attribute [rw] next_token
|
4102
|
+
# If the total number of results was greater than could fit in a
|
4103
|
+
# response, a token is returned in the `nextToken` field. You can
|
4104
|
+
# enter that token in this field to return the next batch of results.
|
4105
|
+
# @return [String]
|
4106
|
+
#
|
4107
|
+
# @!attribute [rw] queries
|
4108
|
+
# An array of objects, each of which contains information about a
|
4109
|
+
# query to submit to the reranker model.
|
4110
|
+
# @return [Array<Types::RerankQuery>]
|
4111
|
+
#
|
4112
|
+
# @!attribute [rw] reranking_configuration
|
4113
|
+
# Contains configurations for reranking.
|
4114
|
+
# @return [Types::RerankingConfiguration]
|
4115
|
+
#
|
4116
|
+
# @!attribute [rw] sources
|
4117
|
+
# An array of objects, each of which contains information about the
|
4118
|
+
# sources to rerank.
|
4119
|
+
# @return [Array<Types::RerankSource>]
|
4120
|
+
#
|
4121
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RerankRequest AWS API Documentation
|
4122
|
+
#
|
4123
|
+
class RerankRequest < Struct.new(
|
4124
|
+
:next_token,
|
4125
|
+
:queries,
|
4126
|
+
:reranking_configuration,
|
4127
|
+
:sources)
|
4128
|
+
SENSITIVE = [:queries, :sources]
|
4129
|
+
include Aws::Structure
|
4130
|
+
end
|
4131
|
+
|
4132
|
+
# @!attribute [rw] next_token
|
4133
|
+
# If the total number of results is greater than can fit in the
|
4134
|
+
# response, use this token in the `nextToken` field when making
|
4135
|
+
# another request to return the next batch of results.
|
4136
|
+
# @return [String]
|
4137
|
+
#
|
4138
|
+
# @!attribute [rw] results
|
4139
|
+
# An array of objects, each of which contains information about the
|
4140
|
+
# results of reranking.
|
4141
|
+
# @return [Array<Types::RerankResult>]
|
4142
|
+
#
|
4143
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RerankResponse AWS API Documentation
|
4144
|
+
#
|
4145
|
+
class RerankResponse < Struct.new(
|
4146
|
+
:next_token,
|
4147
|
+
:results)
|
4148
|
+
SENSITIVE = []
|
4149
|
+
include Aws::Structure
|
4150
|
+
end
|
4151
|
+
|
4152
|
+
# Contains information about a document that was reranked.
|
4153
|
+
#
|
4154
|
+
# @!attribute [rw] document
|
4155
|
+
# Contains information about the document.
|
4156
|
+
# @return [Types::RerankDocument]
|
4157
|
+
#
|
4158
|
+
# @!attribute [rw] index
|
4159
|
+
# The ranking of the document. The lower a number, the higher the
|
4160
|
+
# document is ranked.
|
4161
|
+
# @return [Integer]
|
4162
|
+
#
|
4163
|
+
# @!attribute [rw] relevance_score
|
4164
|
+
# The relevance score of the document.
|
4165
|
+
# @return [Float]
|
4166
|
+
#
|
4167
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RerankResult AWS API Documentation
|
4168
|
+
#
|
4169
|
+
class RerankResult < Struct.new(
|
4170
|
+
:document,
|
4171
|
+
:index,
|
4172
|
+
:relevance_score)
|
4173
|
+
SENSITIVE = [:document]
|
4174
|
+
include Aws::Structure
|
4175
|
+
end
|
4176
|
+
|
4177
|
+
# Contains information about a source for reranking.
|
4178
|
+
#
|
4179
|
+
# @!attribute [rw] inline_document_source
|
4180
|
+
# Contains an inline definition of a source for reranking.
|
4181
|
+
# @return [Types::RerankDocument]
|
4182
|
+
#
|
4183
|
+
# @!attribute [rw] type
|
4184
|
+
# The type of the source.
|
4185
|
+
# @return [String]
|
4186
|
+
#
|
4187
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RerankSource AWS API Documentation
|
4188
|
+
#
|
4189
|
+
class RerankSource < Struct.new(
|
4190
|
+
:inline_document_source,
|
4191
|
+
:type)
|
4192
|
+
SENSITIVE = [:inline_document_source]
|
4193
|
+
include Aws::Structure
|
4194
|
+
end
|
4195
|
+
|
4196
|
+
# Contains information about a text document to rerank.
|
4197
|
+
#
|
4198
|
+
# @!attribute [rw] text
|
4199
|
+
# The text of the document.
|
4200
|
+
# @return [String]
|
4201
|
+
#
|
4202
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RerankTextDocument AWS API Documentation
|
4203
|
+
#
|
4204
|
+
class RerankTextDocument < Struct.new(
|
4205
|
+
:text)
|
4206
|
+
SENSITIVE = []
|
4207
|
+
include Aws::Structure
|
4208
|
+
end
|
4209
|
+
|
4210
|
+
# Contains configurations for reranking.
|
4211
|
+
#
|
4212
|
+
# @!attribute [rw] bedrock_reranking_configuration
|
4213
|
+
# Contains configurations for an Amazon Bedrock reranker.
|
4214
|
+
# @return [Types::BedrockRerankingConfiguration]
|
4215
|
+
#
|
4216
|
+
# @!attribute [rw] type
|
4217
|
+
# The type of reranker that the configurations apply to.
|
4218
|
+
# @return [String]
|
4219
|
+
#
|
4220
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RerankingConfiguration AWS API Documentation
|
4221
|
+
#
|
4222
|
+
class RerankingConfiguration < Struct.new(
|
4223
|
+
:bedrock_reranking_configuration,
|
4224
|
+
:type)
|
4225
|
+
SENSITIVE = []
|
4226
|
+
include Aws::Structure
|
4227
|
+
end
|
4228
|
+
|
4229
|
+
# Contains configurations for the metadata fields to include or exclude
|
4230
|
+
# when considering reranking. If you include the `fieldsToExclude`
|
4231
|
+
# field, the reranker ignores all the metadata fields that you specify.
|
4232
|
+
# If you include the `fieldsToInclude` field, the reranker uses only the
|
4233
|
+
# metadata fields that you specify and ignores all others. You can
|
4234
|
+
# include only one of these fields.
|
4235
|
+
#
|
4236
|
+
# @note RerankingMetadataSelectiveModeConfiguration is a union - when making an API calls you must set exactly one of the members.
|
4237
|
+
#
|
4238
|
+
# @!attribute [rw] fields_to_exclude
|
4239
|
+
# An array of objects, each of which specifies a metadata field to
|
4240
|
+
# exclude from consideration when reranking.
|
4241
|
+
# @return [Array<Types::FieldForReranking>]
|
4242
|
+
#
|
4243
|
+
# @!attribute [rw] fields_to_include
|
4244
|
+
# An array of objects, each of which specifies a metadata field to
|
4245
|
+
# include in consideration when reranking. The remaining metadata
|
4246
|
+
# fields are ignored.
|
4247
|
+
# @return [Array<Types::FieldForReranking>]
|
4248
|
+
#
|
4249
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RerankingMetadataSelectiveModeConfiguration AWS API Documentation
|
4250
|
+
#
|
4251
|
+
class RerankingMetadataSelectiveModeConfiguration < Struct.new(
|
4252
|
+
:fields_to_exclude,
|
4253
|
+
:fields_to_include,
|
4254
|
+
:unknown)
|
4255
|
+
SENSITIVE = [:fields_to_exclude, :fields_to_include]
|
4256
|
+
include Aws::Structure
|
4257
|
+
include Aws::Structure::Union
|
4258
|
+
|
4259
|
+
class FieldsToExclude < RerankingMetadataSelectiveModeConfiguration; end
|
4260
|
+
class FieldsToInclude < RerankingMetadataSelectiveModeConfiguration; end
|
4261
|
+
class Unknown < RerankingMetadataSelectiveModeConfiguration; end
|
4262
|
+
end
|
4263
|
+
|
3888
4264
|
# The specified resource Amazon Resource Name (ARN) was not found. Check
|
3889
4265
|
# the Amazon Resource Name (ARN) and try your request again.
|
3890
4266
|
#
|
@@ -4140,6 +4516,21 @@ module Aws::BedrockAgentRuntime
|
|
4140
4516
|
include Aws::Structure
|
4141
4517
|
end
|
4142
4518
|
|
4519
|
+
# Contains information about the location of a document in a custom data
|
4520
|
+
# source.
|
4521
|
+
#
|
4522
|
+
# @!attribute [rw] id
|
4523
|
+
# The ID of the document.
|
4524
|
+
# @return [String]
|
4525
|
+
#
|
4526
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrievalResultCustomDocumentLocation AWS API Documentation
|
4527
|
+
#
|
4528
|
+
class RetrievalResultCustomDocumentLocation < Struct.new(
|
4529
|
+
:id)
|
4530
|
+
SENSITIVE = []
|
4531
|
+
include Aws::Structure
|
4532
|
+
end
|
4533
|
+
|
4143
4534
|
# Contains information about the data source location.
|
4144
4535
|
#
|
4145
4536
|
# This data type is used in the following API operations:
|
@@ -4160,6 +4551,10 @@ module Aws::BedrockAgentRuntime
|
|
4160
4551
|
# The Confluence data source location.
|
4161
4552
|
# @return [Types::RetrievalResultConfluenceLocation]
|
4162
4553
|
#
|
4554
|
+
# @!attribute [rw] custom_document_location
|
4555
|
+
# Specifies the location of a document in a custom data source.
|
4556
|
+
# @return [Types::RetrievalResultCustomDocumentLocation]
|
4557
|
+
#
|
4163
4558
|
# @!attribute [rw] s3_location
|
4164
4559
|
# The S3 data source location.
|
4165
4560
|
# @return [Types::RetrievalResultS3Location]
|
@@ -4184,6 +4579,7 @@ module Aws::BedrockAgentRuntime
|
|
4184
4579
|
#
|
4185
4580
|
class RetrievalResultLocation < Struct.new(
|
4186
4581
|
:confluence_location,
|
4582
|
+
:custom_document_location,
|
4187
4583
|
:s3_location,
|
4188
4584
|
:salesforce_location,
|
4189
4585
|
:share_point_location,
|
@@ -4352,6 +4748,21 @@ module Aws::BedrockAgentRuntime
|
|
4352
4748
|
include Aws::Structure
|
4353
4749
|
end
|
4354
4750
|
|
4751
|
+
# A retrieve and generate output event.
|
4752
|
+
#
|
4753
|
+
# @!attribute [rw] text
|
4754
|
+
# A text response.
|
4755
|
+
# @return [String]
|
4756
|
+
#
|
4757
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveAndGenerateOutputEvent AWS API Documentation
|
4758
|
+
#
|
4759
|
+
class RetrieveAndGenerateOutputEvent < Struct.new(
|
4760
|
+
:text,
|
4761
|
+
:event_type)
|
4762
|
+
SENSITIVE = []
|
4763
|
+
include Aws::Structure
|
4764
|
+
end
|
4765
|
+
|
4355
4766
|
# @!attribute [rw] input
|
4356
4767
|
# Contains the query to be made to the knowledge base.
|
4357
4768
|
# @return [Types::RetrieveAndGenerateInput]
|
@@ -4448,6 +4859,64 @@ module Aws::BedrockAgentRuntime
|
|
4448
4859
|
include Aws::Structure
|
4449
4860
|
end
|
4450
4861
|
|
4862
|
+
# @!attribute [rw] input
|
4863
|
+
# Contains the query to be made to the knowledge base.
|
4864
|
+
# @return [Types::RetrieveAndGenerateInput]
|
4865
|
+
#
|
4866
|
+
# @!attribute [rw] retrieve_and_generate_configuration
|
4867
|
+
# Contains configurations for the knowledge base query and retrieval
|
4868
|
+
# process. For more information, see [Query configurations][1].
|
4869
|
+
#
|
4870
|
+
#
|
4871
|
+
#
|
4872
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
|
4873
|
+
# @return [Types::RetrieveAndGenerateConfiguration]
|
4874
|
+
#
|
4875
|
+
# @!attribute [rw] session_configuration
|
4876
|
+
# Contains details about the session with the knowledge base.
|
4877
|
+
# @return [Types::RetrieveAndGenerateSessionConfiguration]
|
4878
|
+
#
|
4879
|
+
# @!attribute [rw] session_id
|
4880
|
+
# The unique identifier of the session. When you first make a
|
4881
|
+
# `RetrieveAndGenerate` request, Amazon Bedrock automatically
|
4882
|
+
# generates this value. You must reuse this value for all subsequent
|
4883
|
+
# requests in the same conversational session. This value allows
|
4884
|
+
# Amazon Bedrock to maintain context and knowledge from previous
|
4885
|
+
# interactions. You can't explicitly set the `sessionId` yourself.
|
4886
|
+
# @return [String]
|
4887
|
+
#
|
4888
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveAndGenerateStreamRequest AWS API Documentation
|
4889
|
+
#
|
4890
|
+
class RetrieveAndGenerateStreamRequest < Struct.new(
|
4891
|
+
:input,
|
4892
|
+
:retrieve_and_generate_configuration,
|
4893
|
+
:session_configuration,
|
4894
|
+
:session_id)
|
4895
|
+
SENSITIVE = [:input]
|
4896
|
+
include Aws::Structure
|
4897
|
+
end
|
4898
|
+
|
4899
|
+
# @!attribute [rw] session_id
|
4900
|
+
# The session ID.
|
4901
|
+
# @return [String]
|
4902
|
+
#
|
4903
|
+
# @!attribute [rw] stream
|
4904
|
+
# A stream of events from the model.
|
4905
|
+
# @return [Types::RetrieveAndGenerateStreamResponseOutput]
|
4906
|
+
#
|
4907
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveAndGenerateStreamResponse AWS API Documentation
|
4908
|
+
#
|
4909
|
+
class RetrieveAndGenerateStreamResponse < Struct.new(
|
4910
|
+
:session_id,
|
4911
|
+
:stream)
|
4912
|
+
SENSITIVE = []
|
4913
|
+
include Aws::Structure
|
4914
|
+
end
|
4915
|
+
|
4916
|
+
# @!attribute [rw] guardrail_configuration
|
4917
|
+
# Guardrail settings.
|
4918
|
+
# @return [Types::GuardrailConfiguration]
|
4919
|
+
#
|
4451
4920
|
# @!attribute [rw] knowledge_base_id
|
4452
4921
|
# The unique identifier of the knowledge base to query.
|
4453
4922
|
# @return [String]
|
@@ -4474,6 +4943,7 @@ module Aws::BedrockAgentRuntime
|
|
4474
4943
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveRequest AWS API Documentation
|
4475
4944
|
#
|
4476
4945
|
class RetrieveRequest < Struct.new(
|
4946
|
+
:guardrail_configuration,
|
4477
4947
|
:knowledge_base_id,
|
4478
4948
|
:next_token,
|
4479
4949
|
:retrieval_configuration,
|
@@ -4482,6 +4952,10 @@ module Aws::BedrockAgentRuntime
|
|
4482
4952
|
include Aws::Structure
|
4483
4953
|
end
|
4484
4954
|
|
4955
|
+
# @!attribute [rw] guardrail_action
|
4956
|
+
# Specifies if there is a guardrail intervention in the response.
|
4957
|
+
# @return [String]
|
4958
|
+
#
|
4485
4959
|
# @!attribute [rw] next_token
|
4486
4960
|
# If there are more results than can fit in the response, the response
|
4487
4961
|
# returns a `nextToken`. Use this token in the `nextToken` field of
|
@@ -4495,6 +4969,7 @@ module Aws::BedrockAgentRuntime
|
|
4495
4969
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveResponse AWS API Documentation
|
4496
4970
|
#
|
4497
4971
|
class RetrieveResponse < Struct.new(
|
4972
|
+
:guardrail_action,
|
4498
4973
|
:next_token,
|
4499
4974
|
:retrieval_results)
|
4500
4975
|
SENSITIVE = [:retrieval_results]
|
@@ -5036,6 +5511,70 @@ module Aws::BedrockAgentRuntime
|
|
5036
5511
|
include Aws::Structure
|
5037
5512
|
end
|
5038
5513
|
|
5514
|
+
# Contains configurations for reranking with an Amazon Bedrock reranker
|
5515
|
+
# model.
|
5516
|
+
#
|
5517
|
+
# @!attribute [rw] metadata_configuration
|
5518
|
+
# Contains configurations for the metadata to use in reranking.
|
5519
|
+
# @return [Types::MetadataConfigurationForReranking]
|
5520
|
+
#
|
5521
|
+
# @!attribute [rw] model_configuration
|
5522
|
+
# Contains configurations for the reranker model.
|
5523
|
+
# @return [Types::VectorSearchBedrockRerankingModelConfiguration]
|
5524
|
+
#
|
5525
|
+
# @!attribute [rw] number_of_reranked_results
|
5526
|
+
# The number of results to return after reranking.
|
5527
|
+
# @return [Integer]
|
5528
|
+
#
|
5529
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/VectorSearchBedrockRerankingConfiguration AWS API Documentation
|
5530
|
+
#
|
5531
|
+
class VectorSearchBedrockRerankingConfiguration < Struct.new(
|
5532
|
+
:metadata_configuration,
|
5533
|
+
:model_configuration,
|
5534
|
+
:number_of_reranked_results)
|
5535
|
+
SENSITIVE = []
|
5536
|
+
include Aws::Structure
|
5537
|
+
end
|
5538
|
+
|
5539
|
+
# Contains configurations for an Amazon Bedrock reranker model.
|
5540
|
+
#
|
5541
|
+
# @!attribute [rw] additional_model_request_fields
|
5542
|
+
# A JSON object whose keys are request fields for the model and whose
|
5543
|
+
# values are values for those fields.
|
5544
|
+
# @return [Hash<String,Hash,Array,String,Numeric,Boolean>]
|
5545
|
+
#
|
5546
|
+
# @!attribute [rw] model_arn
|
5547
|
+
# The ARN of the reranker model to use.
|
5548
|
+
# @return [String]
|
5549
|
+
#
|
5550
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/VectorSearchBedrockRerankingModelConfiguration AWS API Documentation
|
5551
|
+
#
|
5552
|
+
class VectorSearchBedrockRerankingModelConfiguration < Struct.new(
|
5553
|
+
:additional_model_request_fields,
|
5554
|
+
:model_arn)
|
5555
|
+
SENSITIVE = []
|
5556
|
+
include Aws::Structure
|
5557
|
+
end
|
5558
|
+
|
5559
|
+
# Contains configurations for reranking the retrieved results.
|
5560
|
+
#
|
5561
|
+
# @!attribute [rw] bedrock_reranking_configuration
|
5562
|
+
# Contains configurations for an Amazon Bedrock reranker model.
|
5563
|
+
# @return [Types::VectorSearchBedrockRerankingConfiguration]
|
5564
|
+
#
|
5565
|
+
# @!attribute [rw] type
|
5566
|
+
# The type of reranker model.
|
5567
|
+
# @return [String]
|
5568
|
+
#
|
5569
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/VectorSearchRerankingConfiguration AWS API Documentation
|
5570
|
+
#
|
5571
|
+
class VectorSearchRerankingConfiguration < Struct.new(
|
5572
|
+
:bedrock_reranking_configuration,
|
5573
|
+
:type)
|
5574
|
+
SENSITIVE = []
|
5575
|
+
include Aws::Structure
|
5576
|
+
end
|
5577
|
+
|
5039
5578
|
# The output of the flow.
|
5040
5579
|
#
|
5041
5580
|
# EventStream is an Enumerator of Events.
|
@@ -5148,6 +5687,34 @@ module Aws::BedrockAgentRuntime
|
|
5148
5687
|
|
5149
5688
|
end
|
5150
5689
|
|
5690
|
+
# A retrieve and generate stream response output.
|
5691
|
+
#
|
5692
|
+
# EventStream is an Enumerator of Events.
|
5693
|
+
# #event_types #=> Array, returns all modeled event types in the stream
|
5694
|
+
#
|
5695
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveAndGenerateStreamResponseOutput AWS API Documentation
|
5696
|
+
#
|
5697
|
+
class RetrieveAndGenerateStreamResponseOutput < Enumerator
|
5698
|
+
|
5699
|
+
def event_types
|
5700
|
+
[
|
5701
|
+
:access_denied_exception,
|
5702
|
+
:bad_gateway_exception,
|
5703
|
+
:citation,
|
5704
|
+
:conflict_exception,
|
5705
|
+
:dependency_failed_exception,
|
5706
|
+
:guardrail,
|
5707
|
+
:internal_server_exception,
|
5708
|
+
:output,
|
5709
|
+
:resource_not_found_exception,
|
5710
|
+
:service_quota_exceeded_exception,
|
5711
|
+
:throttling_exception,
|
5712
|
+
:validation_exception
|
5713
|
+
]
|
5714
|
+
end
|
5715
|
+
|
5716
|
+
end
|
5717
|
+
|
5151
5718
|
end
|
5152
5719
|
end
|
5153
5720
|
|