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
data/sig/client.rbs
CHANGED
@@ -207,8 +207,44 @@ module Aws
|
|
207
207
|
}
|
208
208
|
}?
|
209
209
|
}?,
|
210
|
+
implicit_filter_configuration: {
|
211
|
+
metadata_attributes: Array[
|
212
|
+
{
|
213
|
+
description: ::String,
|
214
|
+
key: ::String,
|
215
|
+
type: ("STRING" | "NUMBER" | "BOOLEAN" | "STRING_LIST")
|
216
|
+
},
|
217
|
+
],
|
218
|
+
model_arn: ::String
|
219
|
+
}?,
|
210
220
|
number_of_results: ::Integer?,
|
211
|
-
override_search_type: ("HYBRID" | "SEMANTIC")
|
221
|
+
override_search_type: ("HYBRID" | "SEMANTIC")?,
|
222
|
+
reranking_configuration: {
|
223
|
+
bedrock_reranking_configuration: {
|
224
|
+
metadata_configuration: {
|
225
|
+
selection_mode: ("SELECTIVE" | "ALL"),
|
226
|
+
selective_mode_configuration: {
|
227
|
+
fields_to_exclude: Array[
|
228
|
+
{
|
229
|
+
field_name: ::String
|
230
|
+
},
|
231
|
+
]?,
|
232
|
+
fields_to_include: Array[
|
233
|
+
{
|
234
|
+
field_name: ::String
|
235
|
+
},
|
236
|
+
]?
|
237
|
+
}?
|
238
|
+
}?,
|
239
|
+
model_configuration: {
|
240
|
+
additional_model_request_fields: Hash[::String, {
|
241
|
+
}]?,
|
242
|
+
model_arn: ::String
|
243
|
+
},
|
244
|
+
number_of_reranked_results: ::Integer?
|
245
|
+
}?,
|
246
|
+
type: ("BEDROCK_RERANKING_MODEL")
|
247
|
+
}?
|
212
248
|
}
|
213
249
|
}
|
214
250
|
},
|
@@ -434,8 +470,44 @@ module Aws
|
|
434
470
|
}
|
435
471
|
}?
|
436
472
|
}?,
|
473
|
+
implicit_filter_configuration: {
|
474
|
+
metadata_attributes: Array[
|
475
|
+
{
|
476
|
+
description: ::String,
|
477
|
+
key: ::String,
|
478
|
+
type: ("STRING" | "NUMBER" | "BOOLEAN" | "STRING_LIST")
|
479
|
+
},
|
480
|
+
],
|
481
|
+
model_arn: ::String
|
482
|
+
}?,
|
437
483
|
number_of_results: ::Integer?,
|
438
|
-
override_search_type: ("HYBRID" | "SEMANTIC")
|
484
|
+
override_search_type: ("HYBRID" | "SEMANTIC")?,
|
485
|
+
reranking_configuration: {
|
486
|
+
bedrock_reranking_configuration: {
|
487
|
+
metadata_configuration: {
|
488
|
+
selection_mode: ("SELECTIVE" | "ALL"),
|
489
|
+
selective_mode_configuration: {
|
490
|
+
fields_to_exclude: Array[
|
491
|
+
{
|
492
|
+
field_name: ::String
|
493
|
+
},
|
494
|
+
]?,
|
495
|
+
fields_to_include: Array[
|
496
|
+
{
|
497
|
+
field_name: ::String
|
498
|
+
},
|
499
|
+
]?
|
500
|
+
}?
|
501
|
+
}?,
|
502
|
+
model_configuration: {
|
503
|
+
additional_model_request_fields: Hash[::String, {
|
504
|
+
}]?,
|
505
|
+
model_arn: ::String
|
506
|
+
},
|
507
|
+
number_of_reranked_results: ::Integer?
|
508
|
+
}?,
|
509
|
+
type: ("BEDROCK_RERANKING_MODEL")
|
510
|
+
}?
|
439
511
|
}
|
440
512
|
}?
|
441
513
|
},
|
@@ -478,13 +550,61 @@ module Aws
|
|
478
550
|
) ?{ (*untyped) -> void } -> _OptimizePromptResponseSuccess
|
479
551
|
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _OptimizePromptResponseSuccess
|
480
552
|
|
553
|
+
interface _RerankResponseSuccess
|
554
|
+
include ::Seahorse::Client::_ResponseSuccess[Types::RerankResponse]
|
555
|
+
def next_token: () -> ::String
|
556
|
+
def results: () -> ::Array[Types::RerankResult]
|
557
|
+
end
|
558
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockAgentRuntime/Client.html#rerank-instance_method
|
559
|
+
def rerank: (
|
560
|
+
?next_token: ::String,
|
561
|
+
queries: Array[
|
562
|
+
{
|
563
|
+
text_query: {
|
564
|
+
text: ::String?
|
565
|
+
},
|
566
|
+
type: ("TEXT")
|
567
|
+
},
|
568
|
+
],
|
569
|
+
reranking_configuration: {
|
570
|
+
bedrock_reranking_configuration: {
|
571
|
+
model_configuration: {
|
572
|
+
additional_model_request_fields: Hash[::String, {
|
573
|
+
}]?,
|
574
|
+
model_arn: ::String
|
575
|
+
},
|
576
|
+
number_of_results: ::Integer?
|
577
|
+
},
|
578
|
+
type: ("BEDROCK_RERANKING_MODEL")
|
579
|
+
},
|
580
|
+
sources: Array[
|
581
|
+
{
|
582
|
+
inline_document_source: {
|
583
|
+
json_document: {
|
584
|
+
}?,
|
585
|
+
text_document: {
|
586
|
+
text: ::String?
|
587
|
+
}?,
|
588
|
+
type: ("TEXT" | "JSON")
|
589
|
+
},
|
590
|
+
type: ("INLINE")
|
591
|
+
},
|
592
|
+
]
|
593
|
+
) -> _RerankResponseSuccess
|
594
|
+
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _RerankResponseSuccess
|
595
|
+
|
481
596
|
interface _RetrieveResponseSuccess
|
482
597
|
include ::Seahorse::Client::_ResponseSuccess[Types::RetrieveResponse]
|
598
|
+
def guardrail_action: () -> ("INTERVENED" | "NONE")
|
483
599
|
def next_token: () -> ::String
|
484
600
|
def retrieval_results: () -> ::Array[Types::KnowledgeBaseRetrievalResult]
|
485
601
|
end
|
486
602
|
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockAgentRuntime/Client.html#retrieve-instance_method
|
487
603
|
def retrieve: (
|
604
|
+
?guardrail_configuration: {
|
605
|
+
guardrail_id: ::String,
|
606
|
+
guardrail_version: ::String
|
607
|
+
},
|
488
608
|
knowledge_base_id: ::String,
|
489
609
|
?next_token: ::String,
|
490
610
|
?retrieval_configuration: {
|
@@ -552,8 +672,44 @@ module Aws
|
|
552
672
|
}
|
553
673
|
}?
|
554
674
|
}?,
|
675
|
+
implicit_filter_configuration: {
|
676
|
+
metadata_attributes: Array[
|
677
|
+
{
|
678
|
+
description: ::String,
|
679
|
+
key: ::String,
|
680
|
+
type: ("STRING" | "NUMBER" | "BOOLEAN" | "STRING_LIST")
|
681
|
+
},
|
682
|
+
],
|
683
|
+
model_arn: ::String
|
684
|
+
}?,
|
555
685
|
number_of_results: ::Integer?,
|
556
|
-
override_search_type: ("HYBRID" | "SEMANTIC")
|
686
|
+
override_search_type: ("HYBRID" | "SEMANTIC")?,
|
687
|
+
reranking_configuration: {
|
688
|
+
bedrock_reranking_configuration: {
|
689
|
+
metadata_configuration: {
|
690
|
+
selection_mode: ("SELECTIVE" | "ALL"),
|
691
|
+
selective_mode_configuration: {
|
692
|
+
fields_to_exclude: Array[
|
693
|
+
{
|
694
|
+
field_name: ::String
|
695
|
+
},
|
696
|
+
]?,
|
697
|
+
fields_to_include: Array[
|
698
|
+
{
|
699
|
+
field_name: ::String
|
700
|
+
},
|
701
|
+
]?
|
702
|
+
}?
|
703
|
+
}?,
|
704
|
+
model_configuration: {
|
705
|
+
additional_model_request_fields: Hash[::String, {
|
706
|
+
}]?,
|
707
|
+
model_arn: ::String
|
708
|
+
},
|
709
|
+
number_of_reranked_results: ::Integer?
|
710
|
+
}?,
|
711
|
+
type: ("BEDROCK_RERANKING_MODEL")
|
712
|
+
}?
|
557
713
|
}
|
558
714
|
},
|
559
715
|
retrieval_query: {
|
@@ -715,8 +871,44 @@ module Aws
|
|
715
871
|
}
|
716
872
|
}?
|
717
873
|
}?,
|
874
|
+
implicit_filter_configuration: {
|
875
|
+
metadata_attributes: Array[
|
876
|
+
{
|
877
|
+
description: ::String,
|
878
|
+
key: ::String,
|
879
|
+
type: ("STRING" | "NUMBER" | "BOOLEAN" | "STRING_LIST")
|
880
|
+
},
|
881
|
+
],
|
882
|
+
model_arn: ::String
|
883
|
+
}?,
|
718
884
|
number_of_results: ::Integer?,
|
719
|
-
override_search_type: ("HYBRID" | "SEMANTIC")
|
885
|
+
override_search_type: ("HYBRID" | "SEMANTIC")?,
|
886
|
+
reranking_configuration: {
|
887
|
+
bedrock_reranking_configuration: {
|
888
|
+
metadata_configuration: {
|
889
|
+
selection_mode: ("SELECTIVE" | "ALL"),
|
890
|
+
selective_mode_configuration: {
|
891
|
+
fields_to_exclude: Array[
|
892
|
+
{
|
893
|
+
field_name: ::String
|
894
|
+
},
|
895
|
+
]?,
|
896
|
+
fields_to_include: Array[
|
897
|
+
{
|
898
|
+
field_name: ::String
|
899
|
+
},
|
900
|
+
]?
|
901
|
+
}?
|
902
|
+
}?,
|
903
|
+
model_configuration: {
|
904
|
+
additional_model_request_fields: Hash[::String, {
|
905
|
+
}]?,
|
906
|
+
model_arn: ::String
|
907
|
+
},
|
908
|
+
number_of_reranked_results: ::Integer?
|
909
|
+
}?,
|
910
|
+
type: ("BEDROCK_RERANKING_MODEL")
|
911
|
+
}?
|
720
912
|
}
|
721
913
|
}?
|
722
914
|
}?,
|
@@ -728,6 +920,207 @@ module Aws
|
|
728
920
|
?session_id: ::String
|
729
921
|
) -> _RetrieveAndGenerateResponseSuccess
|
730
922
|
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _RetrieveAndGenerateResponseSuccess
|
923
|
+
|
924
|
+
interface _RetrieveAndGenerateStreamResponseSuccess
|
925
|
+
include ::Seahorse::Client::_ResponseSuccess[Types::RetrieveAndGenerateStreamResponse]
|
926
|
+
def session_id: () -> ::String
|
927
|
+
def stream: () -> Types::RetrieveAndGenerateStreamResponseOutput
|
928
|
+
end
|
929
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockAgentRuntime/Client.html#retrieve_and_generate_stream-instance_method
|
930
|
+
def retrieve_and_generate_stream: (
|
931
|
+
input: {
|
932
|
+
text: ::String
|
933
|
+
},
|
934
|
+
?retrieve_and_generate_configuration: {
|
935
|
+
external_sources_configuration: {
|
936
|
+
generation_configuration: {
|
937
|
+
additional_model_request_fields: Hash[::String, {
|
938
|
+
}]?,
|
939
|
+
guardrail_configuration: {
|
940
|
+
guardrail_id: ::String,
|
941
|
+
guardrail_version: ::String
|
942
|
+
}?,
|
943
|
+
inference_config: {
|
944
|
+
text_inference_config: {
|
945
|
+
max_tokens: ::Integer?,
|
946
|
+
stop_sequences: Array[::String]?,
|
947
|
+
temperature: ::Float?,
|
948
|
+
top_p: ::Float?
|
949
|
+
}?
|
950
|
+
}?,
|
951
|
+
prompt_template: {
|
952
|
+
text_prompt_template: ::String?
|
953
|
+
}?
|
954
|
+
}?,
|
955
|
+
model_arn: ::String,
|
956
|
+
sources: Array[
|
957
|
+
{
|
958
|
+
byte_content: {
|
959
|
+
content_type: ::String,
|
960
|
+
data: ::String,
|
961
|
+
identifier: ::String
|
962
|
+
}?,
|
963
|
+
s3_location: {
|
964
|
+
uri: ::String
|
965
|
+
}?,
|
966
|
+
source_type: ("S3" | "BYTE_CONTENT")
|
967
|
+
},
|
968
|
+
]
|
969
|
+
}?,
|
970
|
+
knowledge_base_configuration: {
|
971
|
+
generation_configuration: {
|
972
|
+
additional_model_request_fields: Hash[::String, {
|
973
|
+
}]?,
|
974
|
+
guardrail_configuration: {
|
975
|
+
guardrail_id: ::String,
|
976
|
+
guardrail_version: ::String
|
977
|
+
}?,
|
978
|
+
inference_config: {
|
979
|
+
text_inference_config: {
|
980
|
+
max_tokens: ::Integer?,
|
981
|
+
stop_sequences: Array[::String]?,
|
982
|
+
temperature: ::Float?,
|
983
|
+
top_p: ::Float?
|
984
|
+
}?
|
985
|
+
}?,
|
986
|
+
prompt_template: {
|
987
|
+
text_prompt_template: ::String?
|
988
|
+
}?
|
989
|
+
}?,
|
990
|
+
knowledge_base_id: ::String,
|
991
|
+
model_arn: ::String,
|
992
|
+
orchestration_configuration: {
|
993
|
+
additional_model_request_fields: Hash[::String, {
|
994
|
+
}]?,
|
995
|
+
inference_config: {
|
996
|
+
text_inference_config: {
|
997
|
+
max_tokens: ::Integer?,
|
998
|
+
stop_sequences: Array[::String]?,
|
999
|
+
temperature: ::Float?,
|
1000
|
+
top_p: ::Float?
|
1001
|
+
}?
|
1002
|
+
}?,
|
1003
|
+
prompt_template: {
|
1004
|
+
text_prompt_template: ::String?
|
1005
|
+
}?,
|
1006
|
+
query_transformation_configuration: {
|
1007
|
+
type: ("QUERY_DECOMPOSITION")
|
1008
|
+
}?
|
1009
|
+
}?,
|
1010
|
+
retrieval_configuration: {
|
1011
|
+
vector_search_configuration: {
|
1012
|
+
filter: {
|
1013
|
+
and_all: Array[
|
1014
|
+
untyped,
|
1015
|
+
]?,
|
1016
|
+
equals: {
|
1017
|
+
key: ::String,
|
1018
|
+
value: {
|
1019
|
+
}
|
1020
|
+
}?,
|
1021
|
+
greater_than: {
|
1022
|
+
key: ::String,
|
1023
|
+
value: {
|
1024
|
+
}
|
1025
|
+
}?,
|
1026
|
+
greater_than_or_equals: {
|
1027
|
+
key: ::String,
|
1028
|
+
value: {
|
1029
|
+
}
|
1030
|
+
}?,
|
1031
|
+
in: {
|
1032
|
+
key: ::String,
|
1033
|
+
value: {
|
1034
|
+
}
|
1035
|
+
}?,
|
1036
|
+
less_than: {
|
1037
|
+
key: ::String,
|
1038
|
+
value: {
|
1039
|
+
}
|
1040
|
+
}?,
|
1041
|
+
less_than_or_equals: {
|
1042
|
+
key: ::String,
|
1043
|
+
value: {
|
1044
|
+
}
|
1045
|
+
}?,
|
1046
|
+
list_contains: {
|
1047
|
+
key: ::String,
|
1048
|
+
value: {
|
1049
|
+
}
|
1050
|
+
}?,
|
1051
|
+
not_equals: {
|
1052
|
+
key: ::String,
|
1053
|
+
value: {
|
1054
|
+
}
|
1055
|
+
}?,
|
1056
|
+
not_in: {
|
1057
|
+
key: ::String,
|
1058
|
+
value: {
|
1059
|
+
}
|
1060
|
+
}?,
|
1061
|
+
or_all: Array[
|
1062
|
+
untyped,
|
1063
|
+
]?,
|
1064
|
+
starts_with: {
|
1065
|
+
key: ::String,
|
1066
|
+
value: {
|
1067
|
+
}
|
1068
|
+
}?,
|
1069
|
+
string_contains: {
|
1070
|
+
key: ::String,
|
1071
|
+
value: {
|
1072
|
+
}
|
1073
|
+
}?
|
1074
|
+
}?,
|
1075
|
+
implicit_filter_configuration: {
|
1076
|
+
metadata_attributes: Array[
|
1077
|
+
{
|
1078
|
+
description: ::String,
|
1079
|
+
key: ::String,
|
1080
|
+
type: ("STRING" | "NUMBER" | "BOOLEAN" | "STRING_LIST")
|
1081
|
+
},
|
1082
|
+
],
|
1083
|
+
model_arn: ::String
|
1084
|
+
}?,
|
1085
|
+
number_of_results: ::Integer?,
|
1086
|
+
override_search_type: ("HYBRID" | "SEMANTIC")?,
|
1087
|
+
reranking_configuration: {
|
1088
|
+
bedrock_reranking_configuration: {
|
1089
|
+
metadata_configuration: {
|
1090
|
+
selection_mode: ("SELECTIVE" | "ALL"),
|
1091
|
+
selective_mode_configuration: {
|
1092
|
+
fields_to_exclude: Array[
|
1093
|
+
{
|
1094
|
+
field_name: ::String
|
1095
|
+
},
|
1096
|
+
]?,
|
1097
|
+
fields_to_include: Array[
|
1098
|
+
{
|
1099
|
+
field_name: ::String
|
1100
|
+
},
|
1101
|
+
]?
|
1102
|
+
}?
|
1103
|
+
}?,
|
1104
|
+
model_configuration: {
|
1105
|
+
additional_model_request_fields: Hash[::String, {
|
1106
|
+
}]?,
|
1107
|
+
model_arn: ::String
|
1108
|
+
},
|
1109
|
+
number_of_reranked_results: ::Integer?
|
1110
|
+
}?,
|
1111
|
+
type: ("BEDROCK_RERANKING_MODEL")
|
1112
|
+
}?
|
1113
|
+
}
|
1114
|
+
}?
|
1115
|
+
}?,
|
1116
|
+
type: ("KNOWLEDGE_BASE" | "EXTERNAL_SOURCES")
|
1117
|
+
},
|
1118
|
+
?session_configuration: {
|
1119
|
+
kms_key_arn: ::String
|
1120
|
+
},
|
1121
|
+
?session_id: ::String
|
1122
|
+
) ?{ (*untyped) -> void } -> _RetrieveAndGenerateStreamResponseSuccess
|
1123
|
+
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _RetrieveAndGenerateStreamResponseSuccess
|
731
1124
|
end
|
732
1125
|
end
|
733
1126
|
end
|