aws-sdk-bedrockagentruntime 1.30.0 → 1.32.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.
@@ -27,11 +27,12 @@ module Aws::BedrockAgentRuntime
27
27
 
28
28
  # Contains information about the action group being invoked. For more
29
29
  # information about the possible structures, see the InvocationInput tab
30
- # in [OrchestrationTrace][1] in the Amazon Bedrock User Guide.
30
+ # in [OrchestrationTrace][1] in the [Amazon Bedrock User Guide][2].
31
31
  #
32
32
  #
33
33
  #
34
34
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/trace-orchestration.html
35
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html
35
36
  #
36
37
  # @!attribute [rw] action_group_name
37
38
  # The name of the action group.
@@ -102,6 +103,22 @@ module Aws::BedrockAgentRuntime
102
103
  include Aws::Structure
103
104
  end
104
105
 
106
+ # An event in which the prompt was analyzed in preparation for
107
+ # optimization.
108
+ #
109
+ # @!attribute [rw] message
110
+ # A message describing the analysis of the prompt.
111
+ # @return [String]
112
+ #
113
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/AnalyzePromptEvent AWS API Documentation
114
+ #
115
+ class AnalyzePromptEvent < Struct.new(
116
+ :message,
117
+ :event_type)
118
+ SENSITIVE = []
119
+ include Aws::Structure
120
+ end
121
+
105
122
  # Contains information about the API operation that the agent predicts
106
123
  # should be called.
107
124
  #
@@ -725,16 +742,6 @@ module Aws::BedrockAgentRuntime
725
742
 
726
743
  # Contains information about why a flow completed.
727
744
  #
728
- # This data type is used in the following API operations:
729
- #
730
- # * [InvokeFlow response][1]
731
- #
732
- # ^
733
- #
734
- #
735
- #
736
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeFlow.html#API_agent_InvokeFlow_ResponseSyntax
737
- #
738
745
  # @!attribute [rw] completion_reason
739
746
  # The reason that the flow completed.
740
747
  # @return [String]
@@ -751,16 +758,6 @@ module Aws::BedrockAgentRuntime
751
758
  # Contains information about an input into the prompt flow and where to
752
759
  # send it.
753
760
  #
754
- # This data type is used in the following API operations:
755
- #
756
- # * [InvokeFlow request][1]
757
- #
758
- # ^
759
- #
760
- #
761
- #
762
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeFlow.html#API_agent_InvokeFlow_RequestSyntax
763
- #
764
761
  # @!attribute [rw] content
765
762
  # Contains information about an input into the prompt flow.
766
763
  # @return [Types::FlowInputContent]
@@ -786,16 +783,6 @@ module Aws::BedrockAgentRuntime
786
783
 
787
784
  # Contains information about an input into the flow.
788
785
  #
789
- # This data type is used in the following API operations:
790
- #
791
- # * [InvokeFlow request][1]
792
- #
793
- # ^
794
- #
795
- #
796
- #
797
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeFlow.html#API_agent_InvokeFlow_RequestSyntax
798
- #
799
786
  # @note FlowInputContent is a union - when making an API calls you must set exactly one of the members.
800
787
  #
801
788
  # @!attribute [rw] document
@@ -818,16 +805,6 @@ module Aws::BedrockAgentRuntime
818
805
  # Contains information about the content in an output from prompt flow
819
806
  # invocation.
820
807
  #
821
- # This data type is used in the following API operations:
822
- #
823
- # * [InvokeFlow request][1]
824
- #
825
- # ^
826
- #
827
- #
828
- #
829
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeFlow.html#API_agent_InvokeFlow_RequestSyntax
830
- #
831
808
  # @note FlowOutputContent is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of FlowOutputContent corresponding to the set member.
832
809
  #
833
810
  # @!attribute [rw] document
@@ -849,16 +826,6 @@ module Aws::BedrockAgentRuntime
849
826
 
850
827
  # Contains information about an output from prompt flow invoction.
851
828
  #
852
- # This data type is used in the following API operations:
853
- #
854
- # * [InvokeFlow response][1]
855
- #
856
- # ^
857
- #
858
- #
859
- #
860
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeFlow.html#API_agent_InvokeFlow_ResponseSyntax
861
- #
862
829
  # @!attribute [rw] content
863
830
  # The content in the output.
864
831
  # @return [Types::FlowOutputContent]
