aws-sdk-bedrockagentruntime 1.0.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 +7 -0
- data/CHANGELOG.md +8 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-bedrockagentruntime/client.rb +928 -0
- data/lib/aws-sdk-bedrockagentruntime/client_api.rb +503 -0
- data/lib/aws-sdk-bedrockagentruntime/customizations.rb +0 -0
- data/lib/aws-sdk-bedrockagentruntime/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-bedrockagentruntime/endpoint_provider.rb +54 -0
- data/lib/aws-sdk-bedrockagentruntime/endpoints.rb +58 -0
- data/lib/aws-sdk-bedrockagentruntime/errors.rb +192 -0
- data/lib/aws-sdk-bedrockagentruntime/event_streams.rb +99 -0
- data/lib/aws-sdk-bedrockagentruntime/plugins/endpoints.rb +75 -0
- data/lib/aws-sdk-bedrockagentruntime/resource.rb +26 -0
- data/lib/aws-sdk-bedrockagentruntime/types.rb +1272 -0
- data/lib/aws-sdk-bedrockagentruntime.rb +58 -0
- metadata +95 -0
@@ -0,0 +1,1272 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::BedrockAgentRuntime
|
11
|
+
module Types
|
12
|
+
|
13
|
+
# This exception is thrown when a request is denied per access
|
14
|
+
# permissions
|
15
|
+
#
|
16
|
+
# @!attribute [rw] message
|
17
|
+
# Non Blank String
|
18
|
+
# @return [String]
|
19
|
+
#
|
20
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/AccessDeniedException AWS API Documentation
|
21
|
+
#
|
22
|
+
class AccessDeniedException < Struct.new(
|
23
|
+
:message,
|
24
|
+
:event_type)
|
25
|
+
SENSITIVE = []
|
26
|
+
include Aws::Structure
|
27
|
+
end
|
28
|
+
|
29
|
+
# input to lambda used in action group
|
30
|
+
#
|
31
|
+
# @!attribute [rw] action_group_name
|
32
|
+
# Agent Trace Action Group Name
|
33
|
+
# @return [String]
|
34
|
+
#
|
35
|
+
# @!attribute [rw] verb
|
36
|
+
# Agent Trace Action Group Action verb
|
37
|
+
# @return [String]
|
38
|
+
#
|
39
|
+
# @!attribute [rw] api_path
|
40
|
+
# Agent Trace Action Group API path
|
41
|
+
# @return [String]
|
42
|
+
#
|
43
|
+
# @!attribute [rw] parameters
|
44
|
+
# list of parameters included in action group invocation
|
45
|
+
# @return [Array<Types::Parameter>]
|
46
|
+
#
|
47
|
+
# @!attribute [rw] request_body
|
48
|
+
# Request Body Content Map
|
49
|
+
# @return [Types::RequestBody]
|
50
|
+
#
|
51
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ActionGroupInvocationInput AWS API Documentation
|
52
|
+
#
|
53
|
+
class ActionGroupInvocationInput < Struct.new(
|
54
|
+
:action_group_name,
|
55
|
+
:verb,
|
56
|
+
:api_path,
|
57
|
+
:parameters,
|
58
|
+
:request_body)
|
59
|
+
SENSITIVE = [:action_group_name, :verb, :api_path]
|
60
|
+
include Aws::Structure
|
61
|
+
end
|
62
|
+
|
63
|
+
# output from lambda used in action group
|
64
|
+
#
|
65
|
+
# @!attribute [rw] text
|
66
|
+
# Agent Trace Action Group Lambda Invocation Output String
|
67
|
+
# @return [String]
|
68
|
+
#
|
69
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ActionGroupInvocationOutput AWS API Documentation
|
70
|
+
#
|
71
|
+
class ActionGroupInvocationOutput < Struct.new(
|
72
|
+
:text)
|
73
|
+
SENSITIVE = [:text]
|
74
|
+
include Aws::Structure
|
75
|
+
end
|
76
|
+
|
77
|
+
# Citations associated with final agent response
|
78
|
+
#
|
79
|
+
# @!attribute [rw] citations
|
80
|
+
# List of citations
|
81
|
+
# @return [Array<Types::Citation>]
|
82
|
+
#
|
83
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/Attribution AWS API Documentation
|
84
|
+
#
|
85
|
+
class Attribution < Struct.new(
|
86
|
+
:citations)
|
87
|
+
SENSITIVE = []
|
88
|
+
include Aws::Structure
|
89
|
+
end
|
90
|
+
|
91
|
+
# This exception is thrown when a request fails due to dependency like
|
92
|
+
# Lambda, Bedrock, STS resource
|
93
|
+
#
|
94
|
+
# @!attribute [rw] message
|
95
|
+
# Non Blank String
|
96
|
+
# @return [String]
|
97
|
+
#
|
98
|
+
# @!attribute [rw] resource_name
|
99
|
+
# Non Blank String
|
100
|
+
# @return [String]
|
101
|
+
#
|
102
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/BadGatewayException AWS API Documentation
|
103
|
+
#
|
104
|
+
class BadGatewayException < Struct.new(
|
105
|
+
:message,
|
106
|
+
:resource_name,
|
107
|
+
:event_type)
|
108
|
+
SENSITIVE = []
|
109
|
+
include Aws::Structure
|
110
|
+
end
|
111
|
+
|
112
|
+
# Citation associated with the agent response
|
113
|
+
#
|
114
|
+
# @!attribute [rw] generated_response_part
|
115
|
+
# Generate response part
|
116
|
+
# @return [Types::GeneratedResponsePart]
|
117
|
+
#
|
118
|
+
# @!attribute [rw] retrieved_references
|
119
|
+
# list of retrieved references
|
120
|
+
# @return [Array<Types::RetrievedReference>]
|
121
|
+
#
|
122
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/Citation AWS API Documentation
|
123
|
+
#
|
124
|
+
class Citation < Struct.new(
|
125
|
+
:generated_response_part,
|
126
|
+
:retrieved_references)
|
127
|
+
SENSITIVE = []
|
128
|
+
include Aws::Structure
|
129
|
+
end
|
130
|
+
|
131
|
+
# This exception is thrown when there is a conflict performing an
|
132
|
+
# operation
|
133
|
+
#
|
134
|
+
# @!attribute [rw] message
|
135
|
+
# Non Blank String
|
136
|
+
# @return [String]
|
137
|
+
#
|
138
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ConflictException AWS API Documentation
|
139
|
+
#
|
140
|
+
class ConflictException < Struct.new(
|
141
|
+
:message,
|
142
|
+
:event_type)
|
143
|
+
SENSITIVE = []
|
144
|
+
include Aws::Structure
|
145
|
+
end
|
146
|
+
|
147
|
+
# This exception is thrown when a request fails due to dependency like
|
148
|
+
# Lambda, Bedrock, STS resource due to a customer fault (i.e. bad
|
149
|
+
# configuration)
|
150
|
+
#
|
151
|
+
# @!attribute [rw] message
|
152
|
+
# Non Blank String
|
153
|
+
# @return [String]
|
154
|
+
#
|
155
|
+
# @!attribute [rw] resource_name
|
156
|
+
# Non Blank String
|
157
|
+
# @return [String]
|
158
|
+
#
|
159
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/DependencyFailedException AWS API Documentation
|
160
|
+
#
|
161
|
+
class DependencyFailedException < Struct.new(
|
162
|
+
:message,
|
163
|
+
:resource_name,
|
164
|
+
:event_type)
|
165
|
+
SENSITIVE = []
|
166
|
+
include Aws::Structure
|
167
|
+
end
|
168
|
+
|
169
|
+
# Trace Part which is emitted when agent trace could not be generated
|
170
|
+
#
|
171
|
+
# @!attribute [rw] trace_id
|
172
|
+
# Identifier for trace
|
173
|
+
# @return [String]
|
174
|
+
#
|
175
|
+
# @!attribute [rw] failure_reason
|
176
|
+
# Agent Trace Failed Reason String
|
177
|
+
# @return [String]
|
178
|
+
#
|
179
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FailureTrace AWS API Documentation
|
180
|
+
#
|
181
|
+
class FailureTrace < Struct.new(
|
182
|
+
:trace_id,
|
183
|
+
:failure_reason)
|
184
|
+
SENSITIVE = [:failure_reason]
|
185
|
+
include Aws::Structure
|
186
|
+
end
|
187
|
+
|
188
|
+
# Agent finish output
|
189
|
+
#
|
190
|
+
# @!attribute [rw] text
|
191
|
+
# Agent Trace Action Group Lambda Invocation Output String
|
192
|
+
# @return [String]
|
193
|
+
#
|
194
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/FinalResponse AWS API Documentation
|
195
|
+
#
|
196
|
+
class FinalResponse < Struct.new(
|
197
|
+
:text)
|
198
|
+
SENSITIVE = [:text]
|
199
|
+
include Aws::Structure
|
200
|
+
end
|
201
|
+
|
202
|
+
# Generate response part
|
203
|
+
#
|
204
|
+
# @!attribute [rw] text_response_part
|
205
|
+
# Text response part
|
206
|
+
# @return [Types::TextResponsePart]
|
207
|
+
#
|
208
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/GeneratedResponsePart AWS API Documentation
|
209
|
+
#
|
210
|
+
class GeneratedResponsePart < Struct.new(
|
211
|
+
:text_response_part)
|
212
|
+
SENSITIVE = []
|
213
|
+
include Aws::Structure
|
214
|
+
end
|
215
|
+
|
216
|
+
# Configurations for controlling the inference response of an
|
217
|
+
# InvokeAgent API call
|
218
|
+
#
|
219
|
+
# @!attribute [rw] temperature
|
220
|
+
# Controls randomness, higher values increase diversity
|
221
|
+
# @return [Float]
|
222
|
+
#
|
223
|
+
# @!attribute [rw] top_p
|
224
|
+
# Cumulative probability cutoff for token selection
|
225
|
+
# @return [Float]
|
226
|
+
#
|
227
|
+
# @!attribute [rw] top_k
|
228
|
+
# Sample from the k most likely next tokens
|
229
|
+
# @return [Integer]
|
230
|
+
#
|
231
|
+
# @!attribute [rw] maximum_length
|
232
|
+
# Maximum length of output
|
233
|
+
# @return [Integer]
|
234
|
+
#
|
235
|
+
# @!attribute [rw] stop_sequences
|
236
|
+
# List of stop sequences
|
237
|
+
# @return [Array<String>]
|
238
|
+
#
|
239
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InferenceConfiguration AWS API Documentation
|
240
|
+
#
|
241
|
+
class InferenceConfiguration < Struct.new(
|
242
|
+
:temperature,
|
243
|
+
:top_p,
|
244
|
+
:top_k,
|
245
|
+
:maximum_length,
|
246
|
+
:stop_sequences)
|
247
|
+
SENSITIVE = []
|
248
|
+
include Aws::Structure
|
249
|
+
end
|
250
|
+
|
251
|
+
# This exception is thrown if there was an unexpected error during
|
252
|
+
# processing of request
|
253
|
+
#
|
254
|
+
# @!attribute [rw] message
|
255
|
+
# Non Blank String
|
256
|
+
# @return [String]
|
257
|
+
#
|
258
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InternalServerException AWS API Documentation
|
259
|
+
#
|
260
|
+
class InternalServerException < Struct.new(
|
261
|
+
:message,
|
262
|
+
:event_type)
|
263
|
+
SENSITIVE = []
|
264
|
+
include Aws::Structure
|
265
|
+
end
|
266
|
+
|
267
|
+
# Trace Part which contains input details for action group or knowledge
|
268
|
+
# base
|
269
|
+
#
|
270
|
+
# @!attribute [rw] trace_id
|
271
|
+
# Identifier for trace
|
272
|
+
# @return [String]
|
273
|
+
#
|
274
|
+
# @!attribute [rw] invocation_type
|
275
|
+
# types of invocations
|
276
|
+
# @return [String]
|
277
|
+
#
|
278
|
+
# @!attribute [rw] action_group_invocation_input
|
279
|
+
# input to lambda used in action group
|
280
|
+
# @return [Types::ActionGroupInvocationInput]
|
281
|
+
#
|
282
|
+
# @!attribute [rw] knowledge_base_lookup_input
|
283
|
+
# Input to lambda used in action group
|
284
|
+
# @return [Types::KnowledgeBaseLookupInput]
|
285
|
+
#
|
286
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvocationInput AWS API Documentation
|
287
|
+
#
|
288
|
+
class InvocationInput < Struct.new(
|
289
|
+
:trace_id,
|
290
|
+
:invocation_type,
|
291
|
+
:action_group_invocation_input,
|
292
|
+
:knowledge_base_lookup_input)
|
293
|
+
SENSITIVE = []
|
294
|
+
include Aws::Structure
|
295
|
+
end
|
296
|
+
|
297
|
+
# InvokeAgent Request
|
298
|
+
#
|
299
|
+
# @!attribute [rw] session_state
|
300
|
+
# Session state passed by customer. Base64 encoded json string
|
301
|
+
# representation of SessionState.
|
302
|
+
# @return [Types::SessionState]
|
303
|
+
#
|
304
|
+
# @!attribute [rw] agent_id
|
305
|
+
# Identifier for Agent
|
306
|
+
# @return [String]
|
307
|
+
#
|
308
|
+
# @!attribute [rw] agent_alias_id
|
309
|
+
# Identifier for Agent Alias
|
310
|
+
# @return [String]
|
311
|
+
#
|
312
|
+
# @!attribute [rw] session_id
|
313
|
+
# Identifier used for the current session
|
314
|
+
# @return [String]
|
315
|
+
#
|
316
|
+
# @!attribute [rw] end_session
|
317
|
+
# End current session
|
318
|
+
# @return [Boolean]
|
319
|
+
#
|
320
|
+
# @!attribute [rw] enable_trace
|
321
|
+
# Enable agent trace events for improved debugging
|
322
|
+
# @return [Boolean]
|
323
|
+
#
|
324
|
+
# @!attribute [rw] input_text
|
325
|
+
# Input data in the format specified in the Content-Type request
|
326
|
+
# header.
|
327
|
+
# @return [String]
|
328
|
+
#
|
329
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvokeAgentRequest AWS API Documentation
|
330
|
+
#
|
331
|
+
class InvokeAgentRequest < Struct.new(
|
332
|
+
:session_state,
|
333
|
+
:agent_id,
|
334
|
+
:agent_alias_id,
|
335
|
+
:session_id,
|
336
|
+
:end_session,
|
337
|
+
:enable_trace,
|
338
|
+
:input_text)
|
339
|
+
SENSITIVE = [:input_text]
|
340
|
+
include Aws::Structure
|
341
|
+
end
|
342
|
+
|
343
|
+
# InvokeAgent Response
|
344
|
+
#
|
345
|
+
# @!attribute [rw] completion
|
346
|
+
# Inference response from the model in the format specified in the
|
347
|
+
# Content-Type response header.
|
348
|
+
# @return [Types::ResponseStream]
|
349
|
+
#
|
350
|
+
# @!attribute [rw] content_type
|
351
|
+
# streaming response mimetype of the model
|
352
|
+
# @return [String]
|
353
|
+
#
|
354
|
+
# @!attribute [rw] session_id
|
355
|
+
# streaming response mimetype of the model
|
356
|
+
# @return [String]
|
357
|
+
#
|
358
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/InvokeAgentResponse AWS API Documentation
|
359
|
+
#
|
360
|
+
class InvokeAgentResponse < Struct.new(
|
361
|
+
:completion,
|
362
|
+
:content_type,
|
363
|
+
:session_id)
|
364
|
+
SENSITIVE = []
|
365
|
+
include Aws::Structure
|
366
|
+
end
|
367
|
+
|
368
|
+
# Input to lambda used in action group
|
369
|
+
#
|
370
|
+
# @!attribute [rw] text
|
371
|
+
# Agent Trace Action Group Lambda Invocation Output String
|
372
|
+
# @return [String]
|
373
|
+
#
|
374
|
+
# @!attribute [rw] knowledge_base_id
|
375
|
+
# Agent Trace Action Group Knowledge Base Id
|
376
|
+
# @return [String]
|
377
|
+
#
|
378
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseLookupInput AWS API Documentation
|
379
|
+
#
|
380
|
+
class KnowledgeBaseLookupInput < Struct.new(
|
381
|
+
:text,
|
382
|
+
:knowledge_base_id)
|
383
|
+
SENSITIVE = [:text, :knowledge_base_id]
|
384
|
+
include Aws::Structure
|
385
|
+
end
|
386
|
+
|
387
|
+
# Input to lambda used in action group
|
388
|
+
#
|
389
|
+
# @!attribute [rw] retrieved_references
|
390
|
+
# list of retrieved references
|
391
|
+
# @return [Array<Types::RetrievedReference>]
|
392
|
+
#
|
393
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseLookupOutput AWS API Documentation
|
394
|
+
#
|
395
|
+
class KnowledgeBaseLookupOutput < Struct.new(
|
396
|
+
:retrieved_references)
|
397
|
+
SENSITIVE = []
|
398
|
+
include Aws::Structure
|
399
|
+
end
|
400
|
+
|
401
|
+
# Knowledge base input query.
|
402
|
+
#
|
403
|
+
# @!attribute [rw] text
|
404
|
+
# Knowledge base input query in text
|
405
|
+
# @return [String]
|
406
|
+
#
|
407
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseQuery AWS API Documentation
|
408
|
+
#
|
409
|
+
class KnowledgeBaseQuery < Struct.new(
|
410
|
+
:text)
|
411
|
+
SENSITIVE = []
|
412
|
+
include Aws::Structure
|
413
|
+
end
|
414
|
+
|
415
|
+
# Search parameters for retrieving from knowledge base.
|
416
|
+
#
|
417
|
+
# @!attribute [rw] vector_search_configuration
|
418
|
+
# Knowledge base vector search configuration
|
419
|
+
# @return [Types::KnowledgeBaseVectorSearchConfiguration]
|
420
|
+
#
|
421
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseRetrievalConfiguration AWS API Documentation
|
422
|
+
#
|
423
|
+
class KnowledgeBaseRetrievalConfiguration < Struct.new(
|
424
|
+
:vector_search_configuration)
|
425
|
+
SENSITIVE = []
|
426
|
+
include Aws::Structure
|
427
|
+
end
|
428
|
+
|
429
|
+
# Result item returned from a knowledge base retrieval.
|
430
|
+
#
|
431
|
+
# @!attribute [rw] content
|
432
|
+
# Content of a retrieval result.
|
433
|
+
# @return [Types::RetrievalResultContent]
|
434
|
+
#
|
435
|
+
# @!attribute [rw] location
|
436
|
+
# The source location of a retrieval result.
|
437
|
+
# @return [Types::RetrievalResultLocation]
|
438
|
+
#
|
439
|
+
# @!attribute [rw] score
|
440
|
+
# The relevance score of a result.
|
441
|
+
# @return [Float]
|
442
|
+
#
|
443
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseRetrievalResult AWS API Documentation
|
444
|
+
#
|
445
|
+
class KnowledgeBaseRetrievalResult < Struct.new(
|
446
|
+
:content,
|
447
|
+
:location,
|
448
|
+
:score)
|
449
|
+
SENSITIVE = []
|
450
|
+
include Aws::Structure
|
451
|
+
end
|
452
|
+
|
453
|
+
# Configurations for retrieval and generation for knowledge base.
|
454
|
+
#
|
455
|
+
# @!attribute [rw] knowledge_base_id
|
456
|
+
# Identifier of the KnowledgeBase
|
457
|
+
# @return [String]
|
458
|
+
#
|
459
|
+
# @!attribute [rw] model_arn
|
460
|
+
# Arn of a Bedrock model.
|
461
|
+
# @return [String]
|
462
|
+
#
|
463
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseRetrieveAndGenerateConfiguration AWS API Documentation
|
464
|
+
#
|
465
|
+
class KnowledgeBaseRetrieveAndGenerateConfiguration < Struct.new(
|
466
|
+
:knowledge_base_id,
|
467
|
+
:model_arn)
|
468
|
+
SENSITIVE = []
|
469
|
+
include Aws::Structure
|
470
|
+
end
|
471
|
+
|
472
|
+
# Knowledge base vector search configuration
|
473
|
+
#
|
474
|
+
# @!attribute [rw] number_of_results
|
475
|
+
# Top-K results to retrieve from knowledge base.
|
476
|
+
# @return [Integer]
|
477
|
+
#
|
478
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/KnowledgeBaseVectorSearchConfiguration AWS API Documentation
|
479
|
+
#
|
480
|
+
class KnowledgeBaseVectorSearchConfiguration < Struct.new(
|
481
|
+
:number_of_results)
|
482
|
+
SENSITIVE = []
|
483
|
+
include Aws::Structure
|
484
|
+
end
|
485
|
+
|
486
|
+
# Trace Part which contains information used to call Invoke Model
|
487
|
+
#
|
488
|
+
# @!attribute [rw] trace_id
|
489
|
+
# Identifier for trace
|
490
|
+
# @return [String]
|
491
|
+
#
|
492
|
+
# @!attribute [rw] text
|
493
|
+
# Prompt Message
|
494
|
+
# @return [String]
|
495
|
+
#
|
496
|
+
# @!attribute [rw] type
|
497
|
+
# types of prompts
|
498
|
+
# @return [String]
|
499
|
+
#
|
500
|
+
# @!attribute [rw] inference_configuration
|
501
|
+
# Configurations for controlling the inference response of an
|
502
|
+
# InvokeAgent API call
|
503
|
+
# @return [Types::InferenceConfiguration]
|
504
|
+
#
|
505
|
+
# @!attribute [rw] override_lambda
|
506
|
+
# ARN of a Lambda.
|
507
|
+
# @return [String]
|
508
|
+
#
|
509
|
+
# @!attribute [rw] prompt_creation_mode
|
510
|
+
# indicates if agent uses default prompt or overriden prompt
|
511
|
+
# @return [String]
|
512
|
+
#
|
513
|
+
# @!attribute [rw] parser_mode
|
514
|
+
# indicates if agent uses default prompt or overriden prompt
|
515
|
+
# @return [String]
|
516
|
+
#
|
517
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ModelInvocationInput AWS API Documentation
|
518
|
+
#
|
519
|
+
class ModelInvocationInput < Struct.new(
|
520
|
+
:trace_id,
|
521
|
+
:text,
|
522
|
+
:type,
|
523
|
+
:inference_configuration,
|
524
|
+
:override_lambda,
|
525
|
+
:prompt_creation_mode,
|
526
|
+
:parser_mode)
|
527
|
+
SENSITIVE = [:text]
|
528
|
+
include Aws::Structure
|
529
|
+
end
|
530
|
+
|
531
|
+
# Trace Part which contains output details for action group or knowledge
|
532
|
+
# base or final response
|
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]
|
541
|
+
#
|
542
|
+
# @!attribute [rw] action_group_invocation_output
|
543
|
+
# output from lambda used in action group
|
544
|
+
# @return [Types::ActionGroupInvocationOutput]
|
545
|
+
#
|
546
|
+
# @!attribute [rw] knowledge_base_lookup_output
|
547
|
+
# Input to lambda used in action group
|
548
|
+
# @return [Types::KnowledgeBaseLookupOutput]
|
549
|
+
#
|
550
|
+
# @!attribute [rw] final_response
|
551
|
+
# Agent finish output
|
552
|
+
# @return [Types::FinalResponse]
|
553
|
+
#
|
554
|
+
# @!attribute [rw] reprompt_response
|
555
|
+
# Observation information if there were reprompts
|
556
|
+
# @return [Types::RepromptResponse]
|
557
|
+
#
|
558
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/Observation AWS API Documentation
|
559
|
+
#
|
560
|
+
class Observation < Struct.new(
|
561
|
+
:trace_id,
|
562
|
+
:type,
|
563
|
+
:action_group_invocation_output,
|
564
|
+
:knowledge_base_lookup_output,
|
565
|
+
:final_response,
|
566
|
+
:reprompt_response)
|
567
|
+
SENSITIVE = [:reprompt_response]
|
568
|
+
include Aws::Structure
|
569
|
+
end
|
570
|
+
|
571
|
+
# Trace contains intermidate response during orchestration
|
572
|
+
#
|
573
|
+
# @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
|
+
#
|
575
|
+
# @!attribute [rw] rationale
|
576
|
+
# Trace Part which contains information related to reasoning
|
577
|
+
# @return [Types::Rationale]
|
578
|
+
#
|
579
|
+
# @!attribute [rw] invocation_input
|
580
|
+
# Trace Part which contains input details for action group or
|
581
|
+
# knowledge base
|
582
|
+
# @return [Types::InvocationInput]
|
583
|
+
#
|
584
|
+
# @!attribute [rw] observation
|
585
|
+
# Trace Part which contains output details for action group or
|
586
|
+
# knowledge base or final response
|
587
|
+
# @return [Types::Observation]
|
588
|
+
#
|
589
|
+
# @!attribute [rw] model_invocation_input
|
590
|
+
# Trace Part which contains information used to call Invoke Model
|
591
|
+
# @return [Types::ModelInvocationInput]
|
592
|
+
#
|
593
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/OrchestrationTrace AWS API Documentation
|
594
|
+
#
|
595
|
+
class OrchestrationTrace < Struct.new(
|
596
|
+
:rationale,
|
597
|
+
:invocation_input,
|
598
|
+
:observation,
|
599
|
+
:model_invocation_input,
|
600
|
+
:unknown)
|
601
|
+
SENSITIVE = [:rationale, :invocation_input, :observation, :model_invocation_input]
|
602
|
+
include Aws::Structure
|
603
|
+
include Aws::Structure::Union
|
604
|
+
|
605
|
+
class Rationale < OrchestrationTrace; end
|
606
|
+
class InvocationInput < OrchestrationTrace; end
|
607
|
+
class Observation < OrchestrationTrace; end
|
608
|
+
class ModelInvocationInput < OrchestrationTrace; end
|
609
|
+
class Unknown < OrchestrationTrace; end
|
610
|
+
end
|
611
|
+
|
612
|
+
# parameters included in action group invocation
|
613
|
+
#
|
614
|
+
# @!attribute [rw] name
|
615
|
+
# Name of parameter
|
616
|
+
# @return [String]
|
617
|
+
#
|
618
|
+
# @!attribute [rw] type
|
619
|
+
# Type of parameter
|
620
|
+
# @return [String]
|
621
|
+
#
|
622
|
+
# @!attribute [rw] value
|
623
|
+
# Value of parameter
|
624
|
+
# @return [String]
|
625
|
+
#
|
626
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/Parameter AWS API Documentation
|
627
|
+
#
|
628
|
+
class Parameter < Struct.new(
|
629
|
+
:name,
|
630
|
+
:type,
|
631
|
+
:value)
|
632
|
+
SENSITIVE = []
|
633
|
+
include Aws::Structure
|
634
|
+
end
|
635
|
+
|
636
|
+
# Base 64 endoded byte response
|
637
|
+
#
|
638
|
+
# @!attribute [rw] bytes
|
639
|
+
# PartBody of the payload in bytes
|
640
|
+
# @return [String]
|
641
|
+
#
|
642
|
+
# @!attribute [rw] attribution
|
643
|
+
# Citations associated with final agent response
|
644
|
+
# @return [Types::Attribution]
|
645
|
+
#
|
646
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PayloadPart AWS API Documentation
|
647
|
+
#
|
648
|
+
class PayloadPart < Struct.new(
|
649
|
+
:bytes,
|
650
|
+
:attribution,
|
651
|
+
:event_type)
|
652
|
+
SENSITIVE = [:bytes]
|
653
|
+
include Aws::Structure
|
654
|
+
end
|
655
|
+
|
656
|
+
# Trace Part which contains information related to postprocessing
|
657
|
+
#
|
658
|
+
# @!attribute [rw] trace_id
|
659
|
+
# Identifier for trace
|
660
|
+
# @return [String]
|
661
|
+
#
|
662
|
+
# @!attribute [rw] parsed_response
|
663
|
+
# Trace Part which contains information if preprocessing was
|
664
|
+
# successful
|
665
|
+
# @return [Types::PostProcessingParsedResponse]
|
666
|
+
#
|
667
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PostProcessingModelInvocationOutput AWS API Documentation
|
668
|
+
#
|
669
|
+
class PostProcessingModelInvocationOutput < Struct.new(
|
670
|
+
:trace_id,
|
671
|
+
:parsed_response)
|
672
|
+
SENSITIVE = [:parsed_response]
|
673
|
+
include Aws::Structure
|
674
|
+
end
|
675
|
+
|
676
|
+
# Trace Part which contains information if preprocessing was successful
|
677
|
+
#
|
678
|
+
# @!attribute [rw] text
|
679
|
+
# Agent Trace Output String
|
680
|
+
# @return [String]
|
681
|
+
#
|
682
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PostProcessingParsedResponse AWS API Documentation
|
683
|
+
#
|
684
|
+
class PostProcessingParsedResponse < Struct.new(
|
685
|
+
:text)
|
686
|
+
SENSITIVE = [:text]
|
687
|
+
include Aws::Structure
|
688
|
+
end
|
689
|
+
|
690
|
+
# Trace Part which contains information related to post processing step
|
691
|
+
#
|
692
|
+
# @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
|
+
#
|
694
|
+
# @!attribute [rw] model_invocation_input
|
695
|
+
# Trace Part which contains information used to call Invoke Model
|
696
|
+
# @return [Types::ModelInvocationInput]
|
697
|
+
#
|
698
|
+
# @!attribute [rw] model_invocation_output
|
699
|
+
# Trace Part which contains information related to postprocessing
|
700
|
+
# @return [Types::PostProcessingModelInvocationOutput]
|
701
|
+
#
|
702
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PostProcessingTrace AWS API Documentation
|
703
|
+
#
|
704
|
+
class PostProcessingTrace < Struct.new(
|
705
|
+
:model_invocation_input,
|
706
|
+
:model_invocation_output,
|
707
|
+
:unknown)
|
708
|
+
SENSITIVE = [:model_invocation_input, :model_invocation_output]
|
709
|
+
include Aws::Structure
|
710
|
+
include Aws::Structure::Union
|
711
|
+
|
712
|
+
class ModelInvocationInput < PostProcessingTrace; end
|
713
|
+
class ModelInvocationOutput < PostProcessingTrace; end
|
714
|
+
class Unknown < PostProcessingTrace; end
|
715
|
+
end
|
716
|
+
|
717
|
+
# Trace Part which contains information related to preprocessing
|
718
|
+
#
|
719
|
+
# @!attribute [rw] trace_id
|
720
|
+
# Identifier for trace
|
721
|
+
# @return [String]
|
722
|
+
#
|
723
|
+
# @!attribute [rw] parsed_response
|
724
|
+
# Trace Part which contains information if preprocessing was
|
725
|
+
# successful
|
726
|
+
# @return [Types::PreProcessingParsedResponse]
|
727
|
+
#
|
728
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PreProcessingModelInvocationOutput AWS API Documentation
|
729
|
+
#
|
730
|
+
class PreProcessingModelInvocationOutput < Struct.new(
|
731
|
+
:trace_id,
|
732
|
+
:parsed_response)
|
733
|
+
SENSITIVE = [:parsed_response]
|
734
|
+
include Aws::Structure
|
735
|
+
end
|
736
|
+
|
737
|
+
# Trace Part which contains information if preprocessing was successful
|
738
|
+
#
|
739
|
+
# @!attribute [rw] rationale
|
740
|
+
# Agent Trace Rationale String
|
741
|
+
# @return [String]
|
742
|
+
#
|
743
|
+
# @!attribute [rw] is_valid
|
744
|
+
# Boolean value
|
745
|
+
# @return [Boolean]
|
746
|
+
#
|
747
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PreProcessingParsedResponse AWS API Documentation
|
748
|
+
#
|
749
|
+
class PreProcessingParsedResponse < Struct.new(
|
750
|
+
:rationale,
|
751
|
+
:is_valid)
|
752
|
+
SENSITIVE = [:rationale]
|
753
|
+
include Aws::Structure
|
754
|
+
end
|
755
|
+
|
756
|
+
# Trace Part which contains information related to preprocessing step
|
757
|
+
#
|
758
|
+
# @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
|
+
#
|
760
|
+
# @!attribute [rw] model_invocation_input
|
761
|
+
# Trace Part which contains information used to call Invoke Model
|
762
|
+
# @return [Types::ModelInvocationInput]
|
763
|
+
#
|
764
|
+
# @!attribute [rw] model_invocation_output
|
765
|
+
# Trace Part which contains information related to preprocessing
|
766
|
+
# @return [Types::PreProcessingModelInvocationOutput]
|
767
|
+
#
|
768
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/PreProcessingTrace AWS API Documentation
|
769
|
+
#
|
770
|
+
class PreProcessingTrace < Struct.new(
|
771
|
+
:model_invocation_input,
|
772
|
+
:model_invocation_output,
|
773
|
+
:unknown)
|
774
|
+
SENSITIVE = [:model_invocation_input, :model_invocation_output]
|
775
|
+
include Aws::Structure
|
776
|
+
include Aws::Structure::Union
|
777
|
+
|
778
|
+
class ModelInvocationInput < PreProcessingTrace; end
|
779
|
+
class ModelInvocationOutput < PreProcessingTrace; end
|
780
|
+
class Unknown < PreProcessingTrace; end
|
781
|
+
end
|
782
|
+
|
783
|
+
# Trace Part which contains information related to reasoning
|
784
|
+
#
|
785
|
+
# @!attribute [rw] trace_id
|
786
|
+
# Identifier for trace
|
787
|
+
# @return [String]
|
788
|
+
#
|
789
|
+
# @!attribute [rw] text
|
790
|
+
# Agent Trace Rationale String
|
791
|
+
# @return [String]
|
792
|
+
#
|
793
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/Rationale AWS API Documentation
|
794
|
+
#
|
795
|
+
class Rationale < Struct.new(
|
796
|
+
:trace_id,
|
797
|
+
:text)
|
798
|
+
SENSITIVE = [:text]
|
799
|
+
include Aws::Structure
|
800
|
+
end
|
801
|
+
|
802
|
+
# Observation information if there were reprompts
|
803
|
+
#
|
804
|
+
# @!attribute [rw] text
|
805
|
+
# Reprompt response text
|
806
|
+
# @return [String]
|
807
|
+
#
|
808
|
+
# @!attribute [rw] source
|
809
|
+
# Parsing error source
|
810
|
+
# @return [String]
|
811
|
+
#
|
812
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RepromptResponse AWS API Documentation
|
813
|
+
#
|
814
|
+
class RepromptResponse < Struct.new(
|
815
|
+
:text,
|
816
|
+
:source)
|
817
|
+
SENSITIVE = [:source]
|
818
|
+
include Aws::Structure
|
819
|
+
end
|
820
|
+
|
821
|
+
# Request Body Content Map
|
822
|
+
#
|
823
|
+
# @!attribute [rw] content
|
824
|
+
# Content type paramter map
|
825
|
+
# @return [Hash<String,Array<Types::Parameter>>]
|
826
|
+
#
|
827
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RequestBody AWS API Documentation
|
828
|
+
#
|
829
|
+
class RequestBody < Struct.new(
|
830
|
+
:content)
|
831
|
+
SENSITIVE = []
|
832
|
+
include Aws::Structure
|
833
|
+
end
|
834
|
+
|
835
|
+
# This exception is thrown when a resource referenced by the operation
|
836
|
+
# does not exist
|
837
|
+
#
|
838
|
+
# @!attribute [rw] message
|
839
|
+
# Non Blank String
|
840
|
+
# @return [String]
|
841
|
+
#
|
842
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ResourceNotFoundException AWS API Documentation
|
843
|
+
#
|
844
|
+
class ResourceNotFoundException < Struct.new(
|
845
|
+
:message,
|
846
|
+
:event_type)
|
847
|
+
SENSITIVE = []
|
848
|
+
include Aws::Structure
|
849
|
+
end
|
850
|
+
|
851
|
+
# Content of a retrieval result.
|
852
|
+
#
|
853
|
+
# @!attribute [rw] text
|
854
|
+
# Content of a retrieval result in text
|
855
|
+
# @return [String]
|
856
|
+
#
|
857
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrievalResultContent AWS API Documentation
|
858
|
+
#
|
859
|
+
class RetrievalResultContent < Struct.new(
|
860
|
+
:text)
|
861
|
+
SENSITIVE = []
|
862
|
+
include Aws::Structure
|
863
|
+
end
|
864
|
+
|
865
|
+
# The source location of a retrieval result.
|
866
|
+
#
|
867
|
+
# @!attribute [rw] type
|
868
|
+
# The location type of a retrieval result.
|
869
|
+
# @return [String]
|
870
|
+
#
|
871
|
+
# @!attribute [rw] s3_location
|
872
|
+
# The S3 location of a retrieval result.
|
873
|
+
# @return [Types::RetrievalResultS3Location]
|
874
|
+
#
|
875
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrievalResultLocation AWS API Documentation
|
876
|
+
#
|
877
|
+
class RetrievalResultLocation < Struct.new(
|
878
|
+
:type,
|
879
|
+
:s3_location)
|
880
|
+
SENSITIVE = []
|
881
|
+
include Aws::Structure
|
882
|
+
end
|
883
|
+
|
884
|
+
# The S3 location of a retrieval result.
|
885
|
+
#
|
886
|
+
# @!attribute [rw] uri
|
887
|
+
# URI of S3 location
|
888
|
+
# @return [String]
|
889
|
+
#
|
890
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrievalResultS3Location AWS API Documentation
|
891
|
+
#
|
892
|
+
class RetrievalResultS3Location < Struct.new(
|
893
|
+
:uri)
|
894
|
+
SENSITIVE = []
|
895
|
+
include Aws::Structure
|
896
|
+
end
|
897
|
+
|
898
|
+
# Configures the retrieval and generation for the session.
|
899
|
+
#
|
900
|
+
# @!attribute [rw] type
|
901
|
+
# The type of RetrieveAndGenerate.
|
902
|
+
# @return [String]
|
903
|
+
#
|
904
|
+
# @!attribute [rw] knowledge_base_configuration
|
905
|
+
# Configurations for retrieval and generation for knowledge base.
|
906
|
+
# @return [Types::KnowledgeBaseRetrieveAndGenerateConfiguration]
|
907
|
+
#
|
908
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveAndGenerateConfiguration AWS API Documentation
|
909
|
+
#
|
910
|
+
class RetrieveAndGenerateConfiguration < Struct.new(
|
911
|
+
:type,
|
912
|
+
:knowledge_base_configuration)
|
913
|
+
SENSITIVE = []
|
914
|
+
include Aws::Structure
|
915
|
+
end
|
916
|
+
|
917
|
+
# Customer input of the turn
|
918
|
+
#
|
919
|
+
# @!attribute [rw] text
|
920
|
+
# Customer input of the turn in text
|
921
|
+
# @return [String]
|
922
|
+
#
|
923
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveAndGenerateInput AWS API Documentation
|
924
|
+
#
|
925
|
+
class RetrieveAndGenerateInput < Struct.new(
|
926
|
+
:text)
|
927
|
+
SENSITIVE = []
|
928
|
+
include Aws::Structure
|
929
|
+
end
|
930
|
+
|
931
|
+
# Service response of the turn
|
932
|
+
#
|
933
|
+
# @!attribute [rw] text
|
934
|
+
# Service response of the turn in text
|
935
|
+
# @return [String]
|
936
|
+
#
|
937
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveAndGenerateOutput AWS API Documentation
|
938
|
+
#
|
939
|
+
class RetrieveAndGenerateOutput < Struct.new(
|
940
|
+
:text)
|
941
|
+
SENSITIVE = []
|
942
|
+
include Aws::Structure
|
943
|
+
end
|
944
|
+
|
945
|
+
# @!attribute [rw] session_id
|
946
|
+
# Identifier of the session.
|
947
|
+
# @return [String]
|
948
|
+
#
|
949
|
+
# @!attribute [rw] input
|
950
|
+
# Customer input of the turn
|
951
|
+
# @return [Types::RetrieveAndGenerateInput]
|
952
|
+
#
|
953
|
+
# @!attribute [rw] retrieve_and_generate_configuration
|
954
|
+
# Configures the retrieval and generation for the session.
|
955
|
+
# @return [Types::RetrieveAndGenerateConfiguration]
|
956
|
+
#
|
957
|
+
# @!attribute [rw] session_configuration
|
958
|
+
# Configures common parameters of the session.
|
959
|
+
# @return [Types::RetrieveAndGenerateSessionConfiguration]
|
960
|
+
#
|
961
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveAndGenerateRequest AWS API Documentation
|
962
|
+
#
|
963
|
+
class RetrieveAndGenerateRequest < Struct.new(
|
964
|
+
:session_id,
|
965
|
+
:input,
|
966
|
+
:retrieve_and_generate_configuration,
|
967
|
+
:session_configuration)
|
968
|
+
SENSITIVE = [:input]
|
969
|
+
include Aws::Structure
|
970
|
+
end
|
971
|
+
|
972
|
+
# @!attribute [rw] session_id
|
973
|
+
# Identifier of the session.
|
974
|
+
# @return [String]
|
975
|
+
#
|
976
|
+
# @!attribute [rw] output
|
977
|
+
# Service response of the turn
|
978
|
+
# @return [Types::RetrieveAndGenerateOutput]
|
979
|
+
#
|
980
|
+
# @!attribute [rw] citations
|
981
|
+
# List of citations
|
982
|
+
# @return [Array<Types::Citation>]
|
983
|
+
#
|
984
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveAndGenerateResponse AWS API Documentation
|
985
|
+
#
|
986
|
+
class RetrieveAndGenerateResponse < Struct.new(
|
987
|
+
:session_id,
|
988
|
+
:output,
|
989
|
+
:citations)
|
990
|
+
SENSITIVE = [:output]
|
991
|
+
include Aws::Structure
|
992
|
+
end
|
993
|
+
|
994
|
+
# Configures common parameters of the session.
|
995
|
+
#
|
996
|
+
# @!attribute [rw] kms_key_arn
|
997
|
+
# The KMS key arn to encrypt the customer data of the session.
|
998
|
+
# @return [String]
|
999
|
+
#
|
1000
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveAndGenerateSessionConfiguration AWS API Documentation
|
1001
|
+
#
|
1002
|
+
class RetrieveAndGenerateSessionConfiguration < Struct.new(
|
1003
|
+
:kms_key_arn)
|
1004
|
+
SENSITIVE = []
|
1005
|
+
include Aws::Structure
|
1006
|
+
end
|
1007
|
+
|
1008
|
+
# @!attribute [rw] knowledge_base_id
|
1009
|
+
# Identifier of the KnowledgeBase
|
1010
|
+
# @return [String]
|
1011
|
+
#
|
1012
|
+
# @!attribute [rw] retrieval_query
|
1013
|
+
# Knowledge base input query.
|
1014
|
+
# @return [Types::KnowledgeBaseQuery]
|
1015
|
+
#
|
1016
|
+
# @!attribute [rw] retrieval_configuration
|
1017
|
+
# Search parameters for retrieving from knowledge base.
|
1018
|
+
# @return [Types::KnowledgeBaseRetrievalConfiguration]
|
1019
|
+
#
|
1020
|
+
# @!attribute [rw] next_token
|
1021
|
+
# Opaque continuation token of previous paginated response.
|
1022
|
+
# @return [String]
|
1023
|
+
#
|
1024
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveRequest AWS API Documentation
|
1025
|
+
#
|
1026
|
+
class RetrieveRequest < Struct.new(
|
1027
|
+
:knowledge_base_id,
|
1028
|
+
:retrieval_query,
|
1029
|
+
:retrieval_configuration,
|
1030
|
+
:next_token)
|
1031
|
+
SENSITIVE = [:retrieval_query]
|
1032
|
+
include Aws::Structure
|
1033
|
+
end
|
1034
|
+
|
1035
|
+
# @!attribute [rw] retrieval_results
|
1036
|
+
# List of knowledge base retrieval results
|
1037
|
+
# @return [Array<Types::KnowledgeBaseRetrievalResult>]
|
1038
|
+
#
|
1039
|
+
# @!attribute [rw] next_token
|
1040
|
+
# Opaque continuation token of previous paginated response.
|
1041
|
+
# @return [String]
|
1042
|
+
#
|
1043
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrieveResponse AWS API Documentation
|
1044
|
+
#
|
1045
|
+
class RetrieveResponse < Struct.new(
|
1046
|
+
:retrieval_results,
|
1047
|
+
:next_token)
|
1048
|
+
SENSITIVE = [:retrieval_results]
|
1049
|
+
include Aws::Structure
|
1050
|
+
end
|
1051
|
+
|
1052
|
+
# Retrieved reference
|
1053
|
+
#
|
1054
|
+
# @!attribute [rw] content
|
1055
|
+
# Content of a retrieval result.
|
1056
|
+
# @return [Types::RetrievalResultContent]
|
1057
|
+
#
|
1058
|
+
# @!attribute [rw] location
|
1059
|
+
# The source location of a retrieval result.
|
1060
|
+
# @return [Types::RetrievalResultLocation]
|
1061
|
+
#
|
1062
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/RetrievedReference AWS API Documentation
|
1063
|
+
#
|
1064
|
+
class RetrievedReference < Struct.new(
|
1065
|
+
:content,
|
1066
|
+
:location)
|
1067
|
+
SENSITIVE = []
|
1068
|
+
include Aws::Structure
|
1069
|
+
end
|
1070
|
+
|
1071
|
+
# This exception is thrown when a request is made beyond the service
|
1072
|
+
# quota
|
1073
|
+
#
|
1074
|
+
# @!attribute [rw] message
|
1075
|
+
# Non Blank String
|
1076
|
+
# @return [String]
|
1077
|
+
#
|
1078
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ServiceQuotaExceededException AWS API Documentation
|
1079
|
+
#
|
1080
|
+
class ServiceQuotaExceededException < Struct.new(
|
1081
|
+
:message,
|
1082
|
+
:event_type)
|
1083
|
+
SENSITIVE = []
|
1084
|
+
include Aws::Structure
|
1085
|
+
end
|
1086
|
+
|
1087
|
+
# Session state provided
|
1088
|
+
#
|
1089
|
+
# @!attribute [rw] session_attributes
|
1090
|
+
# Session Attributes
|
1091
|
+
# @return [Hash<String,String>]
|
1092
|
+
#
|
1093
|
+
# @!attribute [rw] prompt_session_attributes
|
1094
|
+
# Prompt Session Attributes
|
1095
|
+
# @return [Hash<String,String>]
|
1096
|
+
#
|
1097
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/SessionState AWS API Documentation
|
1098
|
+
#
|
1099
|
+
class SessionState < Struct.new(
|
1100
|
+
:session_attributes,
|
1101
|
+
:prompt_session_attributes)
|
1102
|
+
SENSITIVE = []
|
1103
|
+
include Aws::Structure
|
1104
|
+
end
|
1105
|
+
|
1106
|
+
# Span of text
|
1107
|
+
#
|
1108
|
+
# @!attribute [rw] start
|
1109
|
+
# Start of span
|
1110
|
+
# @return [Integer]
|
1111
|
+
#
|
1112
|
+
# @!attribute [rw] end
|
1113
|
+
# End of span
|
1114
|
+
# @return [Integer]
|
1115
|
+
#
|
1116
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/Span AWS API Documentation
|
1117
|
+
#
|
1118
|
+
class Span < Struct.new(
|
1119
|
+
:start,
|
1120
|
+
:end)
|
1121
|
+
SENSITIVE = []
|
1122
|
+
include Aws::Structure
|
1123
|
+
end
|
1124
|
+
|
1125
|
+
# Text response part
|
1126
|
+
#
|
1127
|
+
# @!attribute [rw] text
|
1128
|
+
# Response part in text
|
1129
|
+
# @return [String]
|
1130
|
+
#
|
1131
|
+
# @!attribute [rw] span
|
1132
|
+
# Span of text
|
1133
|
+
# @return [Types::Span]
|
1134
|
+
#
|
1135
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/TextResponsePart AWS API Documentation
|
1136
|
+
#
|
1137
|
+
class TextResponsePart < Struct.new(
|
1138
|
+
:text,
|
1139
|
+
:span)
|
1140
|
+
SENSITIVE = []
|
1141
|
+
include Aws::Structure
|
1142
|
+
end
|
1143
|
+
|
1144
|
+
# This exception is thrown when the number of requests exceeds the limit
|
1145
|
+
#
|
1146
|
+
# @!attribute [rw] message
|
1147
|
+
# Non Blank String
|
1148
|
+
# @return [String]
|
1149
|
+
#
|
1150
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ThrottlingException AWS API Documentation
|
1151
|
+
#
|
1152
|
+
class ThrottlingException < Struct.new(
|
1153
|
+
:message,
|
1154
|
+
:event_type)
|
1155
|
+
SENSITIVE = []
|
1156
|
+
include Aws::Structure
|
1157
|
+
end
|
1158
|
+
|
1159
|
+
# Trace contains intermidate response for customer
|
1160
|
+
#
|
1161
|
+
# @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
|
+
#
|
1163
|
+
# @!attribute [rw] pre_processing_trace
|
1164
|
+
# Trace Part which contains information related to preprocessing step
|
1165
|
+
# @return [Types::PreProcessingTrace]
|
1166
|
+
#
|
1167
|
+
# @!attribute [rw] orchestration_trace
|
1168
|
+
# Trace contains intermidate response during orchestration
|
1169
|
+
# @return [Types::OrchestrationTrace]
|
1170
|
+
#
|
1171
|
+
# @!attribute [rw] post_processing_trace
|
1172
|
+
# Trace Part which contains information related to post processing
|
1173
|
+
# step
|
1174
|
+
# @return [Types::PostProcessingTrace]
|
1175
|
+
#
|
1176
|
+
# @!attribute [rw] failure_trace
|
1177
|
+
# Trace Part which is emitted when agent trace could not be generated
|
1178
|
+
# @return [Types::FailureTrace]
|
1179
|
+
#
|
1180
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/Trace AWS API Documentation
|
1181
|
+
#
|
1182
|
+
class Trace < Struct.new(
|
1183
|
+
:pre_processing_trace,
|
1184
|
+
:orchestration_trace,
|
1185
|
+
:post_processing_trace,
|
1186
|
+
:failure_trace,
|
1187
|
+
:unknown)
|
1188
|
+
SENSITIVE = [:pre_processing_trace, :orchestration_trace, :post_processing_trace, :failure_trace]
|
1189
|
+
include Aws::Structure
|
1190
|
+
include Aws::Structure::Union
|
1191
|
+
|
1192
|
+
class PreProcessingTrace < Trace; end
|
1193
|
+
class OrchestrationTrace < Trace; end
|
1194
|
+
class PostProcessingTrace < Trace; end
|
1195
|
+
class FailureTrace < Trace; end
|
1196
|
+
class Unknown < Trace; end
|
1197
|
+
end
|
1198
|
+
|
1199
|
+
# Trace Part which contains intermidate response for customer
|
1200
|
+
#
|
1201
|
+
# @!attribute [rw] agent_id
|
1202
|
+
# Identifier of the agent.
|
1203
|
+
# @return [String]
|
1204
|
+
#
|
1205
|
+
# @!attribute [rw] agent_alias_id
|
1206
|
+
# Identifier of the agent alias.
|
1207
|
+
# @return [String]
|
1208
|
+
#
|
1209
|
+
# @!attribute [rw] session_id
|
1210
|
+
# Identifier of the session.
|
1211
|
+
# @return [String]
|
1212
|
+
#
|
1213
|
+
# @!attribute [rw] trace
|
1214
|
+
# Trace contains intermidate response for customer
|
1215
|
+
# @return [Types::Trace]
|
1216
|
+
#
|
1217
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/TracePart AWS API Documentation
|
1218
|
+
#
|
1219
|
+
class TracePart < Struct.new(
|
1220
|
+
:agent_id,
|
1221
|
+
:agent_alias_id,
|
1222
|
+
:session_id,
|
1223
|
+
:trace,
|
1224
|
+
:event_type)
|
1225
|
+
SENSITIVE = [:trace]
|
1226
|
+
include Aws::Structure
|
1227
|
+
end
|
1228
|
+
|
1229
|
+
# This exception is thrown when the request's input validation fails
|
1230
|
+
#
|
1231
|
+
# @!attribute [rw] message
|
1232
|
+
# Non Blank String
|
1233
|
+
# @return [String]
|
1234
|
+
#
|
1235
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ValidationException AWS API Documentation
|
1236
|
+
#
|
1237
|
+
class ValidationException < Struct.new(
|
1238
|
+
:message,
|
1239
|
+
:event_type)
|
1240
|
+
SENSITIVE = []
|
1241
|
+
include Aws::Structure
|
1242
|
+
end
|
1243
|
+
|
1244
|
+
# Response body of is a stream
|
1245
|
+
#
|
1246
|
+
# EventStream is an Enumerator of Events.
|
1247
|
+
# #event_types #=> Array, returns all modeled event types in the stream
|
1248
|
+
#
|
1249
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agent-runtime-2023-07-26/ResponseStream AWS API Documentation
|
1250
|
+
#
|
1251
|
+
class ResponseStream < Enumerator
|
1252
|
+
|
1253
|
+
def event_types
|
1254
|
+
[
|
1255
|
+
:chunk,
|
1256
|
+
:trace,
|
1257
|
+
:internal_server_exception,
|
1258
|
+
:validation_exception,
|
1259
|
+
:resource_not_found_exception,
|
1260
|
+
:service_quota_exceeded_exception,
|
1261
|
+
:throttling_exception,
|
1262
|
+
:access_denied_exception,
|
1263
|
+
:conflict_exception,
|
1264
|
+
:dependency_failed_exception,
|
1265
|
+
:bad_gateway_exception
|
1266
|
+
]
|
1267
|
+
end
|
1268
|
+
|
1269
|
+
end
|
1270
|
+
|
1271
|
+
end
|
1272
|
+
end
|