aws-sdk-bedrockagentruntime 1.31.0 → 1.33.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 +1015 -5
- data/lib/aws-sdk-bedrockagentruntime/client_api.rb +261 -0
- data/lib/aws-sdk-bedrockagentruntime/event_streams.rb +163 -0
- data/lib/aws-sdk-bedrockagentruntime/types.rb +944 -57
- data/lib/aws-sdk-bedrockagentruntime.rb +1 -1
- data/sig/client.rbs +209 -0
- data/sig/types.rbs +218 -1
- metadata +2 -2
@@ -10,6 +10,43 @@
|
|
10
10
|
module Aws::BedrockAgentRuntime
|
11
11
|
module Types
|
12
12
|
|
13
|
+
# Contains details about the OpenAPI schema for the action group. For
|
14
|
+
# more information, see [Action group OpenAPI schemas][1]. You can
|
15
|
+
# either include the schema directly in the payload field or you can
|
16
|
+
# upload it to an S3 bucket and specify the S3 bucket location in the s3
|
17
|
+
# field.
|
18
|
+
#
|
19
|
+
#
|
20
|
+
#
|
21
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-api-schema.html
|
22
|
+
#
|
23
|
+
# @note APISchema is a union - when making an API calls you must set exactly one of the members.
|
24
|
+
#
|
25
|
+
# @!attribute [rw] payload
|
26
|
+
# The JSON or YAML-formatted payload defining the OpenAPI schema for
|
27
|
+
# the action group.
|
28
|
+
# @return [String]
|
29
|
+
#
|
30
|
+
# @!attribute [rw] s3
|
31
|
+
# Contains details about the S3 object containing the OpenAPI schema
|
32
|
+
# for the action group.
|
33
|
+
# @return [Types::S3Identifier]
|
34
|
+
#
|
35
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/APISchema AWS API Documentation
|
36
|
+
#
|
37
|
+
class APISchema < Struct.new(
|
38
|
+
:payload,
|
39
|
+
:s3,
|
40
|
+
:unknown)
|
41
|
+
SENSITIVE = [:payload]
|
42
|
+
include Aws::Structure
|
43
|
+
include Aws::Structure::Union
|
44
|
+
|
45
|
+
class Payload < APISchema; end
|
46
|
+
class S3 < APISchema; end
|
47
|
+
class Unknown < APISchema; end
|
48
|
+
end
|
49
|
+
|
13
50
|
# The request is denied because of missing access permissions. Check
|
14
51
|
# your permissions and retry your request.
|
15
52
|
#
|
@@ -25,13 +62,45 @@ module Aws::BedrockAgentRuntime
|
|
25
62
|
include Aws::Structure
|
26
63
|
end
|
27
64
|
|
65
|
+
# Contains details about the Lambda function containing the business
|
66
|
+
# logic that is carried out upon invoking the action or the custom
|
67
|
+
# control method for handling the information elicited from the user.
|
68
|
+
#
|
69
|
+
# @note ActionGroupExecutor is a union - when making an API calls you must set exactly one of the members.
|
70
|
+
#
|
71
|
+
# @!attribute [rw] custom_control
|
72
|
+
# To return the action group invocation results directly in the
|
73
|
+
# `InvokeInlineAgent` response, specify `RETURN_CONTROL`.
|
74
|
+
# @return [String]
|
75
|
+
#
|
76
|
+
# @!attribute [rw] lambda
|
77
|
+
# The Amazon Resource Name (ARN) of the Lambda function containing the
|
78
|
+
# business logic that is carried out upon invoking the action.
|
79
|
+
# @return [String]
|
80
|
+
#
|
81
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ActionGroupExecutor AWS API Documentation
|
82
|
+
#
|
83
|
+
class ActionGroupExecutor < Struct.new(
|
84
|
+
:custom_control,
|
85
|
+
:lambda,
|
86
|
+
:unknown)
|
87
|
+
SENSITIVE = []
|
88
|
+
include Aws::Structure
|
89
|
+
include Aws::Structure::Union
|
90
|
+
|
91
|
+
class CustomControl < ActionGroupExecutor; end
|
92
|
+
class Lambda < ActionGroupExecutor; end
|
93
|
+
class Unknown < ActionGroupExecutor; end
|
94
|
+
end
|
95
|
+
|
28
96
|
# Contains information about the action group being invoked. For more
|
29
97
|
# information about the possible structures, see the InvocationInput tab
|
30
|
-
# in [OrchestrationTrace][1] in the Amazon Bedrock User Guide.
|
98
|
+
# in [OrchestrationTrace][1] in the [Amazon Bedrock User Guide][2].
|
31
99
|
#
|
32
100
|
#
|
33
101
|
#
|
34
102
|
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/trace-orchestration.html
|
103
|
+
# [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html
|
35
104
|
#
|
36
105
|
# @!attribute [rw] action_group_name
|
37
106
|
# The name of the action group.
|
@@ -102,6 +171,91 @@ module Aws::BedrockAgentRuntime
|
|
102
171
|
include Aws::Structure
|
103
172
|
end
|
104
173
|
|
174
|
+
# Contains details of the inline agent's action group.
|
175
|
+
#
|
176
|
+
# @!attribute [rw] action_group_executor
|
177
|
+
# The Amazon Resource Name (ARN) of the Lambda function containing the
|
178
|
+
# business logic that is carried out upon invoking the action or the
|
179
|
+
# custom control method for handling the information elicited from the
|
180
|
+
# user.
|
181
|
+
# @return [Types::ActionGroupExecutor]
|
182
|
+
#
|
183
|
+
# @!attribute [rw] action_group_name
|
184
|
+
# The name of the action group.
|
185
|
+
# @return [String]
|
186
|
+
#
|
187
|
+
# @!attribute [rw] api_schema
|
188
|
+
# Contains either details about the S3 object containing the OpenAPI
|
189
|
+
# schema for the action group or the JSON or YAML-formatted payload
|
190
|
+
# defining the schema. For more information, see [Action group OpenAPI
|
191
|
+
# schemas][1].
|
192
|
+
#
|
193
|
+
#
|
194
|
+
#
|
195
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-api-schema.html
|
196
|
+
# @return [Types::APISchema]
|
197
|
+
#
|
198
|
+
# @!attribute [rw] description
|
199
|
+
# A description of the action group.
|
200
|
+
# @return [String]
|
201
|
+
#
|
202
|
+
# @!attribute [rw] function_schema
|
203
|
+
# Contains details about the function schema for the action group or
|
204
|
+
# the JSON or YAML-formatted payload defining the schema.
|
205
|
+
# @return [Types::FunctionSchema]
|
206
|
+
#
|
207
|
+
# @!attribute [rw] parent_action_group_signature
|
208
|
+
# To allow your agent to request the user for additional information
|
209
|
+
# when trying to complete a task, set this field to
|
210
|
+
# `AMAZON.UserInput`. You must leave the `description`, `apiSchema`,
|
211
|
+
# and `actionGroupExecutor` fields blank for this action group.
|
212
|
+
#
|
213
|
+
# To allow your agent to generate, run, and troubleshoot code when
|
214
|
+
# trying to complete a task, set this field to
|
215
|
+
# `AMAZON.CodeInterpreter`. You must leave the `description`,
|
216
|
+
# `apiSchema`, and `actionGroupExecutor` fields blank for this action
|
217
|
+
# group.
|
218
|
+
#
|
219
|
+
# During orchestration, if your agent determines that it needs to
|
220
|
+
# invoke an API in an action group, but doesn't have enough
|
221
|
+
# information to complete the API request, it will invoke this action
|
222
|
+
# group instead and return an [Observation][1] reprompting the user
|
223
|
+
# for more information.
|
224
|
+
#
|
225
|
+
#
|
226
|
+
#
|
227
|
+
# [1]: https://docs.aws.amazon.com/https:/docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Observation.html
|
228
|
+
# @return [String]
|
229
|
+
#
|
230
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/AgentActionGroup AWS API Documentation
|
231
|
+
#
|
232
|
+
class AgentActionGroup < Struct.new(
|
233
|
+
:action_group_executor,
|
234
|
+
:action_group_name,
|
235
|
+
:api_schema,
|
236
|
+
:description,
|
237
|
+
:function_schema,
|
238
|
+
:parent_action_group_signature)
|
239
|
+
SENSITIVE = [:action_group_name, :description]
|
240
|
+
include Aws::Structure
|
241
|
+
end
|
242
|
+
|
243
|
+
# An event in which the prompt was analyzed in preparation for
|
244
|
+
# optimization.
|
245
|
+
#
|
246
|
+
# @!attribute [rw] message
|
247
|
+
# A message describing the analysis of the prompt.
|
248
|
+
# @return [String]
|
249
|
+
#
|
250
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/AnalyzePromptEvent AWS API Documentation
|
251
|
+
#
|
252
|
+
class AnalyzePromptEvent < Struct.new(
|
253
|
+
:message,
|
254
|
+
:event_type)
|
255
|
+
SENSITIVE = []
|
256
|
+
include Aws::Structure
|
257
|
+
end
|
258
|
+
|
105
259
|
# Contains information about the API operation that the agent predicts
|
106
260
|
# should be called.
|
107
261
|
#
|
@@ -1110,6 +1264,38 @@ module Aws::BedrockAgentRuntime
|
|
1110
1264
|
include Aws::Structure
|
1111
1265
|
end
|
1112
1266
|
|
1267
|
+
# Defines parameters that the agent needs to invoke from the user to
|
1268
|
+
# complete the function. Corresponds to an action in an action group.
|
1269
|
+
#
|
1270
|
+
# @!attribute [rw] description
|
1271
|
+
# A description of the function and its purpose.
|
1272
|
+
# @return [String]
|
1273
|
+
#
|
1274
|
+
# @!attribute [rw] name
|
1275
|
+
# A name for the function.
|
1276
|
+
# @return [String]
|
1277
|
+
#
|
1278
|
+
# @!attribute [rw] parameters
|
1279
|
+
# The parameters that the agent elicits from the user to fulfill the
|
1280
|
+
# function.
|
1281
|
+
# @return [Hash<String,Types::ParameterDetail>]
|
1282
|
+
#
|
1283
|
+
# @!attribute [rw] require_confirmation
|
1284
|
+
# Contains information if user confirmation is required to invoke the
|
1285
|
+
# function.
|
1286
|
+
# @return [String]
|
1287
|
+
#
|
1288
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FunctionDefinition AWS API Documentation
|
1289
|
+
#
|
1290
|
+
class FunctionDefinition < Struct.new(
|
1291
|
+
:description,
|
1292
|
+
:name,
|
1293
|
+
:parameters,
|
1294
|
+
:require_confirmation)
|
1295
|
+
SENSITIVE = [:name]
|
1296
|
+
include Aws::Structure
|
1297
|
+
end
|
1298
|
+
|
1113
1299
|
# Contains information about the function that the agent predicts should
|
1114
1300
|
# be called.
|
1115
1301
|
#
|
@@ -1238,6 +1424,28 @@ module Aws::BedrockAgentRuntime
|
|
1238
1424
|
include Aws::Structure
|
1239
1425
|
end
|
1240
1426
|
|
1427
|
+
# Contains details about the function schema for the action group or the
|
1428
|
+
# JSON or YAML-formatted payload defining the schema.
|
1429
|
+
#
|
1430
|
+
# @note FunctionSchema is a union - when making an API calls you must set exactly one of the members.
|
1431
|
+
#
|
1432
|
+
# @!attribute [rw] functions
|
1433
|
+
# A list of functions that each define an action in the action group.
|
1434
|
+
# @return [Array<Types::FunctionDefinition>]
|
1435
|
+
#
|
1436
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FunctionSchema AWS API Documentation
|
1437
|
+
#
|
1438
|
+
class FunctionSchema < Struct.new(
|
1439
|
+
:functions,
|
1440
|
+
:unknown)
|
1441
|
+
SENSITIVE = []
|
1442
|
+
include Aws::Structure
|
1443
|
+
include Aws::Structure::Union
|
1444
|
+
|
1445
|
+
class Functions < FunctionSchema; end
|
1446
|
+
class Unknown < FunctionSchema; end
|
1447
|
+
end
|
1448
|
+
|
1241
1449
|
# Contains metadata about a part of the generated response that is
|
1242
1450
|
# accompanied by a citation.
|
1243
1451
|
#
|
@@ -1427,6 +1635,25 @@ module Aws::BedrockAgentRuntime
|
|
1427
1635
|
include Aws::Structure
|
1428
1636
|
end
|
1429
1637
|
|
1638
|
+
# The configuration details for the guardrail.
|
1639
|
+
#
|
1640
|
+
# @!attribute [rw] guardrail_identifier
|
1641
|
+
# The unique identifier for the guardrail.
|
1642
|
+
# @return [String]
|
1643
|
+
#
|
1644
|
+
# @!attribute [rw] guardrail_version
|
1645
|
+
# The version of the guardrail.
|
1646
|
+
# @return [String]
|
1647
|
+
#
|
1648
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GuardrailConfigurationWithArn AWS API Documentation
|
1649
|
+
#
|
1650
|
+
class GuardrailConfigurationWithArn < Struct.new(
|
1651
|
+
:guardrail_identifier,
|
1652
|
+
:guardrail_version)
|
1653
|
+
SENSITIVE = []
|
1654
|
+
include Aws::Structure
|
1655
|
+
end
|
1656
|
+
|
1430
1657
|
# Details of the content filter used in the Guardrail.
|
1431
1658
|
#
|
1432
1659
|
# @!attribute [rw] action
|
@@ -1745,6 +1972,173 @@ module Aws::BedrockAgentRuntime
|
|
1745
1972
|
include Aws::Structure
|
1746
1973
|
end
|
1747
1974
|
|
1975
|
+
# Contains intermediate response for code interpreter if any files have
|
1976
|
+
# been generated.
|
1977
|
+
#
|
1978
|
+
# @!attribute [rw] files
|
1979
|
+
# Files containing intermediate response for the user.
|
1980
|
+
# @return [Array<Types::OutputFile>]
|
1981
|
+
#
|
1982
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InlineAgentFilePart AWS API Documentation
|
1983
|
+
#
|
1984
|
+
class InlineAgentFilePart < Struct.new(
|
1985
|
+
:files,
|
1986
|
+
:event_type)
|
1987
|
+
SENSITIVE = [:files]
|
1988
|
+
include Aws::Structure
|
1989
|
+
end
|
1990
|
+
|
1991
|
+
# Contains a part of an agent response and citations for it.
|
1992
|
+
#
|
1993
|
+
# @!attribute [rw] attribution
|
1994
|
+
# Contains citations for a part of an agent response.
|
1995
|
+
# @return [Types::Attribution]
|
1996
|
+
#
|
1997
|
+
# @!attribute [rw] bytes
|
1998
|
+
# A part of the agent response in bytes.
|
1999
|
+
# @return [String]
|
2000
|
+
#
|
2001
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InlineAgentPayloadPart AWS API Documentation
|
2002
|
+
#
|
2003
|
+
class InlineAgentPayloadPart < Struct.new(
|
2004
|
+
:attribution,
|
2005
|
+
:bytes,
|
2006
|
+
:event_type)
|
2007
|
+
SENSITIVE = [:bytes]
|
2008
|
+
include Aws::Structure
|
2009
|
+
end
|
2010
|
+
|
2011
|
+
# Contains information to return from the action group that the agent
|
2012
|
+
# has predicted to invoke.
|
2013
|
+
#
|
2014
|
+
# This data type is used in the [InvokeAgent response][1] API operation.
|
2015
|
+
#
|
2016
|
+
#
|
2017
|
+
#
|
2018
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html#API_agent-runtime_InvokeAgent_ResponseSyntax
|
2019
|
+
#
|
2020
|
+
# @!attribute [rw] invocation_id
|
2021
|
+
# The identifier of the action group invocation.
|
2022
|
+
# @return [String]
|
2023
|
+
#
|
2024
|
+
# @!attribute [rw] invocation_inputs
|
2025
|
+
# A list of objects that contain information about the parameters and
|
2026
|
+
# inputs that need to be sent into the API operation or function,
|
2027
|
+
# based on what the agent determines from its session with the user.
|
2028
|
+
# @return [Array<Types::InvocationInputMember>]
|
2029
|
+
#
|
2030
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InlineAgentReturnControlPayload AWS API Documentation
|
2031
|
+
#
|
2032
|
+
class InlineAgentReturnControlPayload < Struct.new(
|
2033
|
+
:invocation_id,
|
2034
|
+
:invocation_inputs,
|
2035
|
+
:event_type)
|
2036
|
+
SENSITIVE = []
|
2037
|
+
include Aws::Structure
|
2038
|
+
end
|
2039
|
+
|
2040
|
+
# Contains information about the agent and session, alongside the
|
2041
|
+
# agent's reasoning process and results from calling API actions and
|
2042
|
+
# querying knowledge bases and metadata about the trace. You can use the
|
2043
|
+
# trace to understand how the agent arrived at the response it provided
|
2044
|
+
# the customer. For more information, see [Trace enablement][1].
|
2045
|
+
#
|
2046
|
+
#
|
2047
|
+
#
|
2048
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-test.html#trace-enablement
|
2049
|
+
#
|
2050
|
+
# @!attribute [rw] session_id
|
2051
|
+
# The unique identifier of the session with the agent.
|
2052
|
+
# @return [String]
|
2053
|
+
#
|
2054
|
+
# @!attribute [rw] trace
|
2055
|
+
# Contains one part of the agent's reasoning process and results from
|
2056
|
+
# calling API actions and querying knowledge bases. You can use the
|
2057
|
+
# trace to understand how the agent arrived at the response it
|
2058
|
+
# provided the customer. For more information, see [Trace
|
2059
|
+
# enablement][1].
|
2060
|
+
#
|
2061
|
+
#
|
2062
|
+
#
|
2063
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-test.html#trace-enablement
|
2064
|
+
# @return [Types::Trace]
|
2065
|
+
#
|
2066
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InlineAgentTracePart AWS API Documentation
|
2067
|
+
#
|
2068
|
+
class InlineAgentTracePart < Struct.new(
|
2069
|
+
:session_id,
|
2070
|
+
:trace,
|
2071
|
+
:event_type)
|
2072
|
+
SENSITIVE = [:trace]
|
2073
|
+
include Aws::Structure
|
2074
|
+
end
|
2075
|
+
|
2076
|
+
# Contains parameters that specify various attributes that persist
|
2077
|
+
# across a session or prompt. You can define session state attributes as
|
2078
|
+
# key-value pairs when writing a [Lambda function][1] for an action
|
2079
|
+
# group or pass them when making an `InvokeInlineAgent` request. Use
|
2080
|
+
# session state attributes to control and provide conversational context
|
2081
|
+
# for your inline agent and to help customize your agent's behavior.
|
2082
|
+
# For more information, see [Control session context][2]
|
2083
|
+
#
|
2084
|
+
#
|
2085
|
+
#
|
2086
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-lambda.html
|
2087
|
+
# [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html
|
2088
|
+
#
|
2089
|
+
# @!attribute [rw] files
|
2090
|
+
# Contains information about the files used by code interpreter.
|
2091
|
+
# @return [Array<Types::InputFile>]
|
2092
|
+
#
|
2093
|
+
# @!attribute [rw] invocation_id
|
2094
|
+
# The identifier of the invocation of an action. This value must match
|
2095
|
+
# the `invocationId` returned in the `InvokeInlineAgent` response for
|
2096
|
+
# the action whose results are provided in the
|
2097
|
+
# `returnControlInvocationResults` field. For more information, see
|
2098
|
+
# [Return control to the agent developer][1].
|
2099
|
+
#
|
2100
|
+
#
|
2101
|
+
#
|
2102
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-returncontrol.html
|
2103
|
+
# @return [String]
|
2104
|
+
#
|
2105
|
+
# @!attribute [rw] prompt_session_attributes
|
2106
|
+
# Contains attributes that persist across a session and the values of
|
2107
|
+
# those attributes.
|
2108
|
+
# @return [Hash<String,String>]
|
2109
|
+
#
|
2110
|
+
# @!attribute [rw] return_control_invocation_results
|
2111
|
+
# Contains information about the results from the action group
|
2112
|
+
# invocation. For more information, see [Return control to the agent
|
2113
|
+
# developer][1].
|
2114
|
+
#
|
2115
|
+
# <note markdown="1"> If you include this field in the `sessionState` field, the
|
2116
|
+
# `inputText` field will be ignored.
|
2117
|
+
#
|
2118
|
+
# </note>
|
2119
|
+
#
|
2120
|
+
#
|
2121
|
+
#
|
2122
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-returncontrol.html
|
2123
|
+
# @return [Array<Types::InvocationResultMember>]
|
2124
|
+
#
|
2125
|
+
# @!attribute [rw] session_attributes
|
2126
|
+
# Contains attributes that persist across a session and the values of
|
2127
|
+
# those attributes.
|
2128
|
+
# @return [Hash<String,String>]
|
2129
|
+
#
|
2130
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InlineSessionState AWS API Documentation
|
2131
|
+
#
|
2132
|
+
class InlineSessionState < Struct.new(
|
2133
|
+
:files,
|
2134
|
+
:invocation_id,
|
2135
|
+
:prompt_session_attributes,
|
2136
|
+
:return_control_invocation_results,
|
2137
|
+
:session_attributes)
|
2138
|
+
SENSITIVE = []
|
2139
|
+
include Aws::Structure
|
2140
|
+
end
|
2141
|
+
|
1748
2142
|
# Contains details of the source files.
|
1749
2143
|
#
|
1750
2144
|
# @!attribute [rw] name
|
@@ -1769,6 +2163,27 @@ module Aws::BedrockAgentRuntime
|
|
1769
2163
|
include Aws::Structure
|
1770
2164
|
end
|
1771
2165
|
|
2166
|
+
# Contains information about the prompt to optimize.
|
2167
|
+
#
|
2168
|
+
# @note InputPrompt is a union - when making an API calls you must set exactly one of the members.
|
2169
|
+
#
|
2170
|
+
# @!attribute [rw] text_prompt
|
2171
|
+
# Contains information about the text prompt to optimize.
|
2172
|
+
# @return [Types::TextPrompt]
|
2173
|
+
#
|
2174
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InputPrompt AWS API Documentation
|
2175
|
+
#
|
2176
|
+
class InputPrompt < Struct.new(
|
2177
|
+
:text_prompt,
|
2178
|
+
:unknown)
|
2179
|
+
SENSITIVE = [:text_prompt]
|
2180
|
+
include Aws::Structure
|
2181
|
+
include Aws::Structure::Union
|
2182
|
+
|
2183
|
+
class TextPrompt < InputPrompt; end
|
2184
|
+
class Unknown < InputPrompt; end
|
2185
|
+
end
|
2186
|
+
|
1772
2187
|
# An internal server error occurred. Retry your request.
|
1773
2188
|
#
|
1774
2189
|
# @!attribute [rw] message
|
@@ -1951,97 +2366,267 @@ module Aws::BedrockAgentRuntime
|
|
1951
2366
|
#
|
1952
2367
|
#
|
1953
2368
|
#
|
1954
|
-
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html
|
1955
|
-
# @return [Types::SessionState]
|
2369
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html
|
2370
|
+
# @return [Types::SessionState]
|
2371
|
+
#
|
2372
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvokeAgentRequest AWS API Documentation
|
2373
|
+
#
|
2374
|
+
class InvokeAgentRequest < Struct.new(
|
2375
|
+
:agent_alias_id,
|
2376
|
+
:agent_id,
|
2377
|
+
:enable_trace,
|
2378
|
+
:end_session,
|
2379
|
+
:input_text,
|
2380
|
+
:memory_id,
|
2381
|
+
:session_id,
|
2382
|
+
:session_state)
|
2383
|
+
SENSITIVE = [:input_text]
|
2384
|
+
include Aws::Structure
|
2385
|
+
end
|
2386
|
+
|
2387
|
+
# @!attribute [rw] completion
|
2388
|
+
# The agent's response to the user prompt.
|
2389
|
+
# @return [Types::ResponseStream]
|
2390
|
+
#
|
2391
|
+
# @!attribute [rw] content_type
|
2392
|
+
# The MIME type of the input data in the request. The default value is
|
2393
|
+
# `application/json`.
|
2394
|
+
# @return [String]
|
2395
|
+
#
|
2396
|
+
# @!attribute [rw] memory_id
|
2397
|
+
# The unique identifier of the agent memory.
|
2398
|
+
# @return [String]
|
2399
|
+
#
|
2400
|
+
# @!attribute [rw] session_id
|
2401
|
+
# The unique identifier of the session with the agent.
|
2402
|
+
# @return [String]
|
2403
|
+
#
|
2404
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvokeAgentResponse AWS API Documentation
|
2405
|
+
#
|
2406
|
+
class InvokeAgentResponse < Struct.new(
|
2407
|
+
:completion,
|
2408
|
+
:content_type,
|
2409
|
+
:memory_id,
|
2410
|
+
:session_id)
|
2411
|
+
SENSITIVE = []
|
2412
|
+
include Aws::Structure
|
2413
|
+
end
|
2414
|
+
|
2415
|
+
# @!attribute [rw] enable_trace
|
2416
|
+
# Specifies whether to return the trace for the flow or not. Traces
|
2417
|
+
# track inputs and outputs for nodes in the flow. For more
|
2418
|
+
# information, see [Track each step in your prompt flow by viewing its
|
2419
|
+
# trace in Amazon Bedrock][1].
|
2420
|
+
#
|
2421
|
+
#
|
2422
|
+
#
|
2423
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html
|
2424
|
+
# @return [Boolean]
|
2425
|
+
#
|
2426
|
+
# @!attribute [rw] flow_alias_identifier
|
2427
|
+
# The unique identifier of the flow alias.
|
2428
|
+
# @return [String]
|
2429
|
+
#
|
2430
|
+
# @!attribute [rw] flow_identifier
|
2431
|
+
# The unique identifier of the flow.
|
2432
|
+
# @return [String]
|
2433
|
+
#
|
2434
|
+
# @!attribute [rw] inputs
|
2435
|
+
# A list of objects, each containing information about an input into
|
2436
|
+
# the flow.
|
2437
|
+
# @return [Array<Types::FlowInput>]
|
2438
|
+
#
|
2439
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvokeFlowRequest AWS API Documentation
|
2440
|
+
#
|
2441
|
+
class InvokeFlowRequest < Struct.new(
|
2442
|
+
:enable_trace,
|
2443
|
+
:flow_alias_identifier,
|
2444
|
+
:flow_identifier,
|
2445
|
+
:inputs)
|
2446
|
+
SENSITIVE = []
|
2447
|
+
include Aws::Structure
|
2448
|
+
end
|
2449
|
+
|
2450
|
+
# @!attribute [rw] response_stream
|
2451
|
+
# The output of the flow, returned as a stream. If there's an error,
|
2452
|
+
# the error is returned.
|
2453
|
+
# @return [Types::FlowResponseStream]
|
2454
|
+
#
|
2455
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvokeFlowResponse AWS API Documentation
|
2456
|
+
#
|
2457
|
+
class InvokeFlowResponse < Struct.new(
|
2458
|
+
:response_stream)
|
2459
|
+
SENSITIVE = []
|
2460
|
+
include Aws::Structure
|
2461
|
+
end
|
2462
|
+
|
2463
|
+
# @!attribute [rw] action_groups
|
2464
|
+
# A list of action groups with each action group defining the action
|
2465
|
+
# the inline agent needs to carry out.
|
2466
|
+
# @return [Array<Types::AgentActionGroup>]
|
2467
|
+
#
|
2468
|
+
# @!attribute [rw] customer_encryption_key_arn
|
2469
|
+
# The Amazon Resource Name (ARN) of the Amazon Web Services KMS key to
|
2470
|
+
# use to encrypt your inline agent.
|
2471
|
+
# @return [String]
|
2472
|
+
#
|
2473
|
+
# @!attribute [rw] enable_trace
|
2474
|
+
# Specifies whether to turn on the trace or not to track the agent's
|
2475
|
+
# reasoning process. For more information, see [Using trace][1].
|
2476
|
+
# </p>
|
2477
|
+
#
|
2478
|
+
#
|
2479
|
+
#
|
2480
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/trace-events.html
|
2481
|
+
# @return [Boolean]
|
2482
|
+
#
|
2483
|
+
# @!attribute [rw] end_session
|
2484
|
+
# Specifies whether to end the session with the inline agent or not.
|
2485
|
+
# @return [Boolean]
|
2486
|
+
#
|
2487
|
+
# @!attribute [rw] foundation_model
|
2488
|
+
# The [model identifier (ID)][1] of the model to use for orchestration
|
2489
|
+
# by the inline agent. For example, `meta.llama3-1-70b-instruct-v1:0`.
|
2490
|
+
#
|
2491
|
+
#
|
2492
|
+
#
|
2493
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
|
2494
|
+
# @return [String]
|
2495
|
+
#
|
2496
|
+
# @!attribute [rw] guardrail_configuration
|
2497
|
+
# The [guardrails][1] to assign to the inline agent.
|
2498
|
+
#
|
2499
|
+
#
|
2500
|
+
#
|
2501
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html
|
2502
|
+
# @return [Types::GuardrailConfigurationWithArn]
|
2503
|
+
#
|
2504
|
+
# @!attribute [rw] idle_session_ttl_in_seconds
|
2505
|
+
# The number of seconds for which the inline agent should maintain
|
2506
|
+
# session information. After this time expires, the subsequent
|
2507
|
+
# `InvokeInlineAgent` request begins a new session.
|
2508
|
+
#
|
2509
|
+
# A user interaction remains active for the amount of time specified.
|
2510
|
+
# If no conversation occurs during this time, the session expires and
|
2511
|
+
# the data provided before the timeout is deleted.
|
2512
|
+
# @return [Integer]
|
2513
|
+
#
|
2514
|
+
# @!attribute [rw] inline_session_state
|
2515
|
+
# Parameters that specify the various attributes of a sessions. You
|
2516
|
+
# can include attributes for the session or prompt or, if you
|
2517
|
+
# configured an action group to return control, results from
|
2518
|
+
# invocation of the action group. For more information, see [Control
|
2519
|
+
# session context][1].
|
2520
|
+
#
|
2521
|
+
# <note markdown="1"> If you include `returnControlInvocationResults` in the
|
2522
|
+
# `sessionState` field, the `inputText` field will be ignored.
|
2523
|
+
#
|
2524
|
+
# </note>
|
2525
|
+
#
|
2526
|
+
#
|
2527
|
+
#
|
2528
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html
|
2529
|
+
# @return [Types::InlineSessionState]
|
2530
|
+
#
|
2531
|
+
# @!attribute [rw] input_text
|
2532
|
+
# The prompt text to send to the agent.
|
2533
|
+
#
|
2534
|
+
# <note markdown="1"> If you include `returnControlInvocationResults` in the
|
2535
|
+
# `sessionState` field, the `inputText` field will be ignored.
|
2536
|
+
#
|
2537
|
+
# </note>
|
2538
|
+
# @return [String]
|
2539
|
+
#
|
2540
|
+
# @!attribute [rw] instruction
|
2541
|
+
# The instructions that tell the inline agent what it should do and
|
2542
|
+
# how it should interact with users.
|
2543
|
+
# @return [String]
|
2544
|
+
#
|
2545
|
+
# @!attribute [rw] knowledge_bases
|
2546
|
+
# Contains information of the knowledge bases to associate with.
|
2547
|
+
# @return [Array<Types::KnowledgeBase>]
|
2548
|
+
#
|
2549
|
+
# @!attribute [rw] prompt_override_configuration
|
2550
|
+
# Configurations for advanced prompts used to override the default
|
2551
|
+
# prompts to enhance the accuracy of the inline agent.
|
2552
|
+
# @return [Types::PromptOverrideConfiguration]
|
1956
2553
|
#
|
1957
|
-
#
|
2554
|
+
# @!attribute [rw] session_id
|
2555
|
+
# The unique identifier of the session. Use the same value across
|
2556
|
+
# requests to continue the same conversation.
|
2557
|
+
# @return [String]
|
1958
2558
|
#
|
1959
|
-
|
1960
|
-
|
1961
|
-
|
2559
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvokeInlineAgentRequest AWS API Documentation
|
2560
|
+
#
|
2561
|
+
class InvokeInlineAgentRequest < Struct.new(
|
2562
|
+
:action_groups,
|
2563
|
+
:customer_encryption_key_arn,
|
1962
2564
|
:enable_trace,
|
1963
2565
|
:end_session,
|
2566
|
+
:foundation_model,
|
2567
|
+
:guardrail_configuration,
|
2568
|
+
:idle_session_ttl_in_seconds,
|
2569
|
+
:inline_session_state,
|
1964
2570
|
:input_text,
|
1965
|
-
:
|
1966
|
-
:
|
1967
|
-
:
|
1968
|
-
|
2571
|
+
:instruction,
|
2572
|
+
:knowledge_bases,
|
2573
|
+
:prompt_override_configuration,
|
2574
|
+
:session_id)
|
2575
|
+
SENSITIVE = [:input_text, :instruction, :prompt_override_configuration]
|
1969
2576
|
include Aws::Structure
|
1970
2577
|
end
|
1971
2578
|
|
1972
2579
|
# @!attribute [rw] completion
|
1973
|
-
#
|
1974
|
-
# @return [Types::
|
2580
|
+
# </p>
|
2581
|
+
# @return [Types::InlineAgentResponseStream]
|
1975
2582
|
#
|
1976
2583
|
# @!attribute [rw] content_type
|
1977
2584
|
# The MIME type of the input data in the request. The default value is
|
1978
|
-
#
|
1979
|
-
# @return [String]
|
1980
|
-
#
|
1981
|
-
# @!attribute [rw] memory_id
|
1982
|
-
# The unique identifier of the agent memory.
|
2585
|
+
# application/json.
|
1983
2586
|
# @return [String]
|
1984
2587
|
#
|
1985
2588
|
# @!attribute [rw] session_id
|
1986
2589
|
# The unique identifier of the session with the agent.
|
1987
2590
|
# @return [String]
|
1988
2591
|
#
|
1989
|
-
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/
|
2592
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvokeInlineAgentResponse AWS API Documentation
|
1990
2593
|
#
|
1991
|
-
class
|
2594
|
+
class InvokeInlineAgentResponse < Struct.new(
|
1992
2595
|
:completion,
|
1993
2596
|
:content_type,
|
1994
|
-
:memory_id,
|
1995
2597
|
:session_id)
|
1996
2598
|
SENSITIVE = []
|
1997
2599
|
include Aws::Structure
|
1998
2600
|
end
|
1999
2601
|
|
2000
|
-
#
|
2001
|
-
# Specifies whether to return the trace for the flow or not. Traces
|
2002
|
-
# track inputs and outputs for nodes in the flow. For more
|
2003
|
-
# information, see [Track each step in your prompt flow by viewing its
|
2004
|
-
# trace in Amazon Bedrock][1].
|
2005
|
-
#
|
2006
|
-
#
|
2007
|
-
#
|
2008
|
-
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html
|
2009
|
-
# @return [Boolean]
|
2602
|
+
# Details of the knowledge base associated withe inline agent.
|
2010
2603
|
#
|
2011
|
-
# @!attribute [rw]
|
2012
|
-
# The
|
2604
|
+
# @!attribute [rw] description
|
2605
|
+
# The description of the knowledge base associated with the inline
|
2606
|
+
# agent.
|
2013
2607
|
# @return [String]
|
2014
2608
|
#
|
2015
|
-
# @!attribute [rw]
|
2016
|
-
# The unique identifier
|
2609
|
+
# @!attribute [rw] knowledge_base_id
|
2610
|
+
# The unique identifier for a knowledge base associated with the
|
2611
|
+
# inline agent.
|
2017
2612
|
# @return [String]
|
2018
2613
|
#
|
2019
|
-
# @!attribute [rw]
|
2020
|
-
#
|
2021
|
-
#
|
2022
|
-
# @return [Array<Types::FlowInput>]
|
2614
|
+
# @!attribute [rw] retrieval_configuration
|
2615
|
+
# The configurations to apply to the knowledge base during query. For
|
2616
|
+
# more information, see [Query configurations][1].
|
2023
2617
|
#
|
2024
|
-
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvokeFlowRequest AWS API Documentation
|
2025
2618
|
#
|
2026
|
-
class InvokeFlowRequest < Struct.new(
|
2027
|
-
:enable_trace,
|
2028
|
-
:flow_alias_identifier,
|
2029
|
-
:flow_identifier,
|
2030
|
-
:inputs)
|
2031
|
-
SENSITIVE = []
|
2032
|
-
include Aws::Structure
|
2033
|
-
end
|
2034
|
-
|
2035
|
-
# @!attribute [rw] response_stream
|
2036
|
-
# The output of the flow, returned as a stream. If there's an error,
|
2037
|
-
# the error is returned.
|
2038
|
-
# @return [Types::FlowResponseStream]
|
2039
2619
|
#
|
2040
|
-
#
|
2620
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
|
2621
|
+
# @return [Types::KnowledgeBaseRetrievalConfiguration]
|
2041
2622
|
#
|
2042
|
-
|
2043
|
-
|
2044
|
-
|
2623
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBase AWS API Documentation
|
2624
|
+
#
|
2625
|
+
class KnowledgeBase < Struct.new(
|
2626
|
+
:description,
|
2627
|
+
:knowledge_base_id,
|
2628
|
+
:retrieval_configuration)
|
2629
|
+
SENSITIVE = [:description]
|
2045
2630
|
include Aws::Structure
|
2046
2631
|
end
|
2047
2632
|
|
@@ -2527,6 +3112,73 @@ module Aws::BedrockAgentRuntime
|
|
2527
3112
|
include Aws::Structure
|
2528
3113
|
end
|
2529
3114
|
|
3115
|
+
# @!attribute [rw] input
|
3116
|
+
# Contains the prompt to optimize.
|
3117
|
+
# @return [Types::InputPrompt]
|
3118
|
+
#
|
3119
|
+
# @!attribute [rw] target_model_id
|
3120
|
+
# The unique identifier of the model that you want to optimize the
|
3121
|
+
# prompt for.
|
3122
|
+
# @return [String]
|
3123
|
+
#
|
3124
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/OptimizePromptRequest AWS API Documentation
|
3125
|
+
#
|
3126
|
+
class OptimizePromptRequest < Struct.new(
|
3127
|
+
:input,
|
3128
|
+
:target_model_id)
|
3129
|
+
SENSITIVE = []
|
3130
|
+
include Aws::Structure
|
3131
|
+
end
|
3132
|
+
|
3133
|
+
# @!attribute [rw] optimized_prompt
|
3134
|
+
# The prompt after being optimized for the task.
|
3135
|
+
# @return [Types::OptimizedPromptStream]
|
3136
|
+
#
|
3137
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/OptimizePromptResponse AWS API Documentation
|
3138
|
+
#
|
3139
|
+
class OptimizePromptResponse < Struct.new(
|
3140
|
+
:optimized_prompt)
|
3141
|
+
SENSITIVE = []
|
3142
|
+
include Aws::Structure
|
3143
|
+
end
|
3144
|
+
|
3145
|
+
# Contains information about the optimized prompt.
|
3146
|
+
#
|
3147
|
+
# @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.
|
3148
|
+
#
|
3149
|
+
# @!attribute [rw] text_prompt
|
3150
|
+
# Contains information about the text in the prompt that was
|
3151
|
+
# optimized.
|
3152
|
+
# @return [Types::TextPrompt]
|
3153
|
+
#
|
3154
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/OptimizedPrompt AWS API Documentation
|
3155
|
+
#
|
3156
|
+
class OptimizedPrompt < Struct.new(
|
3157
|
+
:text_prompt,
|
3158
|
+
:unknown)
|
3159
|
+
SENSITIVE = [:text_prompt]
|
3160
|
+
include Aws::Structure
|
3161
|
+
include Aws::Structure::Union
|
3162
|
+
|
3163
|
+
class TextPrompt < OptimizedPrompt; end
|
3164
|
+
class Unknown < OptimizedPrompt; end
|
3165
|
+
end
|
3166
|
+
|
3167
|
+
# An event in which the prompt was optimized.
|
3168
|
+
#
|
3169
|
+
# @!attribute [rw] optimized_prompt
|
3170
|
+
# Contains information about the optimized prompt.
|
3171
|
+
# @return [Types::OptimizedPrompt]
|
3172
|
+
#
|
3173
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/OptimizedPromptEvent AWS API Documentation
|
3174
|
+
#
|
3175
|
+
class OptimizedPromptEvent < Struct.new(
|
3176
|
+
:optimized_prompt,
|
3177
|
+
:event_type)
|
3178
|
+
SENSITIVE = []
|
3179
|
+
include Aws::Structure
|
3180
|
+
end
|
3181
|
+
|
2530
3182
|
# Settings for how the model processes the prompt prior to retrieval and
|
2531
3183
|
# generation.
|
2532
3184
|
#
|
@@ -2708,6 +3360,32 @@ module Aws::BedrockAgentRuntime
|
|
2708
3360
|
include Aws::Structure
|
2709
3361
|
end
|
2710
3362
|
|
3363
|
+
# Contains details about a parameter in a function for an action group.
|
3364
|
+
#
|
3365
|
+
# @!attribute [rw] description
|
3366
|
+
# A description of the parameter. Helps the foundation model determine
|
3367
|
+
# how to elicit the parameters from the user.
|
3368
|
+
# @return [String]
|
3369
|
+
#
|
3370
|
+
# @!attribute [rw] required
|
3371
|
+
# Whether the parameter is required for the agent to complete the
|
3372
|
+
# function for action group invocation.
|
3373
|
+
# @return [Boolean]
|
3374
|
+
#
|
3375
|
+
# @!attribute [rw] type
|
3376
|
+
# The data type of the parameter.
|
3377
|
+
# @return [String]
|
3378
|
+
#
|
3379
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ParameterDetail AWS API Documentation
|
3380
|
+
#
|
3381
|
+
class ParameterDetail < Struct.new(
|
3382
|
+
:description,
|
3383
|
+
:required,
|
3384
|
+
:type)
|
3385
|
+
SENSITIVE = []
|
3386
|
+
include Aws::Structure
|
3387
|
+
end
|
3388
|
+
|
2711
3389
|
# Contains a part of an agent response and citations for it.
|
2712
3390
|
#
|
2713
3391
|
# @!attribute [rw] attribution
|
@@ -2908,6 +3586,128 @@ module Aws::BedrockAgentRuntime
|
|
2908
3586
|
class Unknown < PreProcessingTrace; end
|
2909
3587
|
end
|
2910
3588
|
|
3589
|
+
# Contains configurations to override a prompt template in one part of
|
3590
|
+
# an agent sequence. For more information, see [Advanced prompts][1].
|
3591
|
+
#
|
3592
|
+
#
|
3593
|
+
#
|
3594
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html
|
3595
|
+
#
|
3596
|
+
# @!attribute [rw] base_prompt_template
|
3597
|
+
# Defines the prompt template with which to replace the default prompt
|
3598
|
+
# template. You can use placeholder variables in the base prompt
|
3599
|
+
# template to customize the prompt. For more information, see [Prompt
|
3600
|
+
# template placeholder variables][1]. For more information, see
|
3601
|
+
# [Configure the prompt templates][2].
|
3602
|
+
#
|
3603
|
+
#
|
3604
|
+
#
|
3605
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html
|
3606
|
+
# [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts-configure.html
|
3607
|
+
# @return [String]
|
3608
|
+
#
|
3609
|
+
# @!attribute [rw] inference_configuration
|
3610
|
+
# Contains inference parameters to use when the agent invokes a
|
3611
|
+
# foundation model in the part of the agent sequence defined by the
|
3612
|
+
# `promptType`. For more information, see [Inference parameters for
|
3613
|
+
# foundation models][1].
|
3614
|
+
#
|
3615
|
+
#
|
3616
|
+
#
|
3617
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html
|
3618
|
+
# @return [Types::InferenceConfiguration]
|
3619
|
+
#
|
3620
|
+
# @!attribute [rw] parser_mode
|
3621
|
+
# Specifies whether to override the default parser Lambda function
|
3622
|
+
# when parsing the raw foundation model output in the part of the
|
3623
|
+
# agent sequence defined by the `promptType`. If you set the field as
|
3624
|
+
# `OVERRIDEN`, the `overrideLambda` field in the
|
3625
|
+
# [PromptOverrideConfiguration][1] must be specified with the ARN of a
|
3626
|
+
# Lambda function.
|
3627
|
+
#
|
3628
|
+
#
|
3629
|
+
#
|
3630
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html
|
3631
|
+
# @return [String]
|
3632
|
+
#
|
3633
|
+
# @!attribute [rw] prompt_creation_mode
|
3634
|
+
# Specifies whether to override the default prompt template for this
|
3635
|
+
# `promptType`. Set this value to `OVERRIDDEN` to use the prompt that
|
3636
|
+
# you provide in the `basePromptTemplate`. If you leave it as
|
3637
|
+
# `DEFAULT`, the agent uses a default prompt template.
|
3638
|
+
# @return [String]
|
3639
|
+
#
|
3640
|
+
# @!attribute [rw] prompt_state
|
3641
|
+
# Specifies whether to allow the inline agent to carry out the step
|
3642
|
+
# specified in the `promptType`. If you set this value to `DISABLED`,
|
3643
|
+
# the agent skips that step. The default state for each `promptType`
|
3644
|
+
# is as follows.
|
3645
|
+
#
|
3646
|
+
# * `PRE_PROCESSING` – `ENABLED`
|
3647
|
+
#
|
3648
|
+
# * `ORCHESTRATION` – `ENABLED`
|
3649
|
+
#
|
3650
|
+
# * `KNOWLEDGE_BASE_RESPONSE_GENERATION` – `ENABLED`
|
3651
|
+
#
|
3652
|
+
# * `POST_PROCESSING` – `DISABLED`
|
3653
|
+
# @return [String]
|
3654
|
+
#
|
3655
|
+
# @!attribute [rw] prompt_type
|
3656
|
+
# The step in the agent sequence that this prompt configuration
|
3657
|
+
# applies to.
|
3658
|
+
# @return [String]
|
3659
|
+
#
|
3660
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PromptConfiguration AWS API Documentation
|
3661
|
+
#
|
3662
|
+
class PromptConfiguration < Struct.new(
|
3663
|
+
:base_prompt_template,
|
3664
|
+
:inference_configuration,
|
3665
|
+
:parser_mode,
|
3666
|
+
:prompt_creation_mode,
|
3667
|
+
:prompt_state,
|
3668
|
+
:prompt_type)
|
3669
|
+
SENSITIVE = [:base_prompt_template]
|
3670
|
+
include Aws::Structure
|
3671
|
+
end
|
3672
|
+
|
3673
|
+
# Contains configurations to override prompts in different parts of an
|
3674
|
+
# agent sequence. For more information, see [Advanced prompts][1].
|
3675
|
+
#
|
3676
|
+
#
|
3677
|
+
#
|
3678
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html
|
3679
|
+
#
|
3680
|
+
# @!attribute [rw] override_lambda
|
3681
|
+
# The ARN of the Lambda function to use when parsing the raw
|
3682
|
+
# foundation model output in parts of the agent sequence. If you
|
3683
|
+
# specify this field, at least one of the `promptConfigurations` must
|
3684
|
+
# contain a `parserMode` value that is set to `OVERRIDDEN`. For more
|
3685
|
+
# information, see [Parser Lambda function in Amazon Bedrock
|
3686
|
+
# Agents][1].
|
3687
|
+
#
|
3688
|
+
#
|
3689
|
+
#
|
3690
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/lambda-parser.html
|
3691
|
+
# @return [String]
|
3692
|
+
#
|
3693
|
+
# @!attribute [rw] prompt_configurations
|
3694
|
+
# Contains configurations to override a prompt template in one part of
|
3695
|
+
# an agent sequence. For more information, see [Advanced prompts][1].
|
3696
|
+
#
|
3697
|
+
#
|
3698
|
+
#
|
3699
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html
|
3700
|
+
# @return [Array<Types::PromptConfiguration>]
|
3701
|
+
#
|
3702
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PromptOverrideConfiguration AWS API Documentation
|
3703
|
+
#
|
3704
|
+
class PromptOverrideConfiguration < Struct.new(
|
3705
|
+
:override_lambda,
|
3706
|
+
:prompt_configurations)
|
3707
|
+
SENSITIVE = []
|
3708
|
+
include Aws::Structure
|
3709
|
+
end
|
3710
|
+
|
2911
3711
|
# Contains the template for the prompt that's sent to the model for
|
2912
3712
|
# response generation. For more information, see [Knowledge base prompt
|
2913
3713
|
# templates][1].
|
@@ -3737,6 +4537,25 @@ module Aws::BedrockAgentRuntime
|
|
3737
4537
|
include Aws::Structure
|
3738
4538
|
end
|
3739
4539
|
|
4540
|
+
# The identifier information for an Amazon S3 bucket.
|
4541
|
+
#
|
4542
|
+
# @!attribute [rw] s3_bucket_name
|
4543
|
+
# The name of the S3 bucket.
|
4544
|
+
# @return [String]
|
4545
|
+
#
|
4546
|
+
# @!attribute [rw] s3_object_key
|
4547
|
+
# The S3 object key for the S3 resource.
|
4548
|
+
# @return [String]
|
4549
|
+
#
|
4550
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/S3Identifier AWS API Documentation
|
4551
|
+
#
|
4552
|
+
class S3Identifier < Struct.new(
|
4553
|
+
:s3_bucket_name,
|
4554
|
+
:s3_object_key)
|
4555
|
+
SENSITIVE = []
|
4556
|
+
include Aws::Structure
|
4557
|
+
end
|
4558
|
+
|
3740
4559
|
# The unique wrapper object of the document from the S3 location.
|
3741
4560
|
#
|
3742
4561
|
# @!attribute [rw] uri
|
@@ -3949,6 +4768,20 @@ module Aws::BedrockAgentRuntime
|
|
3949
4768
|
include Aws::Structure
|
3950
4769
|
end
|
3951
4770
|
|
4771
|
+
# Contains information about the text prompt to optimize.
|
4772
|
+
#
|
4773
|
+
# @!attribute [rw] text
|
4774
|
+
# The text in the text prompt to optimize.
|
4775
|
+
# @return [String]
|
4776
|
+
#
|
4777
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/TextPrompt AWS API Documentation
|
4778
|
+
#
|
4779
|
+
class TextPrompt < Struct.new(
|
4780
|
+
:text)
|
4781
|
+
SENSITIVE = []
|
4782
|
+
include Aws::Structure
|
4783
|
+
end
|
4784
|
+
|
3952
4785
|
# Contains the part of the generated text that contains a citation,
|
3953
4786
|
# alongside where it begins and ends.
|
3954
4787
|
#
|
@@ -4166,6 +4999,60 @@ module Aws::BedrockAgentRuntime
|
|
4166
4999
|
|
4167
5000
|
end
|
4168
5001
|
|
5002
|
+
# The response from invoking the agent and associated citations and
|
5003
|
+
# trace information.
|
5004
|
+
#
|
5005
|
+
# EventStream is an Enumerator of Events.
|
5006
|
+
# #event_types #=> Array, returns all modeled event types in the stream
|
5007
|
+
#
|
5008
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InlineAgentResponseStream AWS API Documentation
|
5009
|
+
#
|
5010
|
+
class InlineAgentResponseStream < Enumerator
|
5011
|
+
|
5012
|
+
def event_types
|
5013
|
+
[
|
5014
|
+
:access_denied_exception,
|
5015
|
+
:bad_gateway_exception,
|
5016
|
+
:chunk,
|
5017
|
+
:conflict_exception,
|
5018
|
+
:dependency_failed_exception,
|
5019
|
+
:files,
|
5020
|
+
:internal_server_exception,
|
5021
|
+
:resource_not_found_exception,
|
5022
|
+
:return_control,
|
5023
|
+
:service_quota_exceeded_exception,
|
5024
|
+
:throttling_exception,
|
5025
|
+
:trace,
|
5026
|
+
:validation_exception
|
5027
|
+
]
|
5028
|
+
end
|
5029
|
+
|
5030
|
+
end
|
5031
|
+
|
5032
|
+
# The stream containing events in the prompt optimization process.
|
5033
|
+
#
|
5034
|
+
# EventStream is an Enumerator of Events.
|
5035
|
+
# #event_types #=> Array, returns all modeled event types in the stream
|
5036
|
+
#
|
5037
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/OptimizedPromptStream AWS API Documentation
|
5038
|
+
#
|
5039
|
+
class OptimizedPromptStream < Enumerator
|
5040
|
+
|
5041
|
+
def event_types
|
5042
|
+
[
|
5043
|
+
:access_denied_exception,
|
5044
|
+
:analyze_prompt_event,
|
5045
|
+
:bad_gateway_exception,
|
5046
|
+
:dependency_failed_exception,
|
5047
|
+
:internal_server_exception,
|
5048
|
+
:optimized_prompt_event,
|
5049
|
+
:throttling_exception,
|
5050
|
+
:validation_exception
|
5051
|
+
]
|
5052
|
+
end
|
5053
|
+
|
5054
|
+
end
|
5055
|
+
|
4169
5056
|
# The response from invoking the agent and associated citations and
|
4170
5057
|
# trace information.
|
4171
5058
|
#
|