@@ -882,6 +849,284 @@ module Aws::BedrockAgentRuntime
882
849
  include Aws::Structure
883
850
  end
884
851
 
852
+ # Contains information about an input or output for a node in the flow.
853
+ # For more information, see [Track each step in your prompt flow by
854
+ # viewing its trace in Amazon Bedrock][1].
855
+ #
856
+ #
857
+ #
858
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html
859
+ #
860
+ # @note FlowTrace is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of FlowTrace corresponding to the set member.
861
+ #
862
+ # @!attribute [rw] condition_node_result_trace
863
+ # Contains information about an output from a condition node.
864
+ # @return [Types::FlowTraceConditionNodeResultEvent]
865
+ #
866
+ # @!attribute [rw] node_input_trace
867
+ # Contains information about the input into a node.
868
+ # @return [Types::FlowTraceNodeInputEvent]
869
+ #
870
+ # @!attribute [rw] node_output_trace
871
+ # Contains information about the output from a node.
872
+ # @return [Types::FlowTraceNodeOutputEvent]
873
+ #
874
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FlowTrace AWS API Documentation
875
+ #
876
+ class FlowTrace < Struct.new(
877
+ :condition_node_result_trace,
878
+ :node_input_trace,
879
+ :node_output_trace,
880
+ :unknown)
881
+ SENSITIVE = [:condition_node_result_trace, :node_input_trace, :node_output_trace]
882
+ include Aws::Structure
883
+ include Aws::Structure::Union
884
+
885
+ class ConditionNodeResultTrace < FlowTrace; end
886
+ class NodeInputTrace < FlowTrace; end
887
+ class NodeOutputTrace < FlowTrace; end
888
+ class Unknown < FlowTrace; end
889
+ end
890
+
891
+ # Contains information about a condition that was satisfied. For more
892
+ # information, see [Track each step in your prompt flow by viewing its
893
+ # trace in Amazon Bedrock][1].
894
+ #
895
+ #
896
+ #
897
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html
898
+ #
899
+ # @!attribute [rw] condition_name
900
+ # The name of the condition.
901
+ # @return [String]
902
+ #
903
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FlowTraceCondition AWS API Documentation
904
+ #
905
+ class FlowTraceCondition < Struct.new(
906
+ :condition_name)
907
+ SENSITIVE = []
908
+ include Aws::Structure
909
+ end
910
+
911
+ # Contains information about an output from a condition node. For more
912
+ # information, see [Track each step in your prompt flow by viewing its
913
+ # trace in Amazon Bedrock][1].
914
+ #
915
+ #
916
+ #
917
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html
918
+ #
919
+ # @!attribute [rw] node_name
920
+ # The name of the condition node.
921
+ # @return [String]
922
+ #
923
+ # @!attribute [rw] satisfied_conditions
924
+ # An array of objects containing information about the conditions that
925
+ # were satisfied.
926
+ # @return [Array<Types::FlowTraceCondition>]
927
+ #
928
+ # @!attribute [rw] timestamp
929
+ # The date and time that the trace was returned.
930
+ # @return [Time]
931
+ #
932
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FlowTraceConditionNodeResultEvent AWS API Documentation
933
+ #
934
+ class FlowTraceConditionNodeResultEvent < Struct.new(
935
+ :node_name,
936
+ :satisfied_conditions,
937
+ :timestamp)
938
+ SENSITIVE = [:satisfied_conditions]
939
+ include Aws::Structure
940
+ end
941
+
942
+ # Contains information about a trace, which tracks an input or output
943
+ # for a node in the flow. For more information, see [Track each step in
944
+ # your prompt flow by viewing its trace in Amazon Bedrock][1].
945
+ #
946
+ #
947
+ #
948
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html
949
+ #
950
+ # @!attribute [rw] trace
951
+ # The trace object containing information about an input or output for
952
+ # a node in the flow.
953
+ # @return [Types::FlowTrace]
954
+ #
955
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FlowTraceEvent AWS API Documentation
956
+ #
957
+ class FlowTraceEvent < Struct.new(
958
+ :trace,
959
+ :event_type)
960
+ SENSITIVE = [:trace]
961
+ include Aws::Structure
962
+ end
963
+
964
+ # Contains the content of the node input. For more information, see
965
+ # [Track each step in your prompt flow by viewing its trace in Amazon
966
+ # Bedrock][1].
967
+ #
968
+ #
969
+ #
970
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html
971
+ #
972
+ # @note FlowTraceNodeInputContent is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of FlowTraceNodeInputContent corresponding to the set member.
973
+ #
974
+ # @!attribute [rw] document
975
+ # The content of the node input.
976
+ # @return [Hash,Array,String,Numeric,Boolean]
977
+ #
978
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FlowTraceNodeInputContent AWS API Documentation
979
+ #
980
+ class FlowTraceNodeInputContent < Struct.new(
981
+ :document,
982
+ :unknown)
983
+ SENSITIVE = []
984
+ include Aws::Structure
985
+ include Aws::Structure::Union
986
+
987
+ class Document < FlowTraceNodeInputContent; end
988
+ class Unknown < FlowTraceNodeInputContent; end
989
+ end
990
+
991
+ # Contains information about the input into a node. For more
992
+ # information, see [Track each step in your prompt flow by viewing its
993
+ # trace in Amazon Bedrock][1].
994
+ #
995
+ #
996
+ #
997
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html
998
+ #
999
+ # @!attribute [rw] fields
1000
+ # An array of objects containing information about each field in the
1001
+ # input.
1002
+ # @return [Array<Types::FlowTraceNodeInputField>]
1003
+ #
1004
+ # @!attribute [rw] node_name
1005
+ # The name of the node that received the input.
1006
+ # @return [String]
1007
+ #
1008
+ # @!attribute [rw] timestamp
1009
+ # The date and time that the trace was returned.
1010
+ # @return [Time]
1011
+ #
1012
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FlowTraceNodeInputEvent AWS API Documentation
1013
+ #
1014
+ class FlowTraceNodeInputEvent < Struct.new(
1015
+ :fields,
1016
+ :node_name,
1017
+ :timestamp)
1018
+ SENSITIVE = [:fields]
1019
+ include Aws::Structure
1020
+ end
1021
+
1022
+ # Contains information about a field in the input into a node. For more
1023
+ # information, see [Track each step in your prompt flow by viewing its
1024
+ # trace in Amazon Bedrock][1].
1025
+ #
1026
+ #
1027
+ #
1028
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html
1029
+ #
1030
+ # @!attribute [rw] content
1031
+ # The content of the node input.
1032
+ # @return [Types::FlowTraceNodeInputContent]
1033
+ #
1034
+ # @!attribute [rw] node_input_name
1035
+ # The name of the node input.
1036
+ # @return [String]
1037
+ #
1038
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FlowTraceNodeInputField AWS API Documentation
1039
+ #
1040
+ class FlowTraceNodeInputField < Struct.new(
1041
+ :content,
1042
+ :node_input_name)
1043
+ SENSITIVE = [:content]
1044
+ include Aws::Structure
1045
+ end
1046
+
1047
+ # Contains the content of the node output. For more information, see
1048
+ # [Track each step in your prompt flow by viewing its trace in Amazon
1049
+ # Bedrock][1].
1050
+ #
1051
+ #
1052
+ #
1053
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html
1054
+ #
1055
+ # @note FlowTraceNodeOutputContent is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of FlowTraceNodeOutputContent corresponding to the set member.
1056
+ #
1057
+ # @!attribute [rw] document
1058
+ # The content of the node output.
1059
+ # @return [Hash,Array,String,Numeric,Boolean]
1060
+ #
1061
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FlowTraceNodeOutputContent AWS API Documentation
1062
+ #
1063
+ class FlowTraceNodeOutputContent < Struct.new(
1064
+ :document,
1065
+ :unknown)
1066
+ SENSITIVE = []
1067
+ include Aws::Structure
1068
+ include Aws::Structure::Union
1069
+
1070
+ class Document < FlowTraceNodeOutputContent; end
1071
+ class Unknown < FlowTraceNodeOutputContent; end
1072
+ end
1073
+
1074
+ # Contains information about the output from a node. For more
1075
+ # information, see [Track each step in your prompt flow by viewing its
1076
+ # trace in Amazon Bedrock][1].
1077
+ #
1078
+ #
1079
+ #
1080
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html
1081
+ #
1082
+ # @!attribute [rw] fields
1083
+ # An array of objects containing information about each field in the
1084
+ # output.
1085
+ # @return [Array<Types::FlowTraceNodeOutputField>]
1086
+ #
1087
+ # @!attribute [rw] node_name
1088
+ # The name of the node that yielded the output.
1089
+ # @return [String]
1090
+ #
1091
+ # @!attribute [rw] timestamp
1092
+ # The date and time that the trace was returned.
1093
+ # @return [Time]
1094
+ #
1095
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FlowTraceNodeOutputEvent AWS API Documentation
1096
+ #
1097
+ class FlowTraceNodeOutputEvent < Struct.new(
1098
+ :fields,
1099
+ :node_name,
1100
+ :timestamp)
1101
+ SENSITIVE = [:fields]
1102
+ include Aws::Structure
1103
+ end
1104
+
1105
+ # Contains information about a field in the output from a node. For more
1106
+ # information, see [Track each step in your prompt flow by viewing its
1107
+ # trace in Amazon Bedrock][1].
1108
+ #
1109
+ #
1110
+ #
1111
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html
1112
+ #
1113
+ # @!attribute [rw] content
1114
+ # The content of the node output.
1115
+ # @return [Types::FlowTraceNodeOutputContent]
1116
+ #
1117
+ # @!attribute [rw] node_output_name
1118
+ # The name of the node output.
1119
+ # @return [String]
1120
+ #
1121
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FlowTraceNodeOutputField AWS API Documentation
1122
+ #
1123
+ class FlowTraceNodeOutputField < Struct.new(
1124
+ :content,
1125
+ :node_output_name)
1126
+ SENSITIVE = []
1127
+ include Aws::Structure
1128
+ end
1129
+
885
1130
  # Contains information about the function that the agent predicts should
