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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-bedrockagentruntime/client.rb +212 -10
- data/lib/aws-sdk-bedrockagentruntime/client_api.rb +191 -1
- data/lib/aws-sdk-bedrockagentruntime/event_streams.rb +5 -0
- data/lib/aws-sdk-bedrockagentruntime/types.rb +760 -11
- data/lib/aws-sdk-bedrockagentruntime.rb +1 -1
- data/sig/client.rbs +152 -2
- data/sig/types.rbs +190 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4fadd76b1f390cc94a0a3234d392089d15516b65e24c52663bcc7b2e3e5d8db
|
4
|
+
data.tar.gz: 3c18e9019f15b5e7db08da1c15c566cce6c2b74e348c7e73df7afd2f26007dcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56d4583de4da4c430fb9fdc74651c40e2c609505886ab67e5f101a6abff02d1c0408f542d924d6d1fcaeb6775146fab10b77fb9caba0df3f54587891d2d09ae6
|
7
|
+
data.tar.gz: f54537daf902f208c5df229c62472aa9b29d544a003b0cae55177a30eebb0465e35a87d8259a462c0e2f5c89c28413d350b7dfc05712b51b127f5323b4f48851
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.6.0 (2024-04-23)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - This release introduces zero-setup file upload support for the RetrieveAndGenerate API. This allows you to chat with your data without setting up a Knowledge Base.
|
8
|
+
|
9
|
+
1.5.0 (2024-03-27)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Feature - This release introduces filtering support on Retrieve and RetrieveAndGenerate APIs.
|
13
|
+
|
4
14
|
1.4.0 (2024-03-26)
|
5
15
|
------------------
|
6
16
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.6.0
|
@@ -399,7 +399,8 @@ module Aws::BedrockAgentRuntime
|
|
399
399
|
|
400
400
|
# @!group API Operations
|
401
401
|
|
402
|
-
# Sends a prompt for the agent to process and respond to.
|
402
|
+
# Sends a prompt for the agent to process and respond to. Use return
|
403
|
+
# control event type for function calling.
|
403
404
|
#
|
404
405
|
# <note markdown="1"> The CLI doesn't support `InvokeAgent`.
|
405
406
|
#
|
@@ -416,8 +417,10 @@ module Aws::BedrockAgentRuntime
|
|
416
417
|
#
|
417
418
|
# * End a conversation by setting `endSession` to `true`.
|
418
419
|
#
|
419
|
-
# *
|
420
|
-
#
|
420
|
+
# * In the `sessionState` object, you can include attributes for the
|
421
|
+
# session or prompt or parameters returned from the action group.
|
422
|
+
#
|
423
|
+
# * Use return control event type for function calling.
|
421
424
|
#
|
422
425
|
# The response is returned in the `bytes` field of the `chunk` object.
|
423
426
|
#
|
@@ -450,7 +453,7 @@ module Aws::BedrockAgentRuntime
|
|
450
453
|
# @option params [Boolean] :end_session
|
451
454
|
# Specifies whether to end the session with the agent or not.
|
452
455
|
#
|
453
|
-
# @option params [
|
456
|
+
# @option params [String] :input_text
|
454
457
|
# The prompt text to send the agent.
|
455
458
|
#
|
456
459
|
# @option params [required, String] :session_id
|
@@ -535,6 +538,9 @@ module Aws::BedrockAgentRuntime
|
|
535
538
|
# handler.on_resource_not_found_exception_event do |event|
|
536
539
|
# event # => Aws::BedrockAgentRuntime::Types::resourceNotFoundException
|
537
540
|
# end
|
541
|
+
# handler.on_return_control_event do |event|
|
542
|
+
# event # => Aws::BedrockAgentRuntime::Types::returnControl
|
543
|
+
# end
|
538
544
|
# handler.on_service_quota_exceeded_exception_event do |event|
|
539
545
|
# event # => Aws::BedrockAgentRuntime::Types::serviceQuotaExceededException
|
540
546
|
# end
|
@@ -575,6 +581,9 @@ module Aws::BedrockAgentRuntime
|
|
575
581
|
# stream.on_resource_not_found_exception_event do |event|
|
576
582
|
# event # => Aws::BedrockAgentRuntime::Types::resourceNotFoundException
|
577
583
|
# end
|
584
|
+
# stream.on_return_control_event do |event|
|
585
|
+
# event # => Aws::BedrockAgentRuntime::Types::returnControl
|
586
|
+
# end
|
578
587
|
# stream.on_service_quota_exceeded_exception_event do |event|
|
579
588
|
# event # => Aws::BedrockAgentRuntime::Types::serviceQuotaExceededException
|
580
589
|
# end
|
@@ -615,6 +624,9 @@ module Aws::BedrockAgentRuntime
|
|
615
624
|
# handler.on_resource_not_found_exception_event do |event|
|
616
625
|
# event # => Aws::BedrockAgentRuntime::Types::resourceNotFoundException
|
617
626
|
# end
|
627
|
+
# handler.on_return_control_event do |event|
|
628
|
+
# event # => Aws::BedrockAgentRuntime::Types::returnControl
|
629
|
+
# end
|
618
630
|
# handler.on_service_quota_exceeded_exception_event do |event|
|
619
631
|
# event # => Aws::BedrockAgentRuntime::Types::serviceQuotaExceededException
|
620
632
|
# end
|
@@ -652,12 +664,39 @@ module Aws::BedrockAgentRuntime
|
|
652
664
|
# agent_id: "AgentId", # required
|
653
665
|
# enable_trace: false,
|
654
666
|
# end_session: false,
|
655
|
-
# input_text: "InputText",
|
667
|
+
# input_text: "InputText",
|
656
668
|
# session_id: "SessionId", # required
|
657
669
|
# session_state: {
|
670
|
+
# invocation_id: "String",
|
658
671
|
# prompt_session_attributes: {
|
659
672
|
# "String" => "String",
|
660
673
|
# },
|
674
|
+
# return_control_invocation_results: [
|
675
|
+
# {
|
676
|
+
# api_result: {
|
677
|
+
# action_group: "String", # required
|
678
|
+
# api_path: "ApiPath",
|
679
|
+
# http_method: "String",
|
680
|
+
# http_status_code: 1,
|
681
|
+
# response_body: {
|
682
|
+
# "String" => {
|
683
|
+
# body: "String",
|
684
|
+
# },
|
685
|
+
# },
|
686
|
+
# response_state: "FAILURE", # accepts FAILURE, REPROMPT
|
687
|
+
# },
|
688
|
+
# function_result: {
|
689
|
+
# action_group: "String", # required
|
690
|
+
# function: "String",
|
691
|
+
# response_body: {
|
692
|
+
# "String" => {
|
693
|
+
# body: "String",
|
694
|
+
# },
|
695
|
+
# },
|
696
|
+
# response_state: "FAILURE", # accepts FAILURE, REPROMPT
|
697
|
+
# },
|
698
|
+
# },
|
699
|
+
# ],
|
661
700
|
# session_attributes: {
|
662
701
|
# "String" => "String",
|
663
702
|
# },
|
@@ -668,7 +707,7 @@ module Aws::BedrockAgentRuntime
|
|
668
707
|
#
|
669
708
|
# All events are available at resp.completion:
|
670
709
|
# resp.completion #=> Enumerator
|
671
|
-
# resp.completion.event_types #=> [:access_denied_exception, :bad_gateway_exception, :chunk, :conflict_exception, :dependency_failed_exception, :internal_server_exception, :resource_not_found_exception, :service_quota_exceeded_exception, :throttling_exception, :trace, :validation_exception]
|
710
|
+
# resp.completion.event_types #=> [:access_denied_exception, :bad_gateway_exception, :chunk, :conflict_exception, :dependency_failed_exception, :internal_server_exception, :resource_not_found_exception, :return_control, :service_quota_exceeded_exception, :throttling_exception, :trace, :validation_exception]
|
672
711
|
#
|
673
712
|
# For :access_denied_exception event available at #on_access_denied_exception_event callback and response eventstream enumerator:
|
674
713
|
# event.message #=> String
|
@@ -686,6 +725,7 @@ module Aws::BedrockAgentRuntime
|
|
686
725
|
# event.attribution.citations[0].retrieved_references[0].content.text #=> String
|
687
726
|
# event.attribution.citations[0].retrieved_references[0].location.s3_location.uri #=> String
|
688
727
|
# event.attribution.citations[0].retrieved_references[0].location.type #=> String, one of "S3"
|
728
|
+
# event.attribution.citations[0].retrieved_references[0].metadata #=> Hash
|
689
729
|
# event.bytes #=> String
|
690
730
|
#
|
691
731
|
# For :conflict_exception event available at #on_conflict_exception_event callback and response eventstream enumerator:
|
@@ -701,6 +741,28 @@ module Aws::BedrockAgentRuntime
|
|
701
741
|
# For :resource_not_found_exception event available at #on_resource_not_found_exception_event callback and response eventstream enumerator:
|
702
742
|
# event.message #=> String
|
703
743
|
#
|
744
|
+
# For :return_control event available at #on_return_control_event callback and response eventstream enumerator:
|
745
|
+
# event.invocation_id #=> String
|
746
|
+
# event.invocation_inputs #=> Array
|
747
|
+
# event.invocation_inputs[0].api_invocation_input.action_group #=> String
|
748
|
+
# event.invocation_inputs[0].api_invocation_input.api_path #=> String
|
749
|
+
# event.invocation_inputs[0].api_invocation_input.http_method #=> String
|
750
|
+
# event.invocation_inputs[0].api_invocation_input.parameters #=> Array
|
751
|
+
# event.invocation_inputs[0].api_invocation_input.parameters[0].name #=> String
|
752
|
+
# event.invocation_inputs[0].api_invocation_input.parameters[0].type #=> String
|
753
|
+
# event.invocation_inputs[0].api_invocation_input.parameters[0].value #=> String
|
754
|
+
# event.invocation_inputs[0].api_invocation_input.request_body.content #=> Hash
|
755
|
+
# event.invocation_inputs[0].api_invocation_input.request_body.content["String"].properties #=> Array
|
756
|
+
# event.invocation_inputs[0].api_invocation_input.request_body.content["String"].properties[0].name #=> String
|
757
|
+
# event.invocation_inputs[0].api_invocation_input.request_body.content["String"].properties[0].type #=> String
|
758
|
+
# event.invocation_inputs[0].api_invocation_input.request_body.content["String"].properties[0].value #=> String
|
759
|
+
# event.invocation_inputs[0].function_invocation_input.action_group #=> String
|
760
|
+
# event.invocation_inputs[0].function_invocation_input.function #=> String
|
761
|
+
# event.invocation_inputs[0].function_invocation_input.parameters #=> Array
|
762
|
+
# event.invocation_inputs[0].function_invocation_input.parameters[0].name #=> String
|
763
|
+
# event.invocation_inputs[0].function_invocation_input.parameters[0].type #=> String
|
764
|
+
# event.invocation_inputs[0].function_invocation_input.parameters[0].value #=> String
|
765
|
+
#
|
704
766
|
# For :service_quota_exceeded_exception event available at #on_service_quota_exceeded_exception_event callback and response eventstream enumerator:
|
705
767
|
# event.message #=> String
|
706
768
|
#
|
@@ -710,11 +772,13 @@ module Aws::BedrockAgentRuntime
|
|
710
772
|
# For :trace event available at #on_trace_event callback and response eventstream enumerator:
|
711
773
|
# event.agent_alias_id #=> String
|
712
774
|
# event.agent_id #=> String
|
775
|
+
# event.agent_version #=> String
|
713
776
|
# event.session_id #=> String
|
714
777
|
# event.trace.failure_trace.failure_reason #=> String
|
715
778
|
# event.trace.failure_trace.trace_id #=> String
|
716
779
|
# event.trace.orchestration_trace.invocation_input.action_group_invocation_input.action_group_name #=> String
|
717
780
|
# event.trace.orchestration_trace.invocation_input.action_group_invocation_input.api_path #=> String
|
781
|
+
# event.trace.orchestration_trace.invocation_input.action_group_invocation_input.function #=> String
|
718
782
|
# event.trace.orchestration_trace.invocation_input.action_group_invocation_input.parameters #=> Array
|
719
783
|
# event.trace.orchestration_trace.invocation_input.action_group_invocation_input.parameters[0].name #=> String
|
720
784
|
# event.trace.orchestration_trace.invocation_input.action_group_invocation_input.parameters[0].type #=> String
|
@@ -747,6 +811,7 @@ module Aws::BedrockAgentRuntime
|
|
747
811
|
# event.trace.orchestration_trace.observation.knowledge_base_lookup_output.retrieved_references[0].content.text #=> String
|
748
812
|
# event.trace.orchestration_trace.observation.knowledge_base_lookup_output.retrieved_references[0].location.s3_location.uri #=> String
|
749
813
|
# event.trace.orchestration_trace.observation.knowledge_base_lookup_output.retrieved_references[0].location.type #=> String, one of "S3"
|
814
|
+
# event.trace.orchestration_trace.observation.knowledge_base_lookup_output.retrieved_references[0].metadata #=> Hash
|
750
815
|
# event.trace.orchestration_trace.observation.reprompt_response.source #=> String, one of "ACTION_GROUP", "KNOWLEDGE_BASE", "PARSER"
|
751
816
|
# event.trace.orchestration_trace.observation.reprompt_response.text #=> String
|
752
817
|
# event.trace.orchestration_trace.observation.trace_id #=> String
|
@@ -851,6 +916,63 @@ module Aws::BedrockAgentRuntime
|
|
851
916
|
# next_token: "NextToken",
|
852
917
|
# retrieval_configuration: {
|
853
918
|
# vector_search_configuration: { # required
|
919
|
+
# filter: {
|
920
|
+
# and_all: [
|
921
|
+
# {
|
922
|
+
# # recursive RetrievalFilter
|
923
|
+
# },
|
924
|
+
# ],
|
925
|
+
# equals: {
|
926
|
+
# key: "FilterKey", # required
|
927
|
+
# value: { # required
|
928
|
+
# },
|
929
|
+
# },
|
930
|
+
# greater_than: {
|
931
|
+
# key: "FilterKey", # required
|
932
|
+
# value: { # required
|
933
|
+
# },
|
934
|
+
# },
|
935
|
+
# greater_than_or_equals: {
|
936
|
+
# key: "FilterKey", # required
|
937
|
+
# value: { # required
|
938
|
+
# },
|
939
|
+
# },
|
940
|
+
# in: {
|
941
|
+
# key: "FilterKey", # required
|
942
|
+
# value: { # required
|
943
|
+
# },
|
944
|
+
# },
|
945
|
+
# less_than: {
|
946
|
+
# key: "FilterKey", # required
|
947
|
+
# value: { # required
|
948
|
+
# },
|
949
|
+
# },
|
950
|
+
# less_than_or_equals: {
|
951
|
+
# key: "FilterKey", # required
|
952
|
+
# value: { # required
|
953
|
+
# },
|
954
|
+
# },
|
955
|
+
# not_equals: {
|
956
|
+
# key: "FilterKey", # required
|
957
|
+
# value: { # required
|
958
|
+
# },
|
959
|
+
# },
|
960
|
+
# not_in: {
|
961
|
+
# key: "FilterKey", # required
|
962
|
+
# value: { # required
|
963
|
+
# },
|
964
|
+
# },
|
965
|
+
# or_all: [
|
966
|
+
# {
|
967
|
+
# # recursive RetrievalFilter
|
968
|
+
# },
|
969
|
+
# ],
|
970
|
+
# starts_with: {
|
971
|
+
# key: "FilterKey", # required
|
972
|
+
# value: { # required
|
973
|
+
# },
|
974
|
+
# },
|
975
|
+
# },
|
854
976
|
# number_of_results: 1,
|
855
977
|
# override_search_type: "HYBRID", # accepts HYBRID, SEMANTIC
|
856
978
|
# },
|
@@ -867,6 +989,7 @@ module Aws::BedrockAgentRuntime
|
|
867
989
|
# resp.retrieval_results[0].content.text #=> String
|
868
990
|
# resp.retrieval_results[0].location.s3_location.uri #=> String
|
869
991
|
# resp.retrieval_results[0].location.type #=> String, one of "S3"
|
992
|
+
# resp.retrieval_results[0].metadata #=> Hash
|
870
993
|
# resp.retrieval_results[0].score #=> Float
|
871
994
|
#
|
872
995
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/Retrieve AWS API Documentation
|
@@ -879,8 +1002,8 @@ module Aws::BedrockAgentRuntime
|
|
879
1002
|
end
|
880
1003
|
|
881
1004
|
# Queries a knowledge base and generates responses based on the
|
882
|
-
# retrieved results. The response cites
|
883
|
-
#
|
1005
|
+
# retrieved results. The response only cites sources that are relevant
|
1006
|
+
# to the query.
|
884
1007
|
#
|
885
1008
|
# @option params [required, Types::RetrieveAndGenerateInput] :input
|
886
1009
|
# Contains the query to be made to the knowledge base.
|
@@ -913,6 +1036,27 @@ module Aws::BedrockAgentRuntime
|
|
913
1036
|
# text: "RetrieveAndGenerateInputTextString", # required
|
914
1037
|
# },
|
915
1038
|
# retrieve_and_generate_configuration: {
|
1039
|
+
# external_sources_configuration: {
|
1040
|
+
# generation_configuration: {
|
1041
|
+
# prompt_template: {
|
1042
|
+
# text_prompt_template: "TextPromptTemplate",
|
1043
|
+
# },
|
1044
|
+
# },
|
1045
|
+
# model_arn: "BedrockModelArn", # required
|
1046
|
+
# sources: [ # required
|
1047
|
+
# {
|
1048
|
+
# byte_content: {
|
1049
|
+
# content_type: "ContentType", # required
|
1050
|
+
# data: "data", # required
|
1051
|
+
# identifier: "Identifier", # required
|
1052
|
+
# },
|
1053
|
+
# s3_location: {
|
1054
|
+
# uri: "S3Uri", # required
|
1055
|
+
# },
|
1056
|
+
# source_type: "S3", # required, accepts S3, BYTE_CONTENT
|
1057
|
+
# },
|
1058
|
+
# ],
|
1059
|
+
# },
|
916
1060
|
# knowledge_base_configuration: {
|
917
1061
|
# generation_configuration: {
|
918
1062
|
# prompt_template: {
|
@@ -923,12 +1067,69 @@ module Aws::BedrockAgentRuntime
|
|
923
1067
|
# model_arn: "BedrockModelArn", # required
|
924
1068
|
# retrieval_configuration: {
|
925
1069
|
# vector_search_configuration: { # required
|
1070
|
+
# filter: {
|
1071
|
+
# and_all: [
|
1072
|
+
# {
|
1073
|
+
# # recursive RetrievalFilter
|
1074
|
+
# },
|
1075
|
+
# ],
|
1076
|
+
# equals: {
|
1077
|
+
# key: "FilterKey", # required
|
1078
|
+
# value: { # required
|
1079
|
+
# },
|
1080
|
+
# },
|
1081
|
+
# greater_than: {
|
1082
|
+
# key: "FilterKey", # required
|
1083
|
+
# value: { # required
|
1084
|
+
# },
|
1085
|
+
# },
|
1086
|
+
# greater_than_or_equals: {
|
1087
|
+
# key: "FilterKey", # required
|
1088
|
+
# value: { # required
|
1089
|
+
# },
|
1090
|
+
# },
|
1091
|
+
# in: {
|
1092
|
+
# key: "FilterKey", # required
|
1093
|
+
# value: { # required
|
1094
|
+
# },
|
1095
|
+
# },
|
1096
|
+
# less_than: {
|
1097
|
+
# key: "FilterKey", # required
|
1098
|
+
# value: { # required
|
1099
|
+
# },
|
1100
|
+
# },
|
1101
|
+
# less_than_or_equals: {
|
1102
|
+
# key: "FilterKey", # required
|
1103
|
+
# value: { # required
|
1104
|
+
# },
|
1105
|
+
# },
|
1106
|
+
# not_equals: {
|
1107
|
+
# key: "FilterKey", # required
|
1108
|
+
# value: { # required
|
1109
|
+
# },
|
1110
|
+
# },
|
1111
|
+
# not_in: {
|
1112
|
+
# key: "FilterKey", # required
|
1113
|
+
# value: { # required
|
1114
|
+
# },
|
1115
|
+
# },
|
1116
|
+
# or_all: [
|
1117
|
+
# {
|
1118
|
+
# # recursive RetrievalFilter
|
1119
|
+
# },
|
1120
|
+
# ],
|
1121
|
+
# starts_with: {
|
1122
|
+
# key: "FilterKey", # required
|
1123
|
+
# value: { # required
|
1124
|
+
# },
|
1125
|
+
# },
|
1126
|
+
# },
|
926
1127
|
# number_of_results: 1,
|
927
1128
|
# override_search_type: "HYBRID", # accepts HYBRID, SEMANTIC
|
928
1129
|
# },
|
929
1130
|
# },
|
930
1131
|
# },
|
931
|
-
# type: "KNOWLEDGE_BASE", # required, accepts KNOWLEDGE_BASE
|
1132
|
+
# type: "KNOWLEDGE_BASE", # required, accepts KNOWLEDGE_BASE, EXTERNAL_SOURCES
|
932
1133
|
# },
|
933
1134
|
# session_configuration: {
|
934
1135
|
# kms_key_arn: "KmsKeyArn", # required
|
@@ -946,6 +1147,7 @@ module Aws::BedrockAgentRuntime
|
|
946
1147
|
# resp.citations[0].retrieved_references[0].content.text #=> String
|
947
1148
|
# resp.citations[0].retrieved_references[0].location.s3_location.uri #=> String
|
948
1149
|
# resp.citations[0].retrieved_references[0].location.type #=> String, one of "S3"
|
1150
|
+
# resp.citations[0].retrieved_references[0].metadata #=> Hash
|
949
1151
|
# resp.output.text #=> String
|
950
1152
|
# resp.session_id #=> String
|
951
1153
|
#
|
@@ -971,7 +1173,7 @@ module Aws::BedrockAgentRuntime
|
|
971
1173
|
params: params,
|
972
1174
|
config: config)
|
973
1175
|
context[:gem_name] = 'aws-sdk-bedrockagentruntime'
|
974
|
-
context[:gem_version] = '1.
|
1176
|
+
context[:gem_version] = '1.6.0'
|
975
1177
|
Seahorse::Client::Request.new(handlers, context)
|
976
1178
|
end
|
977
1179
|
|