aws-sdk-bedrockagentruntime 1.1.0 → 1.3.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 +238 -179
- data/lib/aws-sdk-bedrockagentruntime/client_api.rb +55 -52
- data/lib/aws-sdk-bedrockagentruntime/event_streams.rb +24 -24
- data/lib/aws-sdk-bedrockagentruntime/types.rb +603 -381
- data/lib/aws-sdk-bedrockagentruntime.rb +1 -1
- data/sig/client.rbs +28 -21
- data/sig/types.rbs +56 -54
- metadata +2 -2
@@ -10,11 +10,10 @@
|
|
10
10
|
module Aws::BedrockAgentRuntime
|
11
11
|
module Types
|
12
12
|
|
13
|
-
#
|
14
|
-
# permissions
|
13
|
+
# The request is denied because of missing access permissions. Check
|
14
|
+
# your permissions and retry your request.
|
15
15
|
#
|
16
16
|
# @!attribute [rw] message
|
17
|
-
# Non Blank String
|
18
17
|
# @return [String]
|
19
18
|
#
|
20
19
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/AccessDeniedException AWS API Documentation
|
@@ -26,44 +25,46 @@ module Aws::BedrockAgentRuntime
|
|
26
25
|
include Aws::Structure
|
27
26
|
end
|
28
27
|
|
29
|
-
#
|
28
|
+
# Contains information about the action group being invoked.
|
30
29
|
#
|
31
30
|
# @!attribute [rw] action_group_name
|
32
|
-
#
|
33
|
-
# @return [String]
|
34
|
-
#
|
35
|
-
# @!attribute [rw] verb
|
36
|
-
# Agent Trace Action Group Action verb
|
31
|
+
# The name of the action group.
|
37
32
|
# @return [String]
|
38
33
|
#
|
39
34
|
# @!attribute [rw] api_path
|
40
|
-
#
|
35
|
+
# The path to the API to call, based off the action group.
|
41
36
|
# @return [String]
|
42
37
|
#
|
43
38
|
# @!attribute [rw] parameters
|
44
|
-
#
|
39
|
+
# The parameters in the Lambda input event.
|
45
40
|
# @return [Array<Types::Parameter>]
|
46
41
|
#
|
47
42
|
# @!attribute [rw] request_body
|
48
|
-
#
|
43
|
+
# The parameters in the request body for the Lambda input event.
|
49
44
|
# @return [Types::RequestBody]
|
50
45
|
#
|
46
|
+
# @!attribute [rw] verb
|
47
|
+
# The API method being used, based off the action group.
|
48
|
+
# @return [String]
|
49
|
+
#
|
51
50
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ActionGroupInvocationInput AWS API Documentation
|
52
51
|
#
|
53
52
|
class ActionGroupInvocationInput < Struct.new(
|
54
53
|
:action_group_name,
|
55
|
-
:verb,
|
56
54
|
:api_path,
|
57
55
|
:parameters,
|
58
|
-
:request_body
|
59
|
-
|
56
|
+
:request_body,
|
57
|
+
:verb)
|
58
|
+
SENSITIVE = [:action_group_name, :api_path, :verb]
|
60
59
|
include Aws::Structure
|
61
60
|
end
|
62
61
|
|
63
|
-
#
|
62
|
+
# Contains the JSON-formatted string returned by the API invoked by the
|
63
|
+
# action group.
|
64
64
|
#
|
65
65
|
# @!attribute [rw] text
|
66
|
-
#
|
66
|
+
# The JSON-formatted string returned by the API invoked by the action
|
67
|
+
# group.
|
67
68
|
# @return [String]
|
68
69
|
#
|
69
70
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ActionGroupInvocationOutput AWS API Documentation
|
@@ -74,10 +75,11 @@ module Aws::BedrockAgentRuntime
|
|
74
75
|
include Aws::Structure
|
75
76
|
end
|
76
77
|
|
77
|
-
#
|
78
|
+
# Contains citations for a part of an agent response.
|
78
79
|
#
|
79
80
|
# @!attribute [rw] citations
|
80
|
-
#
|
81
|
+
# A list of citations and related information for a part of an agent
|
82
|
+
# response.
|
81
83
|
# @return [Array<Types::Citation>]
|
82
84
|
#
|
83
85
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/Attribution AWS API Documentation
|
@@ -88,15 +90,15 @@ module Aws::BedrockAgentRuntime
|
|
88
90
|
include Aws::Structure
|
89
91
|
end
|
90
92
|
|
91
|
-
#
|
92
|
-
#
|
93
|
+
# There was an issue with a dependency due to a server issue. Retry your
|
94
|
+
# request.
|
93
95
|
#
|
94
96
|
# @!attribute [rw] message
|
95
|
-
# Non Blank String
|
96
97
|
# @return [String]
|
97
98
|
#
|
98
99
|
# @!attribute [rw] resource_name
|
99
|
-
#
|
100
|
+
# The name of the dependency that caused the issue, such as Amazon
|
101
|
+
# Bedrock, Lambda, or STS.
|
100
102
|
# @return [String]
|
101
103
|
#
|
102
104
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/BadGatewayException AWS API Documentation
|
@@ -109,14 +111,17 @@ module Aws::BedrockAgentRuntime
|
|
109
111
|
include Aws::Structure
|
110
112
|
end
|
111
113
|
|
112
|
-
#
|
114
|
+
# An object containing a segment of the generated response that is based
|
115
|
+
# on a source in the knowledge base, alongside information about the
|
116
|
+
# source.
|
113
117
|
#
|
114
118
|
# @!attribute [rw] generated_response_part
|
115
|
-
#
|
119
|
+
# Contains the generated response and metadata
|
116
120
|
# @return [Types::GeneratedResponsePart]
|
117
121
|
#
|
118
122
|
# @!attribute [rw] retrieved_references
|
119
|
-
#
|
123
|
+
# Contains metadata about the sources cited for the generated
|
124
|
+
# response.
|
120
125
|
# @return [Array<Types::RetrievedReference>]
|
121
126
|
#
|
122
127
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/Citation AWS API Documentation
|
@@ -128,11 +133,10 @@ module Aws::BedrockAgentRuntime
|
|
128
133
|
include Aws::Structure
|
129
134
|
end
|
130
135
|
|
131
|
-
#
|
132
|
-
#
|
136
|
+
# There was a conflict performing an operation. Resolve the conflict and
|
137
|
+
# retry your request.
|
133
138
|
#
|
134
139
|
# @!attribute [rw] message
|
135
|
-
# Non Blank String
|
136
140
|
# @return [String]
|
137
141
|
#
|
138
142
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ConflictException AWS API Documentation
|
@@ -144,16 +148,15 @@ module Aws::BedrockAgentRuntime
|
|
144
148
|
include Aws::Structure
|
145
149
|
end
|
146
150
|
|
147
|
-
#
|
148
|
-
#
|
149
|
-
# configuration)
|
151
|
+
# There was an issue with a dependency. Check the resource
|
152
|
+
# configurations and retry the request.
|
150
153
|
#
|
151
154
|
# @!attribute [rw] message
|
152
|
-
# Non Blank String
|
153
155
|
# @return [String]
|
154
156
|
#
|
155
157
|
# @!attribute [rw] resource_name
|
156
|
-
#
|
158
|
+
# The name of the dependency that caused the issue, such as Amazon
|
159
|
+
# Bedrock, Lambda, or STS.
|
157
160
|
# @return [String]
|
158
161
|
#
|
159
162
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/DependencyFailedException AWS API Documentation
|
@@ -166,29 +169,29 @@ module Aws::BedrockAgentRuntime
|
|
166
169
|
include Aws::Structure
|
167
170
|
end
|
168
171
|
|
169
|
-
#
|
172
|
+
# Contains information about the failure of the interaction.
|
170
173
|
#
|
171
|
-
# @!attribute [rw]
|
172
|
-
#
|
174
|
+
# @!attribute [rw] failure_reason
|
175
|
+
# The reason the interaction failed.
|
173
176
|
# @return [String]
|
174
177
|
#
|
175
|
-
# @!attribute [rw]
|
176
|
-
#
|
178
|
+
# @!attribute [rw] trace_id
|
179
|
+
# The unique identifier of the trace.
|
177
180
|
# @return [String]
|
178
181
|
#
|
179
182
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FailureTrace AWS API Documentation
|
180
183
|
#
|
181
184
|
class FailureTrace < Struct.new(
|
182
|
-
:
|
183
|
-
:
|
185
|
+
:failure_reason,
|
186
|
+
:trace_id)
|
184
187
|
SENSITIVE = [:failure_reason]
|
185
188
|
include Aws::Structure
|
186
189
|
end
|
187
190
|
|
188
|
-
#
|
191
|
+
# Contains details about the response to the user.
|
189
192
|
#
|
190
193
|
# @!attribute [rw] text
|
191
|
-
#
|
194
|
+
# The text in the response to the user.
|
192
195
|
# @return [String]
|
193
196
|
#
|
194
197
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FinalResponse AWS API Documentation
|
@@ -199,60 +202,82 @@ module Aws::BedrockAgentRuntime
|
|
199
202
|
include Aws::Structure
|
200
203
|
end
|
201
204
|
|
202
|
-
#
|
205
|
+
# Contains metadata about a part of the generated response that is
|
206
|
+
# accompanied by a citation.
|
203
207
|
#
|
204
208
|
# @!attribute [rw] text_response_part
|
205
|
-
#
|
209
|
+
# Contains metadata about a textual part of the generated response
|
210
|
+
# that is accompanied by a citation.
|
206
211
|
# @return [Types::TextResponsePart]
|
207
212
|
#
|
208
213
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GeneratedResponsePart AWS API Documentation
|
209
214
|
#
|
210
215
|
class GeneratedResponsePart < Struct.new(
|
211
216
|
:text_response_part)
|
212
|
-
SENSITIVE = []
|
217
|
+
SENSITIVE = [:text_response_part]
|
213
218
|
include Aws::Structure
|
214
219
|
end
|
215
220
|
|
216
|
-
#
|
217
|
-
#
|
221
|
+
# Specifications about the inference parameters that were provided
|
222
|
+
# alongside the prompt. These are specified in the
|
223
|
+
# [PromptOverrideConfiguration][1] object that was set when the agent
|
224
|
+
# was created or updated. For more information, see [Inference
|
225
|
+
# parameters for foundation models][2].
|
218
226
|
#
|
219
|
-
# @!attribute [rw] temperature
|
220
|
-
# Controls randomness, higher values increase diversity
|
221
|
-
# @return [Float]
|
222
227
|
#
|
223
|
-
# @!attribute [rw] top_p
|
224
|
-
# Cumulative probability cutoff for token selection
|
225
|
-
# @return [Float]
|
226
228
|
#
|
227
|
-
#
|
228
|
-
#
|
229
|
-
# @return [Integer]
|
229
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html
|
230
|
+
# [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html
|
230
231
|
#
|
231
232
|
# @!attribute [rw] maximum_length
|
232
|
-
#
|
233
|
+
# The maximum number of tokens allowed in the generated response.
|
233
234
|
# @return [Integer]
|
234
235
|
#
|
235
236
|
# @!attribute [rw] stop_sequences
|
236
|
-
#
|
237
|
+
# A list of stop sequences. A stop sequence is a sequence of
|
238
|
+
# characters that causes the model to stop generating the response.
|
237
239
|
# @return [Array<String>]
|
238
240
|
#
|
241
|
+
# @!attribute [rw] temperature
|
242
|
+
# The likelihood of the model selecting higher-probability options
|
243
|
+
# while generating a response. A lower value makes the model more
|
244
|
+
# likely to choose higher-probability options, while a higher value
|
245
|
+
# makes the model more likely to choose lower-probability options.
|
246
|
+
# @return [Float]
|
247
|
+
#
|
248
|
+
# @!attribute [rw] top_k
|
249
|
+
# While generating a response, the model determines the probability of
|
250
|
+
# the following token at each point of generation. The value that you
|
251
|
+
# set for `topK` is the number of most-likely candidates from which
|
252
|
+
# the model chooses the next token in the sequence. For example, if
|
253
|
+
# you set `topK` to 50, the model selects the next token from among
|
254
|
+
# the top 50 most likely choices.
|
255
|
+
# @return [Integer]
|
256
|
+
#
|
257
|
+
# @!attribute [rw] top_p
|
258
|
+
# While generating a response, the model determines the probability of
|
259
|
+
# the following token at each point of generation. The value that you
|
260
|
+
# set for `Top P` determines the number of most-likely candidates from
|
261
|
+
# which the model chooses the next token in the sequence. For example,
|
262
|
+
# if you set `topP` to 80, the model only selects the next token from
|
263
|
+
# the top 80% of the probability distribution of next tokens.
|
264
|
+
# @return [Float]
|
265
|
+
#
|
239
266
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InferenceConfiguration AWS API Documentation
|
240
267
|
#
|
241
268
|
class InferenceConfiguration < Struct.new(
|
269
|
+
:maximum_length,
|
270
|
+
:stop_sequences,
|
242
271
|
:temperature,
|
243
|
-
:top_p,
|
244
272
|
:top_k,
|
245
|
-
:
|
246
|
-
:stop_sequences)
|
273
|
+
:top_p)
|
247
274
|
SENSITIVE = []
|
248
275
|
include Aws::Structure
|
249
276
|
end
|
250
277
|
|
251
|
-
#
|
252
|
-
# processing of request
|
278
|
+
# An internal server error occurred. Retry your request.
|
253
279
|
#
|
254
280
|
# @!attribute [rw] message
|
255
|
-
# Non Blank String
|
256
281
|
# @return [String]
|
257
282
|
#
|
258
283
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InternalServerException AWS API Documentation
|
@@ -264,95 +289,97 @@ module Aws::BedrockAgentRuntime
|
|
264
289
|
include Aws::Structure
|
265
290
|
end
|
266
291
|
|
267
|
-
#
|
268
|
-
#
|
292
|
+
# Contains information pertaining to the action group or knowledge base
|
293
|
+
# that is being invoked.
|
269
294
|
#
|
270
|
-
# @!attribute [rw]
|
271
|
-
#
|
272
|
-
# @return [
|
295
|
+
# @!attribute [rw] action_group_invocation_input
|
296
|
+
# Contains information about the action group to be invoked.
|
297
|
+
# @return [Types::ActionGroupInvocationInput]
|
273
298
|
#
|
274
299
|
# @!attribute [rw] invocation_type
|
275
|
-
#
|
300
|
+
# Specifies whether the agent is invoking an action group or a
|
301
|
+
# knowledge base.
|
276
302
|
# @return [String]
|
277
303
|
#
|
278
|
-
# @!attribute [rw] action_group_invocation_input
|
279
|
-
# input to lambda used in action group
|
280
|
-
# @return [Types::ActionGroupInvocationInput]
|
281
|
-
#
|
282
304
|
# @!attribute [rw] knowledge_base_lookup_input
|
283
|
-
#
|
305
|
+
# Contains details about the knowledge base to look up and the query
|
306
|
+
# to be made.
|
284
307
|
# @return [Types::KnowledgeBaseLookupInput]
|
285
308
|
#
|
309
|
+
# @!attribute [rw] trace_id
|
310
|
+
# The unique identifier of the trace.
|
311
|
+
# @return [String]
|
312
|
+
#
|
286
313
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvocationInput AWS API Documentation
|
287
314
|
#
|
288
315
|
class InvocationInput < Struct.new(
|
289
|
-
:trace_id,
|
290
|
-
:invocation_type,
|
291
316
|
:action_group_invocation_input,
|
292
|
-
:
|
317
|
+
:invocation_type,
|
318
|
+
:knowledge_base_lookup_input,
|
319
|
+
:trace_id)
|
293
320
|
SENSITIVE = []
|
294
321
|
include Aws::Structure
|
295
322
|
end
|
296
323
|
|
297
|
-
#
|
298
|
-
#
|
299
|
-
#
|
300
|
-
# Session state passed by customer. Base64 encoded json string
|
301
|
-
# representation of SessionState.
|
302
|
-
# @return [Types::SessionState]
|
324
|
+
# @!attribute [rw] agent_alias_id
|
325
|
+
# The alias of the agent to use.
|
326
|
+
# @return [String]
|
303
327
|
#
|
304
328
|
# @!attribute [rw] agent_id
|
305
|
-
#
|
329
|
+
# The unique identifier of the agent to use.
|
306
330
|
# @return [String]
|
307
331
|
#
|
308
|
-
# @!attribute [rw]
|
309
|
-
#
|
310
|
-
#
|
332
|
+
# @!attribute [rw] enable_trace
|
333
|
+
# Specifies whether to turn on the trace or not to track the agent's
|
334
|
+
# reasoning process. For more information, see [Trace enablement][1].
|
311
335
|
#
|
312
|
-
# @!attribute [rw] session_id
|
313
|
-
# Identifier used for the current session
|
314
|
-
# @return [String]
|
315
336
|
#
|
316
|
-
#
|
317
|
-
#
|
337
|
+
#
|
338
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-test.html#trace-events
|
318
339
|
# @return [Boolean]
|
319
340
|
#
|
320
|
-
# @!attribute [rw]
|
321
|
-
#
|
341
|
+
# @!attribute [rw] end_session
|
342
|
+
# Specifies whether to end the session with the agent or not.
|
322
343
|
# @return [Boolean]
|
323
344
|
#
|
324
345
|
# @!attribute [rw] input_text
|
325
|
-
#
|
326
|
-
#
|
346
|
+
# The prompt text to send the agent.
|
347
|
+
# @return [String]
|
348
|
+
#
|
349
|
+
# @!attribute [rw] session_id
|
350
|
+
# The unique identifier of the session. Use the same value across
|
351
|
+
# requests to continue the same conversation.
|
327
352
|
# @return [String]
|
328
353
|
#
|
354
|
+
# @!attribute [rw] session_state
|
355
|
+
# Contains parameters that specify various attributes of the session.
|
356
|
+
# @return [Types::SessionState]
|
357
|
+
#
|
329
358
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvokeAgentRequest AWS API Documentation
|
330
359
|
#
|
331
360
|
class InvokeAgentRequest < Struct.new(
|
332
|
-
:session_state,
|
333
|
-
:agent_id,
|
334
361
|
:agent_alias_id,
|
335
|
-
:
|
336
|
-
:end_session,
|
362
|
+
:agent_id,
|
337
363
|
:enable_trace,
|
338
|
-
:
|
364
|
+
:end_session,
|
365
|
+
:input_text,
|
366
|
+
:session_id,
|
367
|
+
:session_state)
|
339
368
|
SENSITIVE = [:input_text]
|
340
369
|
include Aws::Structure
|
341
370
|
end
|
342
371
|
|
343
|
-
# InvokeAgent Response
|
344
|
-
#
|
345
372
|
# @!attribute [rw] completion
|
346
|
-
#
|
347
|
-
# Content-Type response header.
|
373
|
+
# The agent's response to the user prompt.
|
348
374
|
# @return [Types::ResponseStream]
|
349
375
|
#
|
350
376
|
# @!attribute [rw] content_type
|
351
|
-
#
|
377
|
+
# The MIME type of the input data in the request. The default value is
|
378
|
+
# `application/json`.
|
352
379
|
# @return [String]
|
353
380
|
#
|
354
381
|
# @!attribute [rw] session_id
|
355
|
-
#
|
382
|
+
# The unique identifier of the session with the agent.
|
356
383
|
# @return [String]
|
357
384
|
#
|
358
385
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvokeAgentResponse AWS API Documentation
|
@@ -365,29 +392,31 @@ module Aws::BedrockAgentRuntime
|
|
365
392
|
include Aws::Structure
|
366
393
|
end
|
367
394
|
|
368
|
-
#
|
395
|
+
# Contains details about the knowledge base to look up and the query to
|
396
|
+
# be made.
|
369
397
|
#
|
370
|
-
# @!attribute [rw]
|
371
|
-
#
|
398
|
+
# @!attribute [rw] knowledge_base_id
|
399
|
+
# The unique identifier of the knowledge base to look up.
|
372
400
|
# @return [String]
|
373
401
|
#
|
374
|
-
# @!attribute [rw]
|
375
|
-
#
|
402
|
+
# @!attribute [rw] text
|
403
|
+
# The query made to the knowledge base.
|
376
404
|
# @return [String]
|
377
405
|
#
|
378
406
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseLookupInput AWS API Documentation
|
379
407
|
#
|
380
408
|
class KnowledgeBaseLookupInput < Struct.new(
|
381
|
-
:
|
382
|
-
:
|
383
|
-
SENSITIVE = [:
|
409
|
+
:knowledge_base_id,
|
410
|
+
:text)
|
411
|
+
SENSITIVE = [:knowledge_base_id, :text]
|
384
412
|
include Aws::Structure
|
385
413
|
end
|
386
414
|
|
387
|
-
#
|
415
|
+
# Contains details about the results from looking up the knowledge base.
|
388
416
|
#
|
389
417
|
# @!attribute [rw] retrieved_references
|
390
|
-
#
|
418
|
+
# Contains metadata about the sources cited for the generated
|
419
|
+
# response.
|
391
420
|
# @return [Array<Types::RetrievedReference>]
|
392
421
|
#
|
393
422
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseLookupOutput AWS API Documentation
|
@@ -398,10 +427,10 @@ module Aws::BedrockAgentRuntime
|
|
398
427
|
include Aws::Structure
|
399
428
|
end
|
400
429
|
|
401
|
-
#
|
430
|
+
# Contains the query made to the knowledge base.
|
402
431
|
#
|
403
432
|
# @!attribute [rw] text
|
404
|
-
#
|
433
|
+
# The text of the query made to the knowledge base.
|
405
434
|
# @return [String]
|
406
435
|
#
|
407
436
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseQuery AWS API Documentation
|
@@ -412,10 +441,22 @@ module Aws::BedrockAgentRuntime
|
|
412
441
|
include Aws::Structure
|
413
442
|
end
|
414
443
|
|
415
|
-
#
|
444
|
+
# Contains details about how the results should be returned.
|
445
|
+
#
|
446
|
+
# This data type is used in the following API operations:
|
447
|
+
#
|
448
|
+
# * [Retrieve request body][1]
|
449
|
+
#
|
450
|
+
# * [RetrieveAndGenerate request body][2]
|
451
|
+
#
|
452
|
+
#
|
453
|
+
#
|
454
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax
|
455
|
+
# [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax
|
416
456
|
#
|
417
457
|
# @!attribute [rw] vector_search_configuration
|
418
|
-
#
|
458
|
+
# Contains details about how the results from the vector search should
|
459
|
+
# be returned.
|
419
460
|
# @return [Types::KnowledgeBaseVectorSearchConfiguration]
|
420
461
|
#
|
421
462
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseRetrievalConfiguration AWS API Documentation
|
@@ -426,18 +467,18 @@ module Aws::BedrockAgentRuntime
|
|
426
467
|
include Aws::Structure
|
427
468
|
end
|
428
469
|
|
429
|
-
#
|
470
|
+
# Details about a result from querying the knowledge base.
|
430
471
|
#
|
431
472
|
# @!attribute [rw] content
|
432
|
-
#
|
473
|
+
# Contains a chunk of text from a data source in the knowledge base.
|
433
474
|
# @return [Types::RetrievalResultContent]
|
434
475
|
#
|
435
476
|
# @!attribute [rw] location
|
436
|
-
#
|
477
|
+
# Contains information about the location of the data source.
|
437
478
|
# @return [Types::RetrievalResultLocation]
|
438
479
|
#
|
439
480
|
# @!attribute [rw] score
|
440
|
-
# The relevance
|
481
|
+
# The level of relevance of the result to the query.
|
441
482
|
# @return [Float]
|
442
483
|
#
|
443
484
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseRetrievalResult AWS API Documentation
|
@@ -446,181 +487,272 @@ module Aws::BedrockAgentRuntime
|
|
446
487
|
:content,
|
447
488
|
:location,
|
448
489
|
:score)
|
449
|
-
SENSITIVE = []
|
490
|
+
SENSITIVE = [:content, :location]
|
450
491
|
include Aws::Structure
|
451
492
|
end
|
452
493
|
|
453
|
-
#
|
494
|
+
# Contains details about the resource being queried.
|
454
495
|
#
|
455
496
|
# @!attribute [rw] knowledge_base_id
|
456
|
-
#
|
497
|
+
# The unique identifier of the knowledge base that is queried and the
|
498
|
+
# foundation model used for generation.
|
457
499
|
# @return [String]
|
458
500
|
#
|
459
501
|
# @!attribute [rw] model_arn
|
460
|
-
#
|
502
|
+
# The ARN of the foundation model used to generate a response.
|
461
503
|
# @return [String]
|
462
504
|
#
|
505
|
+
# @!attribute [rw] retrieval_configuration
|
506
|
+
# Contains configurations for how to retrieve and return the knowledge
|
507
|
+
# base query.
|
508
|
+
# @return [Types::KnowledgeBaseRetrievalConfiguration]
|
509
|
+
#
|
463
510
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseRetrieveAndGenerateConfiguration AWS API Documentation
|
464
511
|
#
|
465
512
|
class KnowledgeBaseRetrieveAndGenerateConfiguration < Struct.new(
|
466
513
|
:knowledge_base_id,
|
467
|
-
:model_arn
|
514
|
+
:model_arn,
|
515
|
+
:retrieval_configuration)
|
468
516
|
SENSITIVE = []
|
469
517
|
include Aws::Structure
|
470
518
|
end
|
471
519
|
|
472
|
-
#
|
520
|
+
# Configurations for how to carry out the search.
|
473
521
|
#
|
474
522
|
# @!attribute [rw] number_of_results
|
475
|
-
#
|
523
|
+
# The number of results to return.
|
524
|
+
#
|
525
|
+
# <note markdown="1"> The `numberOfResults` field is currently unsupported for
|
526
|
+
# `RetrieveAndGenerate`. Don't include it in this field if you are
|
527
|
+
# sending a `RetrieveAndGenerate` request.
|
528
|
+
#
|
529
|
+
# </note>
|
476
530
|
# @return [Integer]
|
477
531
|
#
|
532
|
+
# @!attribute [rw] override_search_type
|
533
|
+
# By default, Amazon Bedrock decides a search strategy for you. If
|
534
|
+
# you're using an Amazon OpenSearch Serverless vector store that
|
535
|
+
# contains a filterable text field, you can specify whether to query
|
536
|
+
# the knowledge base with a `HYBRID` search using both vector
|
537
|
+
# embeddings and raw text, or `SEMANTIC` search using only vector
|
538
|
+
# embeddings. For other vector store configurations, only `SEMANTIC`
|
539
|
+
# search is available. For more information, see [Test a knowledge
|
540
|
+
# base][1].
|
541
|
+
#
|
542
|
+
#
|
543
|
+
#
|
544
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-test.html
|
545
|
+
# @return [String]
|
546
|
+
#
|
478
547
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseVectorSearchConfiguration AWS API Documentation
|
479
548
|
#
|
480
549
|
class KnowledgeBaseVectorSearchConfiguration < Struct.new(
|
481
|
-
:number_of_results
|
550
|
+
:number_of_results,
|
551
|
+
:override_search_type)
|
482
552
|
SENSITIVE = []
|
483
553
|
include Aws::Structure
|
484
554
|
end
|
485
555
|
|
486
|
-
#
|
556
|
+
# The input for the pre-processing step.
|
487
557
|
#
|
488
|
-
#
|
489
|
-
# Identifier for trace
|
490
|
-
# @return [String]
|
558
|
+
# * The `type` matches the agent step.
|
491
559
|
#
|
492
|
-
#
|
493
|
-
# Prompt Message
|
494
|
-
# @return [String]
|
560
|
+
# * The `text` contains the prompt.
|
495
561
|
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
562
|
+
# * The `inferenceConfiguration`, `parserMode`, and `overrideLambda`
|
563
|
+
# values are set in the [PromptOverrideConfiguration][1] object that
|
564
|
+
# was set when the agent was created or updated.
|
565
|
+
#
|
566
|
+
#
|
567
|
+
#
|
568
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html
|
499
569
|
#
|
500
570
|
# @!attribute [rw] inference_configuration
|
501
|
-
#
|
502
|
-
#
|
571
|
+
# Specifications about the inference parameters that were provided
|
572
|
+
# alongside the prompt. These are specified in the
|
573
|
+
# [PromptOverrideConfiguration][1] object that was set when the agent
|
574
|
+
# was created or updated. For more information, see [Inference
|
575
|
+
# parameters for foundation models][2].
|
576
|
+
#
|
577
|
+
#
|
578
|
+
#
|
579
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html
|
580
|
+
# [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html
|
503
581
|
# @return [Types::InferenceConfiguration]
|
504
582
|
#
|
505
583
|
# @!attribute [rw] override_lambda
|
506
|
-
# ARN of
|
584
|
+
# The ARN of the Lambda function to use when parsing the raw
|
585
|
+
# foundation model output in parts of the agent sequence.
|
586
|
+
# @return [String]
|
587
|
+
#
|
588
|
+
# @!attribute [rw] parser_mode
|
589
|
+
# Specifies whether to override the default parser Lambda function
|
590
|
+
# when parsing the raw foundation model output in the part of the
|
591
|
+
# agent sequence defined by the `promptType`.
|
507
592
|
# @return [String]
|
508
593
|
#
|
509
594
|
# @!attribute [rw] prompt_creation_mode
|
510
|
-
#
|
595
|
+
# Specifies whether the default prompt template was `OVERRIDDEN`. If
|
596
|
+
# it was, the `basePromptTemplate` that was set in the
|
597
|
+
# [PromptOverrideConfiguration][1] object when the agent was created
|
598
|
+
# or updated is used instead.
|
599
|
+
#
|
600
|
+
#
|
601
|
+
#
|
602
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html
|
511
603
|
# @return [String]
|
512
604
|
#
|
513
|
-
# @!attribute [rw]
|
514
|
-
#
|
605
|
+
# @!attribute [rw] text
|
606
|
+
# The text that prompted the agent at this step.
|
607
|
+
# @return [String]
|
608
|
+
#
|
609
|
+
# @!attribute [rw] trace_id
|
610
|
+
# The unique identifier of the trace.
|
611
|
+
# @return [String]
|
612
|
+
#
|
613
|
+
# @!attribute [rw] type
|
614
|
+
# The step in the agent sequence.
|
515
615
|
# @return [String]
|
516
616
|
#
|
517
617
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ModelInvocationInput AWS API Documentation
|
518
618
|
#
|
519
619
|
class ModelInvocationInput < Struct.new(
|
520
|
-
:trace_id,
|
521
|
-
:text,
|
522
|
-
:type,
|
523
620
|
:inference_configuration,
|
524
621
|
:override_lambda,
|
622
|
+
:parser_mode,
|
525
623
|
:prompt_creation_mode,
|
526
|
-
:
|
624
|
+
:text,
|
625
|
+
:trace_id,
|
626
|
+
:type)
|
527
627
|
SENSITIVE = [:text]
|
528
628
|
include Aws::Structure
|
529
629
|
end
|
530
630
|
|
531
|
-
#
|
532
|
-
#
|
533
|
-
#
|
534
|
-
# @!attribute [rw] trace_id
|
535
|
-
# Identifier for trace
|
536
|
-
# @return [String]
|
537
|
-
#
|
538
|
-
# @!attribute [rw] type
|
539
|
-
# types of observations
|
540
|
-
# @return [String]
|
631
|
+
# Contains the result or output of an action group or knowledge base, or
|
632
|
+
# the response to the user.
|
541
633
|
#
|
542
634
|
# @!attribute [rw] action_group_invocation_output
|
543
|
-
#
|
635
|
+
# Contains the JSON-formatted string returned by the API invoked by
|
636
|
+
# the action group.
|
544
637
|
# @return [Types::ActionGroupInvocationOutput]
|
545
638
|
#
|
546
|
-
# @!attribute [rw] knowledge_base_lookup_output
|
547
|
-
# Input to lambda used in action group
|
548
|
-
# @return [Types::KnowledgeBaseLookupOutput]
|
549
|
-
#
|
550
639
|
# @!attribute [rw] final_response
|
551
|
-
#
|
640
|
+
# Contains details about the response to the user.
|
552
641
|
# @return [Types::FinalResponse]
|
553
642
|
#
|
643
|
+
# @!attribute [rw] knowledge_base_lookup_output
|
644
|
+
# Contains details about the results from looking up the knowledge
|
645
|
+
# base.
|
646
|
+
# @return [Types::KnowledgeBaseLookupOutput]
|
647
|
+
#
|
554
648
|
# @!attribute [rw] reprompt_response
|
555
|
-
#
|
649
|
+
# Contains details about the response to reprompt the input.
|
556
650
|
# @return [Types::RepromptResponse]
|
557
651
|
#
|
652
|
+
# @!attribute [rw] trace_id
|
653
|
+
# The unique identifier of the trace.
|
654
|
+
# @return [String]
|
655
|
+
#
|
656
|
+
# @!attribute [rw] type
|
657
|
+
# Specifies what kind of information the agent returns in the
|
658
|
+
# observation. The following values are possible.
|
659
|
+
#
|
660
|
+
# * `ACTION_GROUP` – The agent returns the result of an action group.
|
661
|
+
#
|
662
|
+
# * `KNOWLEDGE_BASE` – The agent returns information from a knowledge
|
663
|
+
# base.
|
664
|
+
#
|
665
|
+
# * `FINISH` – The agent returns a final response to the user with no
|
666
|
+
# follow-up.
|
667
|
+
#
|
668
|
+
# * `ASK_USER` – The agent asks the user a question.
|
669
|
+
#
|
670
|
+
# * `REPROMPT` – The agent prompts the user again for the same
|
671
|
+
# information.
|
672
|
+
# @return [String]
|
673
|
+
#
|
558
674
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/Observation AWS API Documentation
|
559
675
|
#
|
560
676
|
class Observation < Struct.new(
|
561
|
-
:trace_id,
|
562
|
-
:type,
|
563
677
|
:action_group_invocation_output,
|
564
|
-
:knowledge_base_lookup_output,
|
565
678
|
:final_response,
|
566
|
-
:
|
679
|
+
:knowledge_base_lookup_output,
|
680
|
+
:reprompt_response,
|
681
|
+
:trace_id,
|
682
|
+
:type)
|
567
683
|
SENSITIVE = [:reprompt_response]
|
568
684
|
include Aws::Structure
|
569
685
|
end
|
570
686
|
|
571
|
-
#
|
687
|
+
# Details about the orchestration step, in which the agent determines
|
688
|
+
# the order in which actions are executed and which knowledge bases are
|
689
|
+
# retrieved.
|
572
690
|
#
|
573
691
|
# @note OrchestrationTrace is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of OrchestrationTrace corresponding to the set member.
|
574
692
|
#
|
575
|
-
# @!attribute [rw] rationale
|
576
|
-
# Trace Part which contains information related to reasoning
|
577
|
-
# @return [Types::Rationale]
|
578
|
-
#
|
579
693
|
# @!attribute [rw] invocation_input
|
580
|
-
#
|
581
|
-
#
|
694
|
+
# Contains information pertaining to the action group or knowledge
|
695
|
+
# base that is being invoked.
|
582
696
|
# @return [Types::InvocationInput]
|
583
697
|
#
|
698
|
+
# @!attribute [rw] model_invocation_input
|
699
|
+
# The input for the orchestration step.
|
700
|
+
#
|
701
|
+
# * The `type` is `ORCHESTRATION`.
|
702
|
+
#
|
703
|
+
# * The `text` contains the prompt.
|
704
|
+
#
|
705
|
+
# * The `inferenceConfiguration`, `parserMode`, and `overrideLambda`
|
706
|
+
# values are set in the [PromptOverrideConfiguration][1] object that
|
707
|
+
# was set when the agent was created or updated.
|
708
|
+
#
|
709
|
+
#
|
710
|
+
#
|
711
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html
|
712
|
+
# @return [Types::ModelInvocationInput]
|
713
|
+
#
|
584
714
|
# @!attribute [rw] observation
|
585
|
-
#
|
586
|
-
# knowledge base
|
715
|
+
# Details about the observation (the output of the action group Lambda
|
716
|
+
# or knowledge base) made by the agent.
|
587
717
|
# @return [Types::Observation]
|
588
718
|
#
|
589
|
-
# @!attribute [rw]
|
590
|
-
#
|
591
|
-
#
|
719
|
+
# @!attribute [rw] rationale
|
720
|
+
# Details about the reasoning, based on the input, that the agent uses
|
721
|
+
# to justify carrying out an action group or getting information from
|
722
|
+
# a knowledge base.
|
723
|
+
# @return [Types::Rationale]
|
592
724
|
#
|
593
725
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/OrchestrationTrace AWS API Documentation
|
594
726
|
#
|
595
727
|
class OrchestrationTrace < Struct.new(
|
596
|
-
:rationale,
|
597
728
|
:invocation_input,
|
598
|
-
:observation,
|
599
729
|
:model_invocation_input,
|
730
|
+
:observation,
|
731
|
+
:rationale,
|
600
732
|
:unknown)
|
601
|
-
SENSITIVE = [:
|
733
|
+
SENSITIVE = [:invocation_input, :model_invocation_input, :observation, :rationale]
|
602
734
|
include Aws::Structure
|
603
735
|
include Aws::Structure::Union
|
604
736
|
|
605
|
-
class Rationale < OrchestrationTrace; end
|
606
737
|
class InvocationInput < OrchestrationTrace; end
|
607
|
-
class Observation < OrchestrationTrace; end
|
608
738
|
class ModelInvocationInput < OrchestrationTrace; end
|
739
|
+
class Observation < OrchestrationTrace; end
|
740
|
+
class Rationale < OrchestrationTrace; end
|
609
741
|
class Unknown < OrchestrationTrace; end
|
610
742
|
end
|
611
743
|
|
612
|
-
#
|
744
|
+
# A parameter in the Lambda input event.
|
613
745
|
#
|
614
746
|
# @!attribute [rw] name
|
615
|
-
#
|
747
|
+
# The name of the parameter.
|
616
748
|
# @return [String]
|
617
749
|
#
|
618
750
|
# @!attribute [rw] type
|
619
|
-
#
|
751
|
+
# The type of the parameter.
|
620
752
|
# @return [String]
|
621
753
|
#
|
622
754
|
# @!attribute [rw] value
|
623
|
-
#
|
755
|
+
# The value of the parameter.
|
624
756
|
# @return [String]
|
625
757
|
#
|
626
758
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/Parameter AWS API Documentation
|
@@ -633,50 +765,51 @@ module Aws::BedrockAgentRuntime
|
|
633
765
|
include Aws::Structure
|
634
766
|
end
|
635
767
|
|
636
|
-
#
|
637
|
-
#
|
638
|
-
# @!attribute [rw] bytes
|
639
|
-
# PartBody of the payload in bytes
|
640
|
-
# @return [String]
|
768
|
+
# Contains a part of an agent response and citations for it.
|
641
769
|
#
|
642
770
|
# @!attribute [rw] attribution
|
643
|
-
#
|
771
|
+
# Contains citations for a part of an agent response.
|
644
772
|
# @return [Types::Attribution]
|
645
773
|
#
|
774
|
+
# @!attribute [rw] bytes
|
775
|
+
# A part of the agent response in bytes.
|
776
|
+
# @return [String]
|
777
|
+
#
|
646
778
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PayloadPart AWS API Documentation
|
647
779
|
#
|
648
780
|
class PayloadPart < Struct.new(
|
649
|
-
:bytes,
|
650
781
|
:attribution,
|
782
|
+
:bytes,
|
651
783
|
:event_type)
|
652
784
|
SENSITIVE = [:bytes]
|
653
785
|
include Aws::Structure
|
654
786
|
end
|
655
787
|
|
656
|
-
#
|
657
|
-
#
|
658
|
-
# @!attribute [rw] trace_id
|
659
|
-
# Identifier for trace
|
660
|
-
# @return [String]
|
788
|
+
# The foundation model output from the post-processing step.
|
661
789
|
#
|
662
790
|
# @!attribute [rw] parsed_response
|
663
|
-
#
|
664
|
-
#
|
791
|
+
# Details about the response from the Lambda parsing of the output of
|
792
|
+
# the post-processing step.
|
665
793
|
# @return [Types::PostProcessingParsedResponse]
|
666
794
|
#
|
795
|
+
# @!attribute [rw] trace_id
|
796
|
+
# The unique identifier of the trace.
|
797
|
+
# @return [String]
|
798
|
+
#
|
667
799
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PostProcessingModelInvocationOutput AWS API Documentation
|
668
800
|
#
|
669
801
|
class PostProcessingModelInvocationOutput < Struct.new(
|
670
|
-
:
|
671
|
-
:
|
802
|
+
:parsed_response,
|
803
|
+
:trace_id)
|
672
804
|
SENSITIVE = [:parsed_response]
|
673
805
|
include Aws::Structure
|
674
806
|
end
|
675
807
|
|
676
|
-
#
|
808
|
+
# Details about the response from the Lambda parsing of the output from
|
809
|
+
# the post-processing step.
|
677
810
|
#
|
678
811
|
# @!attribute [rw] text
|
679
|
-
#
|
812
|
+
# The text returned by the parser.
|
680
813
|
# @return [String]
|
681
814
|
#
|
682
815
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PostProcessingParsedResponse AWS API Documentation
|
@@ -687,16 +820,29 @@ module Aws::BedrockAgentRuntime
|
|
687
820
|
include Aws::Structure
|
688
821
|
end
|
689
822
|
|
690
|
-
#
|
823
|
+
# Details about the post-processing step, in which the agent shapes the
|
824
|
+
# response.
|
691
825
|
#
|
692
826
|
# @note PostProcessingTrace is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of PostProcessingTrace corresponding to the set member.
|
693
827
|
#
|
694
828
|
# @!attribute [rw] model_invocation_input
|
695
|
-
#
|
829
|
+
# The input for the post-processing step.
|
830
|
+
#
|
831
|
+
# * The `type` is `POST_PROCESSING`.
|
832
|
+
#
|
833
|
+
# * The `text` contains the prompt.
|
834
|
+
#
|
835
|
+
# * The `inferenceConfiguration`, `parserMode`, and `overrideLambda`
|
836
|
+
# values are set in the [PromptOverrideConfiguration][1] object that
|
837
|
+
# was set when the agent was created or updated.
|
838
|
+
#
|
839
|
+
#
|
840
|
+
#
|
841
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html
|
696
842
|
# @return [Types::ModelInvocationInput]
|
697
843
|
#
|
698
844
|
# @!attribute [rw] model_invocation_output
|
699
|
-
#
|
845
|
+
# The foundation model output from the post-processing step.
|
700
846
|
# @return [Types::PostProcessingModelInvocationOutput]
|
701
847
|
#
|
702
848
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PostProcessingTrace AWS API Documentation
|
@@ -714,55 +860,72 @@ module Aws::BedrockAgentRuntime
|
|
714
860
|
class Unknown < PostProcessingTrace; end
|
715
861
|
end
|
716
862
|
|
717
|
-
#
|
718
|
-
#
|
719
|
-
# @!attribute [rw] trace_id
|
720
|
-
# Identifier for trace
|
721
|
-
# @return [String]
|
863
|
+
# The foundation model output from the pre-processing step.
|
722
864
|
#
|
723
865
|
# @!attribute [rw] parsed_response
|
724
|
-
#
|
725
|
-
#
|
866
|
+
# Details about the response from the Lambda parsing of the output of
|
867
|
+
# the pre-processing step.
|
726
868
|
# @return [Types::PreProcessingParsedResponse]
|
727
869
|
#
|
870
|
+
# @!attribute [rw] trace_id
|
871
|
+
# The unique identifier of the trace.
|
872
|
+
# @return [String]
|
873
|
+
#
|
728
874
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PreProcessingModelInvocationOutput AWS API Documentation
|
729
875
|
#
|
730
876
|
class PreProcessingModelInvocationOutput < Struct.new(
|
731
|
-
:
|
732
|
-
:
|
877
|
+
:parsed_response,
|
878
|
+
:trace_id)
|
733
879
|
SENSITIVE = [:parsed_response]
|
734
880
|
include Aws::Structure
|
735
881
|
end
|
736
882
|
|
737
|
-
#
|
738
|
-
#
|
739
|
-
# @!attribute [rw] rationale
|
740
|
-
# Agent Trace Rationale String
|
741
|
-
# @return [String]
|
883
|
+
# Details about the response from the Lambda parsing of the output from
|
884
|
+
# the pre-processing step.
|
742
885
|
#
|
743
886
|
# @!attribute [rw] is_valid
|
744
|
-
#
|
887
|
+
# Whether the user input is valid or not. If `false`, the agent
|
888
|
+
# doesn't proceed to orchestration.
|
745
889
|
# @return [Boolean]
|
746
890
|
#
|
891
|
+
# @!attribute [rw] rationale
|
892
|
+
# The text returned by the parsing of the pre-processing step,
|
893
|
+
# explaining the steps that the agent plans to take in orchestration,
|
894
|
+
# if the user input is valid.
|
895
|
+
# @return [String]
|
896
|
+
#
|
747
897
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PreProcessingParsedResponse AWS API Documentation
|
748
898
|
#
|
749
899
|
class PreProcessingParsedResponse < Struct.new(
|
750
|
-
:
|
751
|
-
:
|
900
|
+
:is_valid,
|
901
|
+
:rationale)
|
752
902
|
SENSITIVE = [:rationale]
|
753
903
|
include Aws::Structure
|
754
904
|
end
|
755
905
|
|
756
|
-
#
|
906
|
+
# Details about the pre-processing step, in which the agent
|
907
|
+
# contextualizes and categorizes user inputs.
|
757
908
|
#
|
758
909
|
# @note PreProcessingTrace is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of PreProcessingTrace corresponding to the set member.
|
759
910
|
#
|
760
911
|
# @!attribute [rw] model_invocation_input
|
761
|
-
#
|
912
|
+
# The input for the pre-processing step.
|
913
|
+
#
|
914
|
+
# * The `type` is `PRE_PROCESSING`.
|
915
|
+
#
|
916
|
+
# * The `text` contains the prompt.
|
917
|
+
#
|
918
|
+
# * The `inferenceConfiguration`, `parserMode`, and `overrideLambda`
|
919
|
+
# values are set in the [PromptOverrideConfiguration][1] object that
|
920
|
+
# was set when the agent was created or updated.
|
921
|
+
#
|
922
|
+
#
|
923
|
+
#
|
924
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html
|
762
925
|
# @return [Types::ModelInvocationInput]
|
763
926
|
#
|
764
927
|
# @!attribute [rw] model_invocation_output
|
765
|
-
#
|
928
|
+
# The foundation model output from the pre-processing step.
|
766
929
|
# @return [Types::PreProcessingModelInvocationOutput]
|
767
930
|
#
|
768
931
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PreProcessingTrace AWS API Documentation
|
@@ -780,48 +943,50 @@ module Aws::BedrockAgentRuntime
|
|
780
943
|
class Unknown < PreProcessingTrace; end
|
781
944
|
end
|
782
945
|
|
783
|
-
#
|
946
|
+
# Contains the reasoning, based on the input, that the agent uses to
|
947
|
+
# justify carrying out an action group or getting information from a
|
948
|
+
# knowledge base.
|
784
949
|
#
|
785
|
-
# @!attribute [rw]
|
786
|
-
#
|
950
|
+
# @!attribute [rw] text
|
951
|
+
# The reasoning or thought process of the agent, based on the input.
|
787
952
|
# @return [String]
|
788
953
|
#
|
789
|
-
# @!attribute [rw]
|
790
|
-
#
|
954
|
+
# @!attribute [rw] trace_id
|
955
|
+
# The unique identifier of the trace step.
|
791
956
|
# @return [String]
|
792
957
|
#
|
793
958
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/Rationale AWS API Documentation
|
794
959
|
#
|
795
960
|
class Rationale < Struct.new(
|
796
|
-
:
|
797
|
-
:
|
961
|
+
:text,
|
962
|
+
:trace_id)
|
798
963
|
SENSITIVE = [:text]
|
799
964
|
include Aws::Structure
|
800
965
|
end
|
801
966
|
|
802
|
-
#
|
967
|
+
# Contains details about the agent's response to reprompt the input.
|
803
968
|
#
|
804
|
-
# @!attribute [rw]
|
805
|
-
#
|
969
|
+
# @!attribute [rw] source
|
970
|
+
# Specifies what output is prompting the agent to reprompt the input.
|
806
971
|
# @return [String]
|
807
972
|
#
|
808
|
-
# @!attribute [rw]
|
809
|
-
#
|
973
|
+
# @!attribute [rw] text
|
974
|
+
# The text reprompting the input.
|
810
975
|
# @return [String]
|
811
976
|
#
|
812
977
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RepromptResponse AWS API Documentation
|
813
978
|
#
|
814
979
|
class RepromptResponse < Struct.new(
|
815
|
-
:
|
816
|
-
:
|
980
|
+
:source,
|
981
|
+
:text)
|
817
982
|
SENSITIVE = [:source]
|
818
983
|
include Aws::Structure
|
819
984
|
end
|
820
985
|
|
821
|
-
#
|
986
|
+
# The parameters in the request body for the Lambda input event.
|
822
987
|
#
|
823
988
|
# @!attribute [rw] content
|
824
|
-
#
|
989
|
+
# The content in the request body.
|
825
990
|
# @return [Hash<String,Array<Types::Parameter>>]
|
826
991
|
#
|
827
992
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RequestBody AWS API Documentation
|
@@ -832,11 +997,10 @@ module Aws::BedrockAgentRuntime
|
|
832
997
|
include Aws::Structure
|
833
998
|
end
|
834
999
|
|
835
|
-
#
|
836
|
-
#
|
1000
|
+
# The specified resource ARN was not found. Check the ARN and try your
|
1001
|
+
# request again.
|
837
1002
|
#
|
838
1003
|
# @!attribute [rw] message
|
839
|
-
# Non Blank String
|
840
1004
|
# @return [String]
|
841
1005
|
#
|
842
1006
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ResourceNotFoundException AWS API Documentation
|
@@ -848,10 +1012,10 @@ module Aws::BedrockAgentRuntime
|
|
848
1012
|
include Aws::Structure
|
849
1013
|
end
|
850
1014
|
|
851
|
-
#
|
1015
|
+
# Contains the cited text from the data source.
|
852
1016
|
#
|
853
1017
|
# @!attribute [rw] text
|
854
|
-
#
|
1018
|
+
# The cited text from the data source.
|
855
1019
|
# @return [String]
|
856
1020
|
#
|
857
1021
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrievalResultContent AWS API Documentation
|
@@ -862,29 +1026,29 @@ module Aws::BedrockAgentRuntime
|
|
862
1026
|
include Aws::Structure
|
863
1027
|
end
|
864
1028
|
|
865
|
-
#
|
866
|
-
#
|
867
|
-
# @!attribute [rw] type
|
868
|
-
# The location type of a retrieval result.
|
869
|
-
# @return [String]
|
1029
|
+
# Contains information about the location of the data source.
|
870
1030
|
#
|
871
1031
|
# @!attribute [rw] s3_location
|
872
|
-
#
|
1032
|
+
# Contains the S3 location of the data source.
|
873
1033
|
# @return [Types::RetrievalResultS3Location]
|
874
1034
|
#
|
1035
|
+
# @!attribute [rw] type
|
1036
|
+
# The type of the location of the data source.
|
1037
|
+
# @return [String]
|
1038
|
+
#
|
875
1039
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrievalResultLocation AWS API Documentation
|
876
1040
|
#
|
877
1041
|
class RetrievalResultLocation < Struct.new(
|
878
|
-
:
|
879
|
-
:
|
1042
|
+
:s3_location,
|
1043
|
+
:type)
|
880
1044
|
SENSITIVE = []
|
881
1045
|
include Aws::Structure
|
882
1046
|
end
|
883
1047
|
|
884
|
-
#
|
1048
|
+
# Contains the S3 location of the data source.
|
885
1049
|
#
|
886
1050
|
# @!attribute [rw] uri
|
887
|
-
# URI of
|
1051
|
+
# The S3 URI of the data source.
|
888
1052
|
# @return [String]
|
889
1053
|
#
|
890
1054
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrievalResultS3Location AWS API Documentation
|
@@ -895,29 +1059,29 @@ module Aws::BedrockAgentRuntime
|
|
895
1059
|
include Aws::Structure
|
896
1060
|
end
|
897
1061
|
|
898
|
-
#
|
899
|
-
#
|
900
|
-
# @!attribute [rw] type
|
901
|
-
# The type of RetrieveAndGenerate.
|
902
|
-
# @return [String]
|
1062
|
+
# Contains details about the resource being queried.
|
903
1063
|
#
|
904
1064
|
# @!attribute [rw] knowledge_base_configuration
|
905
|
-
#
|
1065
|
+
# Contains details about the resource being queried.
|
906
1066
|
# @return [Types::KnowledgeBaseRetrieveAndGenerateConfiguration]
|
907
1067
|
#
|
1068
|
+
# @!attribute [rw] type
|
1069
|
+
# The type of resource that is queried by the request.
|
1070
|
+
# @return [String]
|
1071
|
+
#
|
908
1072
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveAndGenerateConfiguration AWS API Documentation
|
909
1073
|
#
|
910
1074
|
class RetrieveAndGenerateConfiguration < Struct.new(
|
911
|
-
:
|
912
|
-
:
|
1075
|
+
:knowledge_base_configuration,
|
1076
|
+
:type)
|
913
1077
|
SENSITIVE = []
|
914
1078
|
include Aws::Structure
|
915
1079
|
end
|
916
1080
|
|
917
|
-
#
|
1081
|
+
# Contains the query made to the knowledge base.
|
918
1082
|
#
|
919
1083
|
# @!attribute [rw] text
|
920
|
-
#
|
1084
|
+
# The query made to the knowledge base.
|
921
1085
|
# @return [String]
|
922
1086
|
#
|
923
1087
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveAndGenerateInput AWS API Documentation
|
@@ -928,10 +1092,10 @@ module Aws::BedrockAgentRuntime
|
|
928
1092
|
include Aws::Structure
|
929
1093
|
end
|
930
1094
|
|
931
|
-
#
|
1095
|
+
# Contains the response generated from querying the knowledge base.
|
932
1096
|
#
|
933
1097
|
# @!attribute [rw] text
|
934
|
-
#
|
1098
|
+
# The response generated from querying the knowledge base.
|
935
1099
|
# @return [String]
|
936
1100
|
#
|
937
1101
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveAndGenerateOutput AWS API Documentation
|
@@ -942,59 +1106,64 @@ module Aws::BedrockAgentRuntime
|
|
942
1106
|
include Aws::Structure
|
943
1107
|
end
|
944
1108
|
|
945
|
-
# @!attribute [rw] session_id
|
946
|
-
# Identifier of the session.
|
947
|
-
# @return [String]
|
948
|
-
#
|
949
1109
|
# @!attribute [rw] input
|
950
|
-
#
|
1110
|
+
# Contains the query made to the knowledge base.
|
951
1111
|
# @return [Types::RetrieveAndGenerateInput]
|
952
1112
|
#
|
953
1113
|
# @!attribute [rw] retrieve_and_generate_configuration
|
954
|
-
#
|
1114
|
+
# Contains details about the resource being queried and the foundation
|
1115
|
+
# model used for generation.
|
955
1116
|
# @return [Types::RetrieveAndGenerateConfiguration]
|
956
1117
|
#
|
957
1118
|
# @!attribute [rw] session_configuration
|
958
|
-
#
|
1119
|
+
# Contains details about the session with the knowledge base.
|
959
1120
|
# @return [Types::RetrieveAndGenerateSessionConfiguration]
|
960
1121
|
#
|
1122
|
+
# @!attribute [rw] session_id
|
1123
|
+
# The unique identifier of the session. Reuse the same value to
|
1124
|
+
# continue the same session with the knowledge base.
|
1125
|
+
# @return [String]
|
1126
|
+
#
|
961
1127
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveAndGenerateRequest AWS API Documentation
|
962
1128
|
#
|
963
1129
|
class RetrieveAndGenerateRequest < Struct.new(
|
964
|
-
:session_id,
|
965
1130
|
:input,
|
966
1131
|
:retrieve_and_generate_configuration,
|
967
|
-
:session_configuration
|
1132
|
+
:session_configuration,
|
1133
|
+
:session_id)
|
968
1134
|
SENSITIVE = [:input]
|
969
1135
|
include Aws::Structure
|
970
1136
|
end
|
971
1137
|
|
972
|
-
# @!attribute [rw]
|
973
|
-
#
|
974
|
-
#
|
1138
|
+
# @!attribute [rw] citations
|
1139
|
+
# A list of segments of the generated response that are based on
|
1140
|
+
# sources in the knowledge base, alongside information about the
|
1141
|
+
# sources.
|
1142
|
+
# @return [Array<Types::Citation>]
|
975
1143
|
#
|
976
1144
|
# @!attribute [rw] output
|
977
|
-
#
|
1145
|
+
# Contains the response generated from querying the knowledge base.
|
978
1146
|
# @return [Types::RetrieveAndGenerateOutput]
|
979
1147
|
#
|
980
|
-
# @!attribute [rw]
|
981
|
-
#
|
982
|
-
#
|
1148
|
+
# @!attribute [rw] session_id
|
1149
|
+
# The unique identifier of the session. Reuse the same value to
|
1150
|
+
# continue the same session with the knowledge base.
|
1151
|
+
# @return [String]
|
983
1152
|
#
|
984
1153
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveAndGenerateResponse AWS API Documentation
|
985
1154
|
#
|
986
1155
|
class RetrieveAndGenerateResponse < Struct.new(
|
987
|
-
:
|
1156
|
+
:citations,
|
988
1157
|
:output,
|
989
|
-
:
|
1158
|
+
:session_id)
|
990
1159
|
SENSITIVE = [:output]
|
991
1160
|
include Aws::Structure
|
992
1161
|
end
|
993
1162
|
|
994
|
-
#
|
1163
|
+
# Contains configuration about the session with the knowledge base.
|
995
1164
|
#
|
996
1165
|
# @!attribute [rw] kms_key_arn
|
997
|
-
# The
|
1166
|
+
# The ARN of the KMS key encrypting the session.
|
998
1167
|
# @return [String]
|
999
1168
|
#
|
1000
1169
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveAndGenerateSessionConfiguration AWS API Documentation
|
@@ -1006,57 +1175,61 @@ module Aws::BedrockAgentRuntime
|
|
1006
1175
|
end
|
1007
1176
|
|
1008
1177
|
# @!attribute [rw] knowledge_base_id
|
1009
|
-
#
|
1178
|
+
# The unique identifier of the knowledge base to query.
|
1010
1179
|
# @return [String]
|
1011
1180
|
#
|
1012
|
-
# @!attribute [rw]
|
1013
|
-
#
|
1014
|
-
#
|
1181
|
+
# @!attribute [rw] next_token
|
1182
|
+
# If there are more results than can fit in the response, the response
|
1183
|
+
# returns a `nextToken`. Use this token in the `nextToken` field of
|
1184
|
+
# another request to retrieve the next batch of results.
|
1185
|
+
# @return [String]
|
1015
1186
|
#
|
1016
1187
|
# @!attribute [rw] retrieval_configuration
|
1017
|
-
#
|
1188
|
+
# Contains details about how the results should be returned.
|
1018
1189
|
# @return [Types::KnowledgeBaseRetrievalConfiguration]
|
1019
1190
|
#
|
1020
|
-
# @!attribute [rw]
|
1021
|
-
#
|
1022
|
-
# @return [
|
1191
|
+
# @!attribute [rw] retrieval_query
|
1192
|
+
# The query to send the knowledge base.
|
1193
|
+
# @return [Types::KnowledgeBaseQuery]
|
1023
1194
|
#
|
1024
1195
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveRequest AWS API Documentation
|
1025
1196
|
#
|
1026
1197
|
class RetrieveRequest < Struct.new(
|
1027
1198
|
:knowledge_base_id,
|
1028
|
-
:
|
1199
|
+
:next_token,
|
1029
1200
|
:retrieval_configuration,
|
1030
|
-
:
|
1201
|
+
:retrieval_query)
|
1031
1202
|
SENSITIVE = [:retrieval_query]
|
1032
1203
|
include Aws::Structure
|
1033
1204
|
end
|
1034
1205
|
|
1035
|
-
# @!attribute [rw] retrieval_results
|
1036
|
-
# List of knowledge base retrieval results
|
1037
|
-
# @return [Array<Types::KnowledgeBaseRetrievalResult>]
|
1038
|
-
#
|
1039
1206
|
# @!attribute [rw] next_token
|
1040
|
-
#
|
1207
|
+
# If there are more results than can fit in the response, the response
|
1208
|
+
# returns a `nextToken`. Use this token in the `nextToken` field of
|
1209
|
+
# another request to retrieve the next batch of results.
|
1041
1210
|
# @return [String]
|
1042
1211
|
#
|
1212
|
+
# @!attribute [rw] retrieval_results
|
1213
|
+
# A list of results from querying the knowledge base.
|
1214
|
+
# @return [Array<Types::KnowledgeBaseRetrievalResult>]
|
1215
|
+
#
|
1043
1216
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveResponse AWS API Documentation
|
1044
1217
|
#
|
1045
1218
|
class RetrieveResponse < Struct.new(
|
1046
|
-
:
|
1047
|
-
:
|
1219
|
+
:next_token,
|
1220
|
+
:retrieval_results)
|
1048
1221
|
SENSITIVE = [:retrieval_results]
|
1049
1222
|
include Aws::Structure
|
1050
1223
|
end
|
1051
1224
|
|
1052
|
-
#
|
1225
|
+
# Contains metadata about a sources cited for the generated response.
|
1053
1226
|
#
|
1054
1227
|
# @!attribute [rw] content
|
1055
|
-
#
|
1228
|
+
# Contains the cited text from the data source.
|
1056
1229
|
# @return [Types::RetrievalResultContent]
|
1057
1230
|
#
|
1058
1231
|
# @!attribute [rw] location
|
1059
|
-
#
|
1232
|
+
# Contains information about the location of the data source.
|
1060
1233
|
# @return [Types::RetrievalResultLocation]
|
1061
1234
|
#
|
1062
1235
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrievedReference AWS API Documentation
|
@@ -1064,15 +1237,14 @@ module Aws::BedrockAgentRuntime
|
|
1064
1237
|
class RetrievedReference < Struct.new(
|
1065
1238
|
:content,
|
1066
1239
|
:location)
|
1067
|
-
SENSITIVE = []
|
1240
|
+
SENSITIVE = [:content, :location]
|
1068
1241
|
include Aws::Structure
|
1069
1242
|
end
|
1070
1243
|
|
1071
|
-
#
|
1072
|
-
#
|
1244
|
+
# The number of requests exceeds the service quota. Resubmit your
|
1245
|
+
# request later.
|
1073
1246
|
#
|
1074
1247
|
# @!attribute [rw] message
|
1075
|
-
# Non Blank String
|
1076
1248
|
# @return [String]
|
1077
1249
|
#
|
1078
1250
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ServiceQuotaExceededException AWS API Documentation
|
@@ -1084,67 +1256,90 @@ module Aws::BedrockAgentRuntime
|
|
1084
1256
|
include Aws::Structure
|
1085
1257
|
end
|
1086
1258
|
|
1087
|
-
#
|
1259
|
+
# Contains parameters that specify various attributes that persist
|
1260
|
+
# across a session or prompt. You can define session state attributes as
|
1261
|
+
# key-value pairs when writing a [Lambda function][1] for an action
|
1262
|
+
# group or pass them when making an [InvokeAgent][2] request. Use
|
1263
|
+
# session state attributes to control and provide conversational context
|
1264
|
+
# for your agent and to help customize your agent's behavior. For more
|
1265
|
+
# information, see [Session context][3].
|
1088
1266
|
#
|
1089
|
-
#
|
1090
|
-
#
|
1091
|
-
#
|
1267
|
+
#
|
1268
|
+
#
|
1269
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-lambda.html
|
1270
|
+
# [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html
|
1271
|
+
# [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/sessionstate.html
|
1092
1272
|
#
|
1093
1273
|
# @!attribute [rw] prompt_session_attributes
|
1094
|
-
#
|
1274
|
+
# Contains attributes that persist across a prompt and the values of
|
1275
|
+
# those attributes. These attributes replace the
|
1276
|
+
# $prompt\_session\_attributes$ placeholder variable in the
|
1277
|
+
# orchestration prompt template. For more information, see [Prompt
|
1278
|
+
# template placeholder variables][1].
|
1279
|
+
#
|
1280
|
+
#
|
1281
|
+
#
|
1282
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html
|
1283
|
+
# @return [Hash<String,String>]
|
1284
|
+
#
|
1285
|
+
# @!attribute [rw] session_attributes
|
1286
|
+
# Contains attributes that persist across a session and the values of
|
1287
|
+
# those attributes.
|
1095
1288
|
# @return [Hash<String,String>]
|
1096
1289
|
#
|
1097
1290
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/SessionState AWS API Documentation
|
1098
1291
|
#
|
1099
1292
|
class SessionState < Struct.new(
|
1100
|
-
:
|
1101
|
-
:
|
1293
|
+
:prompt_session_attributes,
|
1294
|
+
:session_attributes)
|
1102
1295
|
SENSITIVE = []
|
1103
1296
|
include Aws::Structure
|
1104
1297
|
end
|
1105
1298
|
|
1106
|
-
#
|
1299
|
+
# Contains information about where the text with a citation begins and
|
1300
|
+
# ends in the generated output.
|
1107
1301
|
#
|
1108
|
-
# @!attribute [rw]
|
1109
|
-
#
|
1302
|
+
# @!attribute [rw] end
|
1303
|
+
# Where the text with a citation ends in the generated output.
|
1110
1304
|
# @return [Integer]
|
1111
1305
|
#
|
1112
|
-
# @!attribute [rw]
|
1113
|
-
#
|
1306
|
+
# @!attribute [rw] start
|
1307
|
+
# Where the text with a citation starts in the generated output.
|
1114
1308
|
# @return [Integer]
|
1115
1309
|
#
|
1116
1310
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/Span AWS API Documentation
|
1117
1311
|
#
|
1118
1312
|
class Span < Struct.new(
|
1119
|
-
:
|
1120
|
-
:
|
1313
|
+
:end,
|
1314
|
+
:start)
|
1121
1315
|
SENSITIVE = []
|
1122
1316
|
include Aws::Structure
|
1123
1317
|
end
|
1124
1318
|
|
1125
|
-
#
|
1126
|
-
#
|
1127
|
-
# @!attribute [rw] text
|
1128
|
-
# Response part in text
|
1129
|
-
# @return [String]
|
1319
|
+
# Contains the part of the generated text that contains a citation,
|
1320
|
+
# alongside where it begins and ends.
|
1130
1321
|
#
|
1131
1322
|
# @!attribute [rw] span
|
1132
|
-
#
|
1323
|
+
# Contains information about where the text with a citation begins and
|
1324
|
+
# ends in the generated output.
|
1133
1325
|
# @return [Types::Span]
|
1134
1326
|
#
|
1327
|
+
# @!attribute [rw] text
|
1328
|
+
# The part of the generated text that contains a citation.
|
1329
|
+
# @return [String]
|
1330
|
+
#
|
1135
1331
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/TextResponsePart AWS API Documentation
|
1136
1332
|
#
|
1137
1333
|
class TextResponsePart < Struct.new(
|
1138
|
-
:
|
1139
|
-
:
|
1334
|
+
:span,
|
1335
|
+
:text)
|
1140
1336
|
SENSITIVE = []
|
1141
1337
|
include Aws::Structure
|
1142
1338
|
end
|
1143
1339
|
|
1144
|
-
#
|
1340
|
+
# The number of requests exceeds the limit. Resubmit your request later.
|
1145
1341
|
#
|
1146
1342
|
# @!attribute [rw] message
|
1147
|
-
# Non Blank String
|
1148
1343
|
# @return [String]
|
1149
1344
|
#
|
1150
1345
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ThrottlingException AWS API Documentation
|
@@ -1156,69 +1351,95 @@ module Aws::BedrockAgentRuntime
|
|
1156
1351
|
include Aws::Structure
|
1157
1352
|
end
|
1158
1353
|
|
1159
|
-
#
|
1354
|
+
# Contains one part of the agent's reasoning process and results from
|
1355
|
+
# calling API actions and querying knowledge bases. You can use the
|
1356
|
+
# trace to understand how the agent arrived at the response it provided
|
1357
|
+
# the customer. For more information, see [Trace enablement][1].
|
1358
|
+
#
|
1359
|
+
#
|
1360
|
+
#
|
1361
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-test.html#trace-enablement
|
1160
1362
|
#
|
1161
1363
|
# @note Trace is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of Trace corresponding to the set member.
|
1162
1364
|
#
|
1163
|
-
# @!attribute [rw]
|
1164
|
-
#
|
1165
|
-
# @return [Types::
|
1365
|
+
# @!attribute [rw] failure_trace
|
1366
|
+
# Contains information about the failure of the interaction.
|
1367
|
+
# @return [Types::FailureTrace]
|
1166
1368
|
#
|
1167
1369
|
# @!attribute [rw] orchestration_trace
|
1168
|
-
#
|
1370
|
+
# Details about the orchestration step, in which the agent determines
|
1371
|
+
# the order in which actions are executed and which knowledge bases
|
1372
|
+
# are retrieved.
|
1169
1373
|
# @return [Types::OrchestrationTrace]
|
1170
1374
|
#
|
1171
1375
|
# @!attribute [rw] post_processing_trace
|
1172
|
-
#
|
1173
|
-
#
|
1376
|
+
# Details about the post-processing step, in which the agent shapes
|
1377
|
+
# the response..
|
1174
1378
|
# @return [Types::PostProcessingTrace]
|
1175
1379
|
#
|
1176
|
-
# @!attribute [rw]
|
1177
|
-
#
|
1178
|
-
#
|
1380
|
+
# @!attribute [rw] pre_processing_trace
|
1381
|
+
# Details about the pre-processing step, in which the agent
|
1382
|
+
# contextualizes and categorizes user inputs.
|
1383
|
+
# @return [Types::PreProcessingTrace]
|
1179
1384
|
#
|
1180
1385
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/Trace AWS API Documentation
|
1181
1386
|
#
|
1182
1387
|
class Trace < Struct.new(
|
1183
|
-
:
|
1388
|
+
:failure_trace,
|
1184
1389
|
:orchestration_trace,
|
1185
1390
|
:post_processing_trace,
|
1186
|
-
:
|
1391
|
+
:pre_processing_trace,
|
1187
1392
|
:unknown)
|
1188
|
-
SENSITIVE = [:
|
1393
|
+
SENSITIVE = [:failure_trace, :orchestration_trace, :post_processing_trace, :pre_processing_trace]
|
1189
1394
|
include Aws::Structure
|
1190
1395
|
include Aws::Structure::Union
|
1191
1396
|
|
1192
|
-
class
|
1397
|
+
class FailureTrace < Trace; end
|
1193
1398
|
class OrchestrationTrace < Trace; end
|
1194
1399
|
class PostProcessingTrace < Trace; end
|
1195
|
-
class
|
1400
|
+
class PreProcessingTrace < Trace; end
|
1196
1401
|
class Unknown < Trace; end
|
1197
1402
|
end
|
1198
1403
|
|
1199
|
-
#
|
1404
|
+
# Contains information about the agent and session, alongside the
|
1405
|
+
# agent's reasoning process and results from calling API actions and
|
1406
|
+
# querying knowledge bases and metadata about the trace. You can use the
|
1407
|
+
# trace to understand how the agent arrived at the response it provided
|
1408
|
+
# the customer. For more information, see [Trace enablement][1].
|
1200
1409
|
#
|
1201
|
-
#
|
1202
|
-
#
|
1203
|
-
#
|
1410
|
+
#
|
1411
|
+
#
|
1412
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-test.html#trace-enablement
|
1204
1413
|
#
|
1205
1414
|
# @!attribute [rw] agent_alias_id
|
1206
|
-
#
|
1415
|
+
# The unique identifier of the alias of the agent.
|
1416
|
+
# @return [String]
|
1417
|
+
#
|
1418
|
+
# @!attribute [rw] agent_id
|
1419
|
+
# The unique identifier of the agent.
|
1207
1420
|
# @return [String]
|
1208
1421
|
#
|
1209
1422
|
# @!attribute [rw] session_id
|
1210
|
-
#
|
1423
|
+
# The unique identifier of the session with the agent.
|
1211
1424
|
# @return [String]
|
1212
1425
|
#
|
1213
1426
|
# @!attribute [rw] trace
|
1214
|
-
#
|
1427
|
+
# Contains one part of the agent's reasoning process and results from
|
1428
|
+
# calling API actions and querying knowledge bases. You can use the
|
1429
|
+
# trace to understand how the agent arrived at the response it
|
1430
|
+
# provided the customer. For more information, see [Trace
|
1431
|
+
# enablement][1].
|
1432
|
+
#
|
1433
|
+
#
|
1434
|
+
#
|
1435
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-test.html#trace-enablement
|
1215
1436
|
# @return [Types::Trace]
|
1216
1437
|
#
|
1217
1438
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/TracePart AWS API Documentation
|
1218
1439
|
#
|
1219
1440
|
class TracePart < Struct.new(
|
1220
|
-
:agent_id,
|
1221
1441
|
:agent_alias_id,
|
1442
|
+
:agent_id,
|
1222
1443
|
:session_id,
|
1223
1444
|
:trace,
|
1224
1445
|
:event_type)
|
@@ -1226,10 +1447,10 @@ module Aws::BedrockAgentRuntime
|
|
1226
1447
|
include Aws::Structure
|
1227
1448
|
end
|
1228
1449
|
|
1229
|
-
#
|
1450
|
+
# Input validation failed. Check your request parameters and retry the
|
1451
|
+
# request.
|
1230
1452
|
#
|
1231
1453
|
# @!attribute [rw] message
|
1232
|
-
# Non Blank String
|
1233
1454
|
# @return [String]
|
1234
1455
|
#
|
1235
1456
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ValidationException AWS API Documentation
|
@@ -1241,7 +1462,8 @@ module Aws::BedrockAgentRuntime
|
|
1241
1462
|
include Aws::Structure
|
1242
1463
|
end
|
1243
1464
|
|
1244
|
-
#
|
1465
|
+
# The response from invoking the agent and associated citations and
|
1466
|
+
# trace information.
|
1245
1467
|
#
|
1246
1468
|
# EventStream is an Enumerator of Events.
|
1247
1469
|
# #event_types #=> Array, returns all modeled event types in the stream
|
@@ -1252,17 +1474,17 @@ module Aws::BedrockAgentRuntime
|
|
1252
1474
|
|
1253
1475
|
def event_types
|
1254
1476
|
[
|
1477
|
+
:access_denied_exception,
|
1478
|
+
:bad_gateway_exception,
|
1255
1479
|
:chunk,
|
1256
|
-
:
|
1480
|
+
:conflict_exception,
|
1481
|
+
:dependency_failed_exception,
|
1257
1482
|
:internal_server_exception,
|
1258
|
-
:validation_exception,
|
1259
1483
|
:resource_not_found_exception,
|
1260
1484
|
:service_quota_exceeded_exception,
|
1261
1485
|
:throttling_exception,
|
1262
|
-
:
|
1263
|
-
:
|
1264
|
-
:dependency_failed_exception,
|
1265
|
-
:bad_gateway_exception
|
1486
|
+
:trace,
|
1487
|
+
:validation_exception
|
1266
1488
|
]
|
1267
1489
|
end
|
1268
1490
|
|