886
1131
  # be called.
887
1132
  #
@@ -1069,7 +1314,13 @@ module Aws::BedrockAgentRuntime
1069
1314
  #
1070
1315
  # @!attribute [rw] prompt_template
1071
1316
  # Contains the template for the prompt that's sent to the model for
1072
- # response generation.
1317
+ # response generation. Generation prompts must include the
1318
+ # `$search_results$` variable. For more information, see [Use
1319
+ # placeholder variables][1] in the user guide.
1320
+ #
1321
+ #
1322
+ #
1323
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html
1073
1324
  # @return [Types::PromptTemplate]
1074
1325
  #
1075
1326
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GenerationConfiguration AWS API Documentation
@@ -1535,6 +1786,27 @@ module Aws::BedrockAgentRuntime
1535
1786
  include Aws::Structure
1536
1787
  end
1537
1788
 
1789
+ # Contains information about the prompt to optimize.
1790
+ #
1791
+ # @note InputPrompt is a union - when making an API calls you must set exactly one of the members.
1792
+ #
1793
+ # @!attribute [rw] text_prompt
1794
+ # Contains information about the text prompt to optimize.
1795
+ # @return [Types::TextPrompt]
1796
+ #
1797
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InputPrompt AWS API Documentation
1798
+ #
1799
+ class InputPrompt < Struct.new(
1800
+ :text_prompt,
1801
+ :unknown)
1802
+ SENSITIVE = [:text_prompt]
1803
+ include Aws::Structure
1804
+ include Aws::Structure::Union
1805
+
1806
+ class TextPrompt < InputPrompt; end
1807
+ class Unknown < InputPrompt; end
1808
+ end
1809
+
1538
1810
  # An internal server error occurred. Retry your request.
