aws-sdk-bedrockagentruntime 1.34.0 → 1.36.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 +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-bedrockagentruntime/client.rb +1141 -11
- data/lib/aws-sdk-bedrockagentruntime/client_api.rb +319 -0
- data/lib/aws-sdk-bedrockagentruntime/event_streams.rb +89 -0
- data/lib/aws-sdk-bedrockagentruntime/types.rb +902 -7
- data/lib/aws-sdk-bedrockagentruntime.rb +1 -1
- data/sig/client.rbs +414 -4
- data/sig/types.rbs +283 -7
- metadata +2 -2
data/sig/client.rbs
CHANGED
@@ -122,6 +122,18 @@ module Aws
|
|
122
122
|
?memory_id: ::String,
|
123
123
|
session_id: ::String,
|
124
124
|
?session_state: {
|
125
|
+
conversation_history: {
|
126
|
+
messages: Array[
|
127
|
+
{
|
128
|
+
content: Array[
|
129
|
+
{
|
130
|
+
text: ::String?
|
131
|
+
},
|
132
|
+
],
|
133
|
+
role: ("user" | "assistant")
|
134
|
+
},
|
135
|
+
]?
|
136
|
+
}?,
|
125
137
|
files: Array[
|
126
138
|
{
|
127
139
|
name: ::String,
|
@@ -207,8 +219,44 @@ module Aws
|
|
207
219
|
}
|
208
220
|
}?
|
209
221
|
}?,
|
222
|
+
implicit_filter_configuration: {
|
223
|
+
metadata_attributes: Array[
|
224
|
+
{
|
225
|
+
description: ::String,
|
226
|
+
key: ::String,
|
227
|
+
type: ("STRING" | "NUMBER" | "BOOLEAN" | "STRING_LIST")
|
228
|
+
},
|
229
|
+
],
|
230
|
+
model_arn: ::String
|
231
|
+
}?,
|
210
232
|
number_of_results: ::Integer?,
|
211
|
-
override_search_type: ("HYBRID" | "SEMANTIC")
|
233
|
+
override_search_type: ("HYBRID" | "SEMANTIC")?,
|
234
|
+
reranking_configuration: {
|
235
|
+
bedrock_reranking_configuration: {
|
236
|
+
metadata_configuration: {
|
237
|
+
selection_mode: ("SELECTIVE" | "ALL"),
|
238
|
+
selective_mode_configuration: {
|
239
|
+
fields_to_exclude: Array[
|
240
|
+
{
|
241
|
+
field_name: ::String
|
242
|
+
},
|
243
|
+
]?,
|
244
|
+
fields_to_include: Array[
|
245
|
+
{
|
246
|
+
field_name: ::String
|
247
|
+
},
|
248
|
+
]?
|
249
|
+
}?
|
250
|
+
}?,
|
251
|
+
model_configuration: {
|
252
|
+
additional_model_request_fields: Hash[::String, {
|
253
|
+
}]?,
|
254
|
+
model_arn: ::String
|
255
|
+
},
|
256
|
+
number_of_reranked_results: ::Integer?
|
257
|
+
}?,
|
258
|
+
type: ("BEDROCK_RERANKING_MODEL")
|
259
|
+
}?
|
212
260
|
}
|
213
261
|
}
|
214
262
|
},
|
@@ -218,6 +266,7 @@ module Aws
|
|
218
266
|
{
|
219
267
|
api_result: {
|
220
268
|
action_group: ::String,
|
269
|
+
agent_id: ::String?,
|
221
270
|
api_path: ::String?,
|
222
271
|
confirmation_state: ("CONFIRM" | "DENY")?,
|
223
272
|
http_method: ::String?,
|
@@ -229,6 +278,7 @@ module Aws
|
|
229
278
|
}?,
|
230
279
|
function_result: {
|
231
280
|
action_group: ::String,
|
281
|
+
agent_id: ::String?,
|
232
282
|
confirmation_state: ("CONFIRM" | "DENY")?,
|
233
283
|
function: ::String?,
|
234
284
|
response_body: Hash[::String, {
|
@@ -240,6 +290,7 @@ module Aws
|
|
240
290
|
]?,
|
241
291
|
session_attributes: Hash[::String, ::String]?
|
242
292
|
},
|
293
|
+
?source_arn: ::String,
|
243
294
|
?streaming_configurations: {
|
244
295
|
apply_guardrail_interval: ::Integer?,
|
245
296
|
stream_final_response: bool?
|
@@ -341,6 +392,7 @@ module Aws
|
|
341
392
|
{
|
342
393
|
api_result: {
|
343
394
|
action_group: ::String,
|
395
|
+
agent_id: ::String?,
|
344
396
|
api_path: ::String?,
|
345
397
|
confirmation_state: ("CONFIRM" | "DENY")?,
|
346
398
|
http_method: ::String?,
|
@@ -352,6 +404,7 @@ module Aws
|
|
352
404
|
}?,
|
353
405
|
function_result: {
|
354
406
|
action_group: ::String,
|
407
|
+
agent_id: ::String?,
|
355
408
|
confirmation_state: ("CONFIRM" | "DENY")?,
|
356
409
|
function: ::String?,
|
357
410
|
response_body: Hash[::String, {
|
@@ -434,8 +487,44 @@ module Aws
|
|
434
487
|
}
|
435
488
|
}?
|
436
489
|
}?,
|
490
|
+
implicit_filter_configuration: {
|
491
|
+
metadata_attributes: Array[
|
492
|
+
{
|
493
|
+
description: ::String,
|
494
|
+
key: ::String,
|
495
|
+
type: ("STRING" | "NUMBER" | "BOOLEAN" | "STRING_LIST")
|
496
|
+
},
|
497
|
+
],
|
498
|
+
model_arn: ::String
|
499
|
+
}?,
|
437
500
|
number_of_results: ::Integer?,
|
438
|
-
override_search_type: ("HYBRID" | "SEMANTIC")
|
501
|
+
override_search_type: ("HYBRID" | "SEMANTIC")?,
|
502
|
+
reranking_configuration: {
|
503
|
+
bedrock_reranking_configuration: {
|
504
|
+
metadata_configuration: {
|
505
|
+
selection_mode: ("SELECTIVE" | "ALL"),
|
506
|
+
selective_mode_configuration: {
|
507
|
+
fields_to_exclude: Array[
|
508
|
+
{
|
509
|
+
field_name: ::String
|
510
|
+
},
|
511
|
+
]?,
|
512
|
+
fields_to_include: Array[
|
513
|
+
{
|
514
|
+
field_name: ::String
|
515
|
+
},
|
516
|
+
]?
|
517
|
+
}?
|
518
|
+
}?,
|
519
|
+
model_configuration: {
|
520
|
+
additional_model_request_fields: Hash[::String, {
|
521
|
+
}]?,
|
522
|
+
model_arn: ::String
|
523
|
+
},
|
524
|
+
number_of_reranked_results: ::Integer?
|
525
|
+
}?,
|
526
|
+
type: ("BEDROCK_RERANKING_MODEL")
|
527
|
+
}?
|
439
528
|
}
|
440
529
|
}?
|
441
530
|
},
|
@@ -478,13 +567,61 @@ module Aws
|
|
478
567
|
) ?{ (*untyped) -> void } -> _OptimizePromptResponseSuccess
|
479
568
|
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _OptimizePromptResponseSuccess
|
480
569
|
|
570
|
+
interface _RerankResponseSuccess
|
571
|
+
include ::Seahorse::Client::_ResponseSuccess[Types::RerankResponse]
|
572
|
+
def next_token: () -> ::String
|
573
|
+
def results: () -> ::Array[Types::RerankResult]
|
574
|
+
end
|
575
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockAgentRuntime/Client.html#rerank-instance_method
|
576
|
+
def rerank: (
|
577
|
+
?next_token: ::String,
|
578
|
+
queries: Array[
|
579
|
+
{
|
580
|
+
text_query: {
|
581
|
+
text: ::String?
|
582
|
+
},
|
583
|
+
type: ("TEXT")
|
584
|
+
},
|
585
|
+
],
|
586
|
+
reranking_configuration: {
|
587
|
+
bedrock_reranking_configuration: {
|
588
|
+
model_configuration: {
|
589
|
+
additional_model_request_fields: Hash[::String, {
|
590
|
+
}]?,
|
591
|
+
model_arn: ::String
|
592
|
+
},
|
593
|
+
number_of_results: ::Integer?
|
594
|
+
},
|
595
|
+
type: ("BEDROCK_RERANKING_MODEL")
|
596
|
+
},
|
597
|
+
sources: Array[
|
598
|
+
{
|
599
|
+
inline_document_source: {
|
600
|
+
json_document: {
|
601
|
+
}?,
|
602
|
+
text_document: {
|
603
|
+
text: ::String?
|
604
|
+
}?,
|
605
|
+
type: ("TEXT" | "JSON")
|
606
|
+
},
|
607
|
+
type: ("INLINE")
|
608
|
+
},
|
609
|
+
]
|
610
|
+
) -> _RerankResponseSuccess
|
611
|
+
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _RerankResponseSuccess
|
612
|
+
|
481
613
|
interface _RetrieveResponseSuccess
|
482
614
|
include ::Seahorse::Client::_ResponseSuccess[Types::RetrieveResponse]
|
615
|
+
def guardrail_action: () -> ("INTERVENED" | "NONE")
|
483
616
|
def next_token: () -> ::String
|
484
617
|
def retrieval_results: () -> ::Array[Types::KnowledgeBaseRetrievalResult]
|
485
618
|
end
|
486
619
|
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockAgentRuntime/Client.html#retrieve-instance_method
|
487
620
|
def retrieve: (
|
621
|
+
?guardrail_configuration: {
|
622
|
+
guardrail_id: ::String,
|
623
|
+
guardrail_version: ::String
|
624
|
+
},
|
488
625
|
knowledge_base_id: ::String,
|
489
626
|
?next_token: ::String,
|
490
627
|
?retrieval_configuration: {
|
@@ -552,8 +689,44 @@ module Aws
|
|
552
689
|
}
|
553
690
|
}?
|
554
691
|
}?,
|
692
|
+
implicit_filter_configuration: {
|
693
|
+
metadata_attributes: Array[
|
694
|
+
{
|
695
|
+
description: ::String,
|
696
|
+
key: ::String,
|
697
|
+
type: ("STRING" | "NUMBER" | "BOOLEAN" | "STRING_LIST")
|
698
|
+
},
|
699
|
+
],
|
700
|
+
model_arn: ::String
|
701
|
+
}?,
|
555
702
|
number_of_results: ::Integer?,
|
556
|
-
override_search_type: ("HYBRID" | "SEMANTIC")
|
703
|
+
override_search_type: ("HYBRID" | "SEMANTIC")?,
|
704
|
+
reranking_configuration: {
|
705
|
+
bedrock_reranking_configuration: {
|
706
|
+
metadata_configuration: {
|
707
|
+
selection_mode: ("SELECTIVE" | "ALL"),
|
708
|
+
selective_mode_configuration: {
|
709
|
+
fields_to_exclude: Array[
|
710
|
+
{
|
711
|
+
field_name: ::String
|
712
|
+
},
|
713
|
+
]?,
|
714
|
+
fields_to_include: Array[
|
715
|
+
{
|
716
|
+
field_name: ::String
|
717
|
+
},
|
718
|
+
]?
|
719
|
+
}?
|
720
|
+
}?,
|
721
|
+
model_configuration: {
|
722
|
+
additional_model_request_fields: Hash[::String, {
|
723
|
+
}]?,
|
724
|
+
model_arn: ::String
|
725
|
+
},
|
726
|
+
number_of_reranked_results: ::Integer?
|
727
|
+
}?,
|
728
|
+
type: ("BEDROCK_RERANKING_MODEL")
|
729
|
+
}?
|
557
730
|
}
|
558
731
|
},
|
559
732
|
retrieval_query: {
|
@@ -715,8 +888,44 @@ module Aws
|
|
715
888
|
}
|
716
889
|
}?
|
717
890
|
}?,
|
891
|
+
implicit_filter_configuration: {
|
892
|
+
metadata_attributes: Array[
|
893
|
+
{
|
894
|
+
description: ::String,
|
895
|
+
key: ::String,
|
896
|
+
type: ("STRING" | "NUMBER" | "BOOLEAN" | "STRING_LIST")
|
897
|
+
},
|
898
|
+
],
|
899
|
+
model_arn: ::String
|
900
|
+
}?,
|
718
901
|
number_of_results: ::Integer?,
|
719
|
-
override_search_type: ("HYBRID" | "SEMANTIC")
|
902
|
+
override_search_type: ("HYBRID" | "SEMANTIC")?,
|
903
|
+
reranking_configuration: {
|
904
|
+
bedrock_reranking_configuration: {
|
905
|
+
metadata_configuration: {
|
906
|
+
selection_mode: ("SELECTIVE" | "ALL"),
|
907
|
+
selective_mode_configuration: {
|
908
|
+
fields_to_exclude: Array[
|
909
|
+
{
|
910
|
+
field_name: ::String
|
911
|
+
},
|
912
|
+
]?,
|
913
|
+
fields_to_include: Array[
|
914
|
+
{
|
915
|
+
field_name: ::String
|
916
|
+
},
|
917
|
+
]?
|
918
|
+
}?
|
919
|
+
}?,
|
920
|
+
model_configuration: {
|
921
|
+
additional_model_request_fields: Hash[::String, {
|
922
|
+
}]?,
|
923
|
+
model_arn: ::String
|
924
|
+
},
|
925
|
+
number_of_reranked_results: ::Integer?
|
926
|
+
}?,
|
927
|
+
type: ("BEDROCK_RERANKING_MODEL")
|
928
|
+
}?
|
720
929
|
}
|
721
930
|
}?
|
722
931
|
}?,
|
@@ -728,6 +937,207 @@ module Aws
|
|
728
937
|
?session_id: ::String
|
729
938
|
) -> _RetrieveAndGenerateResponseSuccess
|
730
939
|
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _RetrieveAndGenerateResponseSuccess
|
940
|
+
|
941
|
+
interface _RetrieveAndGenerateStreamResponseSuccess
|
942
|
+
include ::Seahorse::Client::_ResponseSuccess[Types::RetrieveAndGenerateStreamResponse]
|
943
|
+
def session_id: () -> ::String
|
944
|
+
def stream: () -> Types::RetrieveAndGenerateStreamResponseOutput
|
945
|
+
end
|
946
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockAgentRuntime/Client.html#retrieve_and_generate_stream-instance_method
|
947
|
+
def retrieve_and_generate_stream: (
|
948
|
+
input: {
|
949
|
+
text: ::String
|
950
|
+
},
|
951
|
+
?retrieve_and_generate_configuration: {
|
952
|
+
external_sources_configuration: {
|
953
|
+
generation_configuration: {
|
954
|
+
additional_model_request_fields: Hash[::String, {
|
955
|
+
}]?,
|
956
|
+
guardrail_configuration: {
|
957
|
+
guardrail_id: ::String,
|
958
|
+
guardrail_version: ::String
|
959
|
+
}?,
|
960
|
+
inference_config: {
|
961
|
+
text_inference_config: {
|
962
|
+
max_tokens: ::Integer?,
|
963
|
+
stop_sequences: Array[::String]?,
|
964
|
+
temperature: ::Float?,
|
965
|
+
top_p: ::Float?
|
966
|
+
}?
|
967
|
+
}?,
|
968
|
+
prompt_template: {
|
969
|
+
text_prompt_template: ::String?
|
970
|
+
}?
|
971
|
+
}?,
|
972
|
+
model_arn: ::String,
|
973
|
+
sources: Array[
|
974
|
+
{
|
975
|
+
byte_content: {
|
976
|
+
content_type: ::String,
|
977
|
+
data: ::String,
|
978
|
+
identifier: ::String
|
979
|
+
}?,
|
980
|
+
s3_location: {
|
981
|
+
uri: ::String
|
982
|
+
}?,
|
983
|
+
source_type: ("S3" | "BYTE_CONTENT")
|
984
|
+
},
|
985
|
+
]
|
986
|
+
}?,
|
987
|
+
knowledge_base_configuration: {
|
988
|
+
generation_configuration: {
|
989
|
+
additional_model_request_fields: Hash[::String, {
|
990
|
+
}]?,
|
991
|
+
guardrail_configuration: {
|
992
|
+
guardrail_id: ::String,
|
993
|
+
guardrail_version: ::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
|
+
}?,
|
1007
|
+
knowledge_base_id: ::String,
|
1008
|
+
model_arn: ::String,
|
1009
|
+
orchestration_configuration: {
|
1010
|
+
additional_model_request_fields: Hash[::String, {
|
1011
|
+
}]?,
|
1012
|
+
inference_config: {
|
1013
|
+
text_inference_config: {
|
1014
|
+
max_tokens: ::Integer?,
|
1015
|
+
stop_sequences: Array[::String]?,
|
1016
|
+
temperature: ::Float?,
|
1017
|
+
top_p: ::Float?
|
1018
|
+
}?
|
1019
|
+
}?,
|
1020
|
+
prompt_template: {
|
1021
|
+
text_prompt_template: ::String?
|
1022
|
+
}?,
|
1023
|
+
query_transformation_configuration: {
|
1024
|
+
type: ("QUERY_DECOMPOSITION")
|
1025
|
+
}?
|
1026
|
+
}?,
|
1027
|
+
retrieval_configuration: {
|
1028
|
+
vector_search_configuration: {
|
1029
|
+
filter: {
|
1030
|
+
and_all: Array[
|
1031
|
+
untyped,
|
1032
|
+
]?,
|
1033
|
+
equals: {
|
1034
|
+
key: ::String,
|
1035
|
+
value: {
|
1036
|
+
}
|
1037
|
+
}?,
|
1038
|
+
greater_than: {
|
1039
|
+
key: ::String,
|
1040
|
+
value: {
|
1041
|
+
}
|
1042
|
+
}?,
|
1043
|
+
greater_than_or_equals: {
|
1044
|
+
key: ::String,
|
1045
|
+
value: {
|
1046
|
+
}
|
1047
|
+
}?,
|
1048
|
+
in: {
|
1049
|
+
key: ::String,
|
1050
|
+
value: {
|
1051
|
+
}
|
1052
|
+
}?,
|
1053
|
+
less_than: {
|
1054
|
+
key: ::String,
|
1055
|
+
value: {
|
1056
|
+
}
|
1057
|
+
}?,
|
1058
|
+
less_than_or_equals: {
|
1059
|
+
key: ::String,
|
1060
|
+
value: {
|
1061
|
+
}
|
1062
|
+
}?,
|
1063
|
+
list_contains: {
|
1064
|
+
key: ::String,
|
1065
|
+
value: {
|
1066
|
+
}
|
1067
|
+
}?,
|
1068
|
+
not_equals: {
|
1069
|
+
key: ::String,
|
1070
|
+
value: {
|
1071
|
+
}
|
1072
|
+
}?,
|
1073
|
+
not_in: {
|
1074
|
+
key: ::String,
|
1075
|
+
value: {
|
1076
|
+
}
|
1077
|
+
}?,
|
1078
|
+
or_all: Array[
|
1079
|
+
untyped,
|
1080
|
+
]?,
|
1081
|
+
starts_with: {
|
1082
|
+
key: ::String,
|
1083
|
+
value: {
|
1084
|
+
}
|
1085
|
+
}?,
|
1086
|
+
string_contains: {
|
1087
|
+
key: ::String,
|
1088
|
+
value: {
|
1089
|
+
}
|
1090
|
+
}?
|
1091
|
+
}?,
|
1092
|
+
implicit_filter_configuration: {
|
1093
|
+
metadata_attributes: Array[
|
1094
|
+
{
|
1095
|
+
description: ::String,
|
1096
|
+
key: ::String,
|
1097
|
+
type: ("STRING" | "NUMBER" | "BOOLEAN" | "STRING_LIST")
|
1098
|
+
},
|
1099
|
+
],
|
1100
|
+
model_arn: ::String
|
1101
|
+
}?,
|
1102
|
+
number_of_results: ::Integer?,
|
1103
|
+
override_search_type: ("HYBRID" | "SEMANTIC")?,
|
1104
|
+
reranking_configuration: {
|
1105
|
+
bedrock_reranking_configuration: {
|
1106
|
+
metadata_configuration: {
|
1107
|
+
selection_mode: ("SELECTIVE" | "ALL"),
|
1108
|
+
selective_mode_configuration: {
|
1109
|
+
fields_to_exclude: Array[
|
1110
|
+
{
|
1111
|
+
field_name: ::String
|
1112
|
+
},
|
1113
|
+
]?,
|
1114
|
+
fields_to_include: Array[
|
1115
|
+
{
|
1116
|
+
field_name: ::String
|
1117
|
+
},
|
1118
|
+
]?
|
1119
|
+
}?
|
1120
|
+
}?,
|
1121
|
+
model_configuration: {
|
1122
|
+
additional_model_request_fields: Hash[::String, {
|
1123
|
+
}]?,
|
1124
|
+
model_arn: ::String
|
1125
|
+
},
|
1126
|
+
number_of_reranked_results: ::Integer?
|
1127
|
+
}?,
|
1128
|
+
type: ("BEDROCK_RERANKING_MODEL")
|
1129
|
+
}?
|
1130
|
+
}
|
1131
|
+
}?
|
1132
|
+
}?,
|
1133
|
+
type: ("KNOWLEDGE_BASE" | "EXTERNAL_SOURCES")
|
1134
|
+
},
|
1135
|
+
?session_configuration: {
|
1136
|
+
kms_key_arn: ::String
|
1137
|
+
},
|
1138
|
+
?session_id: ::String
|
1139
|
+
) ?{ (*untyped) -> void } -> _RetrieveAndGenerateStreamResponseSuccess
|
1140
|
+
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _RetrieveAndGenerateStreamResponseSuccess
|
731
1141
|
end
|
732
1142
|
end
|
733
1143
|
end
|