1539
1811
  #
1540
1812
  # @!attribute [rw] message
@@ -1763,6 +2035,17 @@ module Aws::BedrockAgentRuntime
1763
2035
  include Aws::Structure
1764
2036
  end
1765
2037
 
2038
+ # @!attribute [rw] enable_trace
2039
+ # Specifies whether to return the trace for the flow or not. Traces
2040
+ # track inputs and outputs for nodes in the flow. For more
2041
+ # information, see [Track each step in your prompt flow by viewing its
2042
+ # trace in Amazon Bedrock][1].
2043
+ #
2044
+ #
2045
+ #
2046
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html
2047
+ # @return [Boolean]
2048
+ #
1766
2049
  # @!attribute [rw] flow_alias_identifier
1767
2050
  # The unique identifier of the flow alias.
1768
2051
  # @return [String]
@@ -1779,6 +2062,7 @@ module Aws::BedrockAgentRuntime
1779
2062
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvokeFlowRequest AWS API Documentation
1780
2063
  #
1781
2064
  class InvokeFlowRequest < Struct.new(
2065
+ :enable_trace,
1782
2066
  :flow_alias_identifier,
1783
2067
  :flow_identifier,
1784
2068
  :inputs)
@@ -2281,6 +2565,73 @@ module Aws::BedrockAgentRuntime
2281
2565
  include Aws::Structure
2282
2566
  end
2283
2567
 
2568
+ # @!attribute [rw] input
2569
+ # Contains the prompt to optimize.
2570
+ # @return [Types::InputPrompt]
2571
+ #
2572
+ # @!attribute [rw] target_model_id
2573
+ # The unique identifier of the model that you want to optimize the
2574
+ # prompt for.
2575
+ # @return [String]
2576
+ #
2577
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/OptimizePromptRequest AWS API Documentation
2578
+ #
2579
+ class OptimizePromptRequest < Struct.new(
2580
+ :input,
2581
+ :target_model_id)
2582
+ SENSITIVE = []
2583
+ include Aws::Structure
2584
+ end
2585
+
2586
+ # @!attribute [rw] optimized_prompt
2587
+ # The prompt after being optimized for the task.
2588
+ # @return [Types::OptimizedPromptStream]
2589
+ #
2590
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/OptimizePromptResponse AWS API Documentation
2591
+ #
2592
+ class OptimizePromptResponse < Struct.new(
2593
+ :optimized_prompt)
2594
+ SENSITIVE = []
2595
+ include Aws::Structure
2596
+ end
2597
+
2598
+ # Contains information about the optimized prompt.
2599
+ #
2600
+ # @note OptimizedPrompt is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of OptimizedPrompt corresponding to the set member.
2601
+ #
2602
+ # @!attribute [rw] text_prompt
2603
+ # Contains information about the text in the prompt that was
2604
+ # optimized.
2605
+ # @return [Types::TextPrompt]
2606
+ #
2607
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/OptimizedPrompt AWS API Documentation
2608
+ #
2609
+ class OptimizedPrompt < Struct.new(
2610
+ :text_prompt,
2611
+ :unknown)
2612
+ SENSITIVE = [:text_prompt]
2613
+ include Aws::Structure
2614
+ include Aws::Structure::Union
2615
+
2616
+ class TextPrompt < OptimizedPrompt; end
2617
+ class Unknown < OptimizedPrompt; end
2618
+ end
2619
+
2620
+ # An event in which the prompt was optimized.
2621
+ #
2622
+ # @!attribute [rw] optimized_prompt
2623
+ # Contains information about the optimized prompt.
2624
+ # @return [Types::OptimizedPrompt]
2625
+ #
2626
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/OptimizedPromptEvent AWS API Documentation
2627
+ #
2628
+ class OptimizedPromptEvent < Struct.new(
2629
+ :optimized_prompt,
2630
+ :event_type)
2631
+ SENSITIVE = []
2632
+ include Aws::Structure
2633
+ end
2634
+
2284
2635
  # Settings for how the model processes the prompt prior to retrieval and
2285
2636
  # generation.
2286
2637
  #
@@ -2297,8 +2648,14 @@ module Aws::BedrockAgentRuntime
2297
2648
  # @return [Types::InferenceConfig]
2298
2649
  #
2299
2650
  # @!attribute [rw] prompt_template
2300
- # Contains the template for the prompt that's sent to the model for
2301
- # response generation.
2651
+ # Contains the template for the prompt that's sent to the model.
2652
+ # Orchestration prompts must include the `$conversation_history$` and
2653
+ # `$output_format_instructions$` variables. For more information, see
2654
+ # [Use placeholder variables][1] in the user guide.
2655
+ #
2656
+ #
2657
+ #
2658
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html
2302
2659
  # @return [Types::PromptTemplate]
2303
2660
  #
2304
2661
  # @!attribute [rw] query_transformation_configuration
@@ -3697,6 +4054,20 @@ module Aws::BedrockAgentRuntime
3697
4054
  include Aws::Structure
3698
4055
  end
3699
4056
 
4057
+ # Contains information about the text prompt to optimize.
4058
+ #
4059
+ # @!attribute [rw] text
4060
+ # The text in the text prompt to optimize.
4061
+ # @return [String]
4062
+ #
4063
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/TextPrompt AWS API Documentation
4064
+ #
4065
+ class TextPrompt < Struct.new(
4066
+ :text)
4067
+ SENSITIVE = []
4068
+ include Aws::Structure
4069
+ end
4070
+
3700
4071
  # Contains the part of the generated text that contains a citation,
3701
4072
  # alongside where it begins and ends.
3702
4073
  #
@@ -3888,16 +4259,6 @@ module Aws::BedrockAgentRuntime
3888
4259
 
3889
4260
  # The output of the flow.
3890
4261
  #
3891
- # This data type is used in the following API operations:
3892
- #
3893
- # * [InvokeFlow response][1]
3894
- #
3895
- # ^
3896
- #
3897
- #
3898
- #
3899
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeFlow.html#API_agent_InvokeFlow_ResponseSyntax
3900
- #
3901
4262
  # EventStream is an Enumerator of Events.
3902
4263
  # #event_types #=> Array, returns all modeled event types in the stream
3903
4264
  #
@@ -3913,6 +4274,7 @@ module Aws::BedrockAgentRuntime
3913
4274
  :dependency_failed_exception,
3914
4275
  :flow_completion_event,
3915
4276
  :flow_output_event,
4277
+ :flow_trace_event,
3916
4278
  :internal_server_exception,
3917
4279
  :resource_not_found_exception,
3918
4280
  :service_quota_exceeded_exception,
@@ -3923,6 +4285,30 @@ module Aws::BedrockAgentRuntime
3923
4285
 
3924
4286
  end
3925
4287
 
4288
+ # The stream containing events in the prompt optimization process.
4289
+ #
4290
+ # EventStream is an Enumerator of Events.
4291
+ # #event_types #=> Array, returns all modeled event types in the stream
4292
+ #
4293
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/OptimizedPromptStream AWS API Documentation
4294
+ #
4295
+ class OptimizedPromptStream < Enumerator
4296
+
4297
+ def event_types
4298
+ [
4299
+ :access_denied_exception,
4300
+ :analyze_prompt_event,
4301
+ :bad_gateway_exception,
4302
+ :dependency_failed_exception,
4303
+ :internal_server_exception,
4304
+ :optimized_prompt_event,
4305
+ :throttling_exception,
4306
+ :validation_exception
4307
+ ]
4308
+ end
4309
+
4310
+ end
4311
+
3926
4312
  # The response from invoking the agent and associated citations and
3927
4313
  # trace information.
3928
4314
  #
@@ -55,7 +55,7 @@ module Aws::BedrockAgentRuntime
55
55
  autoload :Endpoints, 'aws-sdk-bedrockagentruntime/endpoints'
56
56
  autoload :EventStreams, 'aws-sdk-bedrockagentruntime/event_streams'
57
57
 
58
- GEM_VERSION = '1.30.0'
58
+ GEM_VERSION = '1.32.0'
59
59
 
60
60
  end
61
61
 
data/sig/client.rbs CHANGED
@@ -249,6 +249,7 @@ module Aws
249
249
  end
250
250
  # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockAgentRuntime/Client.html#invoke_flow-instance_method
251
251
  def invoke_flow: (
252
+ ?enable_trace: bool,
252
253
  flow_alias_identifier: ::String,
253
254
  flow_identifier: ::String,
254
255
  inputs: Array[
@@ -264,6 +265,21 @@ module Aws
264
265
  ) ?{ (*untyped) -> void } -> _InvokeFlowResponseSuccess
265
266
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _InvokeFlowResponseSuccess
266
267
 
268
+ interface _OptimizePromptResponseSuccess
269
+ include ::Seahorse::Client::_ResponseSuccess[Types::OptimizePromptResponse]
270
+ def optimized_prompt: () -> Types::OptimizedPromptStream
271
+ end
272
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockAgentRuntime/Client.html#optimize_prompt-instance_method
273
+ def optimize_prompt: (
274
+ input: {
275
+ text_prompt: {
276
+ text: ::String
277
+ }?
278
+ },
279
+ target_model_id: ::String
280
+ ) ?{ (*untyped) -> void } -> _OptimizePromptResponseSuccess
281
+ | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _OptimizePromptResponseSuccess
282
+
267
283
  interface _RetrieveResponseSuccess
268
284
  include ::Seahorse::Client::_ResponseSuccess[Types::RetrieveResponse]
269
285
  def next_token: () -> ::String