cdk-lambda-subminute 2.0.398 → 2.0.399
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.
- package/.jsii +3 -3
- package/lib/cdk-lambda-subminute.js +3 -3
- package/node_modules/aws-sdk/README.md +1 -1
- package/node_modules/aws-sdk/apis/batch-2016-08-10.min.json +187 -158
- package/node_modules/aws-sdk/apis/bedrock-agent-runtime-2023-07-26.min.json +252 -252
- package/node_modules/aws-sdk/clients/batch.d.ts +36 -3
- package/node_modules/aws-sdk/clients/bedrockagentruntime.d.ts +363 -81
- package/node_modules/aws-sdk/clients/cloudtrail.d.ts +2 -2
- package/node_modules/aws-sdk/clients/codebuild.d.ts +4 -4
- package/node_modules/aws-sdk/clients/cognitoidentityserviceprovider.d.ts +32 -32
- package/node_modules/aws-sdk/clients/guardduty.d.ts +14 -14
- package/node_modules/aws-sdk/clients/transfer.d.ts +8 -8
- package/node_modules/aws-sdk/dist/aws-sdk-core-react-native.js +4 -3
- package/node_modules/aws-sdk/dist/aws-sdk-react-native.js +6 -5
- package/node_modules/aws-sdk/dist/aws-sdk.js +6 -5
- package/node_modules/aws-sdk/dist/aws-sdk.min.js +3 -3
- package/node_modules/aws-sdk/lib/core.js +1 -1
- package/node_modules/aws-sdk/lib/maintenance_mode_message.js +3 -2
- package/node_modules/aws-sdk/package.json +1 -1
- package/package.json +2 -2
@@ -13,27 +13,27 @@ declare class BedrockAgentRuntime extends Service {
|
|
13
13
|
constructor(options?: BedrockAgentRuntime.Types.ClientConfiguration)
|
14
14
|
config: Config & BedrockAgentRuntime.Types.ClientConfiguration;
|
15
15
|
/**
|
16
|
-
*
|
16
|
+
* Sends a prompt for the agent to process and respond to. The CLI doesn't support InvokeAgent. To continue the same conversation with an agent, use the same sessionId value in the request. To activate trace enablement, turn enableTrace to true. Trace enablement helps you follow the agent's reasoning process that led it to the information it processed, the actions it took, and the final result it yielded. For more information, see Trace enablement. End a conversation by setting endSession to true. Include attributes for the session or prompt in the sessionState object. The response is returned in the bytes field of the chunk object. The attribution object contains citations for parts of the response. If you set enableTrace to true in the request, you can trace the agent's steps and reasoning process that led it to the response. Errors are also surfaced in the response.
|
17
17
|
*/
|
18
18
|
invokeAgent(params: BedrockAgentRuntime.Types.InvokeAgentRequest, callback?: (err: AWSError, data: BedrockAgentRuntime.Types.InvokeAgentResponse) => void): Request<BedrockAgentRuntime.Types.InvokeAgentResponse, AWSError>;
|
19
19
|
/**
|
20
|
-
*
|
20
|
+
* Sends a prompt for the agent to process and respond to. The CLI doesn't support InvokeAgent. To continue the same conversation with an agent, use the same sessionId value in the request. To activate trace enablement, turn enableTrace to true. Trace enablement helps you follow the agent's reasoning process that led it to the information it processed, the actions it took, and the final result it yielded. For more information, see Trace enablement. End a conversation by setting endSession to true. Include attributes for the session or prompt in the sessionState object. The response is returned in the bytes field of the chunk object. The attribution object contains citations for parts of the response. If you set enableTrace to true in the request, you can trace the agent's steps and reasoning process that led it to the response. Errors are also surfaced in the response.
|
21
21
|
*/
|
22
22
|
invokeAgent(callback?: (err: AWSError, data: BedrockAgentRuntime.Types.InvokeAgentResponse) => void): Request<BedrockAgentRuntime.Types.InvokeAgentResponse, AWSError>;
|
23
23
|
/**
|
24
|
-
*
|
24
|
+
* Queries a knowledge base and retrieves information from it.
|
25
25
|
*/
|
26
26
|
retrieve(params: BedrockAgentRuntime.Types.RetrieveRequest, callback?: (err: AWSError, data: BedrockAgentRuntime.Types.RetrieveResponse) => void): Request<BedrockAgentRuntime.Types.RetrieveResponse, AWSError>;
|
27
27
|
/**
|
28
|
-
*
|
28
|
+
* Queries a knowledge base and retrieves information from it.
|
29
29
|
*/
|
30
30
|
retrieve(callback?: (err: AWSError, data: BedrockAgentRuntime.Types.RetrieveResponse) => void): Request<BedrockAgentRuntime.Types.RetrieveResponse, AWSError>;
|
31
31
|
/**
|
32
|
-
* RetrieveAndGenerate
|
32
|
+
* Queries a knowledge base and generates responses based on the retrieved results. The response cites up to five sources but only selects the ones that are relevant to the query. The numberOfResults field is currently unsupported for RetrieveAndGenerate. Don't include it in the vectorSearchConfiguration object.
|
33
33
|
*/
|
34
34
|
retrieveAndGenerate(params: BedrockAgentRuntime.Types.RetrieveAndGenerateRequest, callback?: (err: AWSError, data: BedrockAgentRuntime.Types.RetrieveAndGenerateResponse) => void): Request<BedrockAgentRuntime.Types.RetrieveAndGenerateResponse, AWSError>;
|
35
35
|
/**
|
36
|
-
* RetrieveAndGenerate
|
36
|
+
* Queries a knowledge base and generates responses based on the retrieved results. The response cites up to five sources but only selects the ones that are relevant to the query. The numberOfResults field is currently unsupported for RetrieveAndGenerate. Don't include it in the vectorSearchConfiguration object.
|
37
37
|
*/
|
38
38
|
retrieveAndGenerate(callback?: (err: AWSError, data: BedrockAgentRuntime.Types.RetrieveAndGenerateResponse) => void): Request<BedrockAgentRuntime.Types.RetrieveAndGenerateResponse, AWSError>;
|
39
39
|
}
|
@@ -42,13 +42,31 @@ declare namespace BedrockAgentRuntime {
|
|
42
42
|
message?: NonBlankString;
|
43
43
|
}
|
44
44
|
export interface ActionGroupInvocationInput {
|
45
|
+
/**
|
46
|
+
* The name of the action group.
|
47
|
+
*/
|
45
48
|
actionGroupName?: ActionGroupName;
|
46
|
-
|
49
|
+
/**
|
50
|
+
* The path to the API to call, based off the action group.
|
51
|
+
*/
|
47
52
|
apiPath?: ApiPath;
|
53
|
+
/**
|
54
|
+
* The parameters in the Lambda input event.
|
55
|
+
*/
|
48
56
|
parameters?: Parameters;
|
57
|
+
/**
|
58
|
+
* The parameters in the request body for the Lambda input event.
|
59
|
+
*/
|
49
60
|
requestBody?: RequestBody;
|
61
|
+
/**
|
62
|
+
* The API method being used, based off the action group.
|
63
|
+
*/
|
64
|
+
verb?: Verb;
|
50
65
|
}
|
51
66
|
export interface ActionGroupInvocationOutput {
|
67
|
+
/**
|
68
|
+
* The JSON-formatted string returned by the API invoked by the action group.
|
69
|
+
*/
|
52
70
|
text?: ActionGroupOutputString;
|
53
71
|
}
|
54
72
|
export type ActionGroupName = string;
|
@@ -57,16 +75,28 @@ declare namespace BedrockAgentRuntime {
|
|
57
75
|
export type AgentId = string;
|
58
76
|
export type ApiPath = string;
|
59
77
|
export interface Attribution {
|
78
|
+
/**
|
79
|
+
* A list of citations and related information for a part of an agent response.
|
80
|
+
*/
|
60
81
|
citations?: Citations;
|
61
82
|
}
|
62
83
|
export interface BadGatewayException {
|
63
84
|
message?: NonBlankString;
|
85
|
+
/**
|
86
|
+
* The name of the dependency that caused the issue, such as Amazon Bedrock, Lambda, or STS.
|
87
|
+
*/
|
64
88
|
resourceName?: NonBlankString;
|
65
89
|
}
|
66
90
|
export type BedrockModelArn = string;
|
67
91
|
export type Boolean = boolean;
|
68
92
|
export interface Citation {
|
93
|
+
/**
|
94
|
+
* Contains the generated response and metadata
|
95
|
+
*/
|
69
96
|
generatedResponsePart?: GeneratedResponsePart;
|
97
|
+
/**
|
98
|
+
* Contains metadata about the sources cited for the generated response.
|
99
|
+
*/
|
70
100
|
retrievedReferences?: RetrievedReferences;
|
71
101
|
}
|
72
102
|
export type Citations = Citation[];
|
@@ -77,124 +107,193 @@ declare namespace BedrockAgentRuntime {
|
|
77
107
|
export type CreationMode = "DEFAULT"|"OVERRIDDEN"|string;
|
78
108
|
export interface DependencyFailedException {
|
79
109
|
message?: NonBlankString;
|
110
|
+
/**
|
111
|
+
* The name of the dependency that caused the issue, such as Amazon Bedrock, Lambda, or STS.
|
112
|
+
*/
|
80
113
|
resourceName?: NonBlankString;
|
81
114
|
}
|
82
115
|
export type Double = number;
|
83
116
|
export type FailureReasonString = string;
|
84
117
|
export interface FailureTrace {
|
85
|
-
|
118
|
+
/**
|
119
|
+
* The reason the interaction failed.
|
120
|
+
*/
|
86
121
|
failureReason?: FailureReasonString;
|
122
|
+
/**
|
123
|
+
* The unique identifier of the trace.
|
124
|
+
*/
|
125
|
+
traceId?: TraceId;
|
87
126
|
}
|
88
127
|
export interface FinalResponse {
|
128
|
+
/**
|
129
|
+
* The text in the response to the user.
|
130
|
+
*/
|
89
131
|
text?: FinalResponseString;
|
90
132
|
}
|
91
133
|
export type FinalResponseString = string;
|
92
134
|
export interface GeneratedResponsePart {
|
135
|
+
/**
|
136
|
+
* Contains metadata about a textual part of the generated response that is accompanied by a citation.
|
137
|
+
*/
|
93
138
|
textResponsePart?: TextResponsePart;
|
94
139
|
}
|
95
140
|
export interface InferenceConfiguration {
|
96
|
-
|
97
|
-
|
98
|
-
|
141
|
+
/**
|
142
|
+
* The maximum number of tokens allowed in the generated response.
|
143
|
+
*/
|
99
144
|
maximumLength?: MaximumLength;
|
145
|
+
/**
|
146
|
+
* A list of stop sequences. A stop sequence is a sequence of characters that causes the model to stop generating the response.
|
147
|
+
*/
|
100
148
|
stopSequences?: StopSequences;
|
149
|
+
/**
|
150
|
+
* The likelihood of the model selecting higher-probability options while generating a response. A lower value makes the model more likely to choose higher-probability options, while a higher value makes the model more likely to choose lower-probability options.
|
151
|
+
*/
|
152
|
+
temperature?: Temperature;
|
153
|
+
/**
|
154
|
+
* While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for topK is the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set topK to 50, the model selects the next token from among the top 50 most likely choices.
|
155
|
+
*/
|
156
|
+
topK?: TopK;
|
157
|
+
/**
|
158
|
+
* While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for Top P determines the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set topP to 80, the model only selects the next token from the top 80% of the probability distribution of next tokens.
|
159
|
+
*/
|
160
|
+
topP?: TopP;
|
101
161
|
}
|
102
162
|
export type InputText = string;
|
103
163
|
export interface InternalServerException {
|
104
164
|
message?: NonBlankString;
|
105
165
|
}
|
106
166
|
export interface InvocationInput {
|
107
|
-
|
108
|
-
|
167
|
+
/**
|
168
|
+
* Contains information about the action group to be invoked.
|
169
|
+
*/
|
109
170
|
actionGroupInvocationInput?: ActionGroupInvocationInput;
|
171
|
+
/**
|
172
|
+
* Specifies whether the agent is invoking an action group or a knowledge base.
|
173
|
+
*/
|
174
|
+
invocationType?: InvocationType;
|
175
|
+
/**
|
176
|
+
* Contains details about the knowledge base to look up and the query to be made.
|
177
|
+
*/
|
110
178
|
knowledgeBaseLookupInput?: KnowledgeBaseLookupInput;
|
179
|
+
/**
|
180
|
+
* The unique identifier of the trace.
|
181
|
+
*/
|
182
|
+
traceId?: TraceId;
|
111
183
|
}
|
112
184
|
export type InvocationType = "ACTION_GROUP"|"KNOWLEDGE_BASE"|"FINISH"|string;
|
113
185
|
export interface InvokeAgentRequest {
|
114
186
|
/**
|
115
|
-
*
|
187
|
+
* The alias of the agent to use.
|
116
188
|
*/
|
117
|
-
|
189
|
+
agentAliasId: AgentAliasId;
|
118
190
|
/**
|
119
|
-
*
|
191
|
+
* The unique identifier of the agent to use.
|
120
192
|
*/
|
121
193
|
agentId: AgentId;
|
122
194
|
/**
|
123
|
-
*
|
195
|
+
* Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see Trace enablement.
|
124
196
|
*/
|
125
|
-
|
197
|
+
enableTrace?: Boolean;
|
126
198
|
/**
|
127
|
-
*
|
199
|
+
* Specifies whether to end the session with the agent or not.
|
128
200
|
*/
|
129
|
-
|
201
|
+
endSession?: Boolean;
|
130
202
|
/**
|
131
|
-
*
|
203
|
+
* The prompt text to send the agent.
|
132
204
|
*/
|
133
|
-
|
205
|
+
inputText: InputText;
|
134
206
|
/**
|
135
|
-
*
|
207
|
+
* The unique identifier of the session. Use the same value across requests to continue the same conversation.
|
136
208
|
*/
|
137
|
-
|
209
|
+
sessionId: SessionId;
|
138
210
|
/**
|
139
|
-
*
|
211
|
+
* Contains parameters that specify various attributes of the session.
|
140
212
|
*/
|
141
|
-
|
213
|
+
sessionState?: SessionState;
|
142
214
|
}
|
143
215
|
export interface InvokeAgentResponse {
|
144
216
|
/**
|
145
|
-
*
|
217
|
+
* The agent's response to the user prompt.
|
146
218
|
*/
|
147
219
|
completion: ResponseStream;
|
148
220
|
/**
|
149
|
-
*
|
221
|
+
* The MIME type of the input data in the request. The default value is application/json.
|
150
222
|
*/
|
151
223
|
contentType: MimeType;
|
152
224
|
/**
|
153
|
-
*
|
225
|
+
* The unique identifier of the session with the agent.
|
154
226
|
*/
|
155
227
|
sessionId: SessionId;
|
156
228
|
}
|
157
229
|
export type KmsKeyArn = string;
|
158
230
|
export type KnowledgeBaseId = string;
|
159
231
|
export interface KnowledgeBaseLookupInput {
|
160
|
-
|
232
|
+
/**
|
233
|
+
* The unique identifier of the knowledge base to look up.
|
234
|
+
*/
|
161
235
|
knowledgeBaseId?: TraceKnowledgeBaseId;
|
236
|
+
/**
|
237
|
+
* The query made to the knowledge base.
|
238
|
+
*/
|
239
|
+
text?: KnowledgeBaseLookupInputString;
|
162
240
|
}
|
163
241
|
export type KnowledgeBaseLookupInputString = string;
|
164
242
|
export interface KnowledgeBaseLookupOutput {
|
243
|
+
/**
|
244
|
+
* Contains metadata about the sources cited for the generated response.
|
245
|
+
*/
|
165
246
|
retrievedReferences?: RetrievedReferences;
|
166
247
|
}
|
167
248
|
export interface KnowledgeBaseQuery {
|
168
249
|
/**
|
169
|
-
*
|
250
|
+
* The text of the query made to the knowledge base.
|
170
251
|
*/
|
171
252
|
text: KnowledgeBaseQueryTextString;
|
172
253
|
}
|
173
254
|
export type KnowledgeBaseQueryTextString = string;
|
174
255
|
export interface KnowledgeBaseRetrievalConfiguration {
|
256
|
+
/**
|
257
|
+
* Contains details about how the results from the vector search should be returned.
|
258
|
+
*/
|
175
259
|
vectorSearchConfiguration: KnowledgeBaseVectorSearchConfiguration;
|
176
260
|
}
|
177
261
|
export interface KnowledgeBaseRetrievalResult {
|
262
|
+
/**
|
263
|
+
* Contains a chunk of text from a data source in the knowledge base.
|
264
|
+
*/
|
178
265
|
content: RetrievalResultContent;
|
266
|
+
/**
|
267
|
+
* Contains information about the location of the data source.
|
268
|
+
*/
|
179
269
|
location?: RetrievalResultLocation;
|
180
270
|
/**
|
181
|
-
* The relevance
|
271
|
+
* The level of relevance of the result to the query.
|
182
272
|
*/
|
183
273
|
score?: Double;
|
184
274
|
}
|
185
275
|
export type KnowledgeBaseRetrievalResults = KnowledgeBaseRetrievalResult[];
|
186
276
|
export interface KnowledgeBaseRetrieveAndGenerateConfiguration {
|
277
|
+
/**
|
278
|
+
* The unique identifier of the knowledge base that is queried and the foundation model used for generation.
|
279
|
+
*/
|
187
280
|
knowledgeBaseId: KnowledgeBaseId;
|
281
|
+
/**
|
282
|
+
* The ARN of the foundation model used to generate a response.
|
283
|
+
*/
|
188
284
|
modelArn: BedrockModelArn;
|
285
|
+
/**
|
286
|
+
* Contains configurations for how to retrieve and return the knowledge base query.
|
287
|
+
*/
|
189
288
|
retrievalConfiguration?: KnowledgeBaseRetrievalConfiguration;
|
190
289
|
}
|
191
290
|
export interface KnowledgeBaseVectorSearchConfiguration {
|
192
291
|
/**
|
193
|
-
*
|
292
|
+
* The number of results to return. The numberOfResults field is currently unsupported for RetrieveAndGenerate. Don't include it in this field if you are sending a RetrieveAndGenerate request.
|
194
293
|
*/
|
195
294
|
numberOfResults?: KnowledgeBaseVectorSearchConfigurationNumberOfResultsInteger;
|
196
295
|
/**
|
197
|
-
*
|
296
|
+
* By default, Amazon Bedrock decides a search strategy for you. If you're using an Amazon OpenSearch Serverless vector store that contains a filterable text field, you can specify whether to query the knowledge base with a HYBRID search using both vector embeddings and raw text, or SEMANTIC search using only vector embeddings. For other vector store configurations, only SEMANTIC search is available. For more information, see Test a knowledge base.
|
198
297
|
*/
|
199
298
|
overrideSearchType?: SearchType;
|
200
299
|
}
|
@@ -203,163 +302,319 @@ declare namespace BedrockAgentRuntime {
|
|
203
302
|
export type MaximumLength = number;
|
204
303
|
export type MimeType = string;
|
205
304
|
export interface ModelInvocationInput {
|
206
|
-
|
207
|
-
|
208
|
-
|
305
|
+
/**
|
306
|
+
* Specifications about the inference parameters that were provided alongside the prompt. These are specified in the PromptOverrideConfiguration object that was set when the agent was created or updated. For more information, see Inference parameters for foundation models.
|
307
|
+
*/
|
209
308
|
inferenceConfiguration?: InferenceConfiguration;
|
309
|
+
/**
|
310
|
+
* The ARN of the Lambda function to use when parsing the raw foundation model output in parts of the agent sequence.
|
311
|
+
*/
|
210
312
|
overrideLambda?: LambdaArn;
|
211
|
-
|
313
|
+
/**
|
314
|
+
* Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by the promptType.
|
315
|
+
*/
|
212
316
|
parserMode?: CreationMode;
|
317
|
+
/**
|
318
|
+
* Specifies whether the default prompt template was OVERRIDDEN. If it was, the basePromptTemplate that was set in the PromptOverrideConfiguration object when the agent was created or updated is used instead.
|
319
|
+
*/
|
320
|
+
promptCreationMode?: CreationMode;
|
321
|
+
/**
|
322
|
+
* The text that prompted the agent at this step.
|
323
|
+
*/
|
324
|
+
text?: PromptText;
|
325
|
+
/**
|
326
|
+
* The unique identifier of the trace.
|
327
|
+
*/
|
328
|
+
traceId?: TraceId;
|
329
|
+
/**
|
330
|
+
* The step in the agent sequence.
|
331
|
+
*/
|
332
|
+
type?: PromptType;
|
213
333
|
}
|
214
334
|
export type NextToken = string;
|
215
335
|
export type NonBlankString = string;
|
216
336
|
export interface Observation {
|
217
|
-
|
218
|
-
|
337
|
+
/**
|
338
|
+
* Contains the JSON-formatted string returned by the API invoked by the action group.
|
339
|
+
*/
|
219
340
|
actionGroupInvocationOutput?: ActionGroupInvocationOutput;
|
220
|
-
|
341
|
+
/**
|
342
|
+
* Contains details about the response to the user.
|
343
|
+
*/
|
221
344
|
finalResponse?: FinalResponse;
|
345
|
+
/**
|
346
|
+
* Contains details about the results from looking up the knowledge base.
|
347
|
+
*/
|
348
|
+
knowledgeBaseLookupOutput?: KnowledgeBaseLookupOutput;
|
349
|
+
/**
|
350
|
+
* Contains details about the response to reprompt the input.
|
351
|
+
*/
|
222
352
|
repromptResponse?: RepromptResponse;
|
353
|
+
/**
|
354
|
+
* The unique identifier of the trace.
|
355
|
+
*/
|
356
|
+
traceId?: TraceId;
|
357
|
+
/**
|
358
|
+
* Specifies what kind of information the agent returns in the observation. The following values are possible. ACTION_GROUP – The agent returns the result of an action group. KNOWLEDGE_BASE – The agent returns information from a knowledge base. FINISH – The agent returns a final response to the user with no follow-up. ASK_USER – The agent asks the user a question. REPROMPT – The agent prompts the user again for the same information.
|
359
|
+
*/
|
360
|
+
type?: Type;
|
223
361
|
}
|
224
362
|
export interface OrchestrationTrace {
|
225
|
-
|
363
|
+
/**
|
364
|
+
* Contains information pertaining to the action group or knowledge base that is being invoked.
|
365
|
+
*/
|
226
366
|
invocationInput?: InvocationInput;
|
227
|
-
|
367
|
+
/**
|
368
|
+
* The input for the orchestration step. The type is ORCHESTRATION. The text contains the prompt. The inferenceConfiguration, parserMode, and overrideLambda values are set in the PromptOverrideConfiguration object that was set when the agent was created or updated.
|
369
|
+
*/
|
228
370
|
modelInvocationInput?: ModelInvocationInput;
|
371
|
+
/**
|
372
|
+
* Details about the observation (the output of the action group Lambda or knowledge base) made by the agent.
|
373
|
+
*/
|
374
|
+
observation?: Observation;
|
375
|
+
/**
|
376
|
+
* Details about the reasoning, based on the input, that the agent uses to justify carrying out an action group or getting information from a knowledge base.
|
377
|
+
*/
|
378
|
+
rationale?: Rationale;
|
229
379
|
}
|
230
380
|
export type OutputString = string;
|
231
381
|
export interface Parameter {
|
232
382
|
/**
|
233
|
-
*
|
383
|
+
* The name of the parameter.
|
234
384
|
*/
|
235
385
|
name?: String;
|
236
386
|
/**
|
237
|
-
*
|
387
|
+
* The type of the parameter.
|
238
388
|
*/
|
239
389
|
type?: String;
|
240
390
|
/**
|
241
|
-
*
|
391
|
+
* The value of the parameter.
|
242
392
|
*/
|
243
393
|
value?: String;
|
244
394
|
}
|
245
395
|
export type Parameters = Parameter[];
|
246
396
|
export type PartBody = Buffer|Uint8Array|Blob|string;
|
247
397
|
export interface PayloadPart {
|
248
|
-
|
398
|
+
/**
|
399
|
+
* Contains citations for a part of an agent response.
|
400
|
+
*/
|
249
401
|
attribution?: Attribution;
|
402
|
+
/**
|
403
|
+
* A part of the agent response in bytes.
|
404
|
+
*/
|
405
|
+
bytes?: PartBody;
|
250
406
|
}
|
251
407
|
export interface PostProcessingModelInvocationOutput {
|
252
|
-
|
408
|
+
/**
|
409
|
+
* Details about the response from the Lambda parsing of the output of the post-processing step.
|
410
|
+
*/
|
253
411
|
parsedResponse?: PostProcessingParsedResponse;
|
412
|
+
/**
|
413
|
+
* The unique identifier of the trace.
|
414
|
+
*/
|
415
|
+
traceId?: TraceId;
|
254
416
|
}
|
255
417
|
export interface PostProcessingParsedResponse {
|
418
|
+
/**
|
419
|
+
* The text returned by the parser.
|
420
|
+
*/
|
256
421
|
text?: OutputString;
|
257
422
|
}
|
258
423
|
export interface PostProcessingTrace {
|
424
|
+
/**
|
425
|
+
* The input for the post-processing step. The type is POST_PROCESSING. The text contains the prompt. The inferenceConfiguration, parserMode, and overrideLambda values are set in the PromptOverrideConfiguration object that was set when the agent was created or updated.
|
426
|
+
*/
|
259
427
|
modelInvocationInput?: ModelInvocationInput;
|
428
|
+
/**
|
429
|
+
* The foundation model output from the post-processing step.
|
430
|
+
*/
|
260
431
|
modelInvocationOutput?: PostProcessingModelInvocationOutput;
|
261
432
|
}
|
262
433
|
export interface PreProcessingModelInvocationOutput {
|
263
|
-
|
434
|
+
/**
|
435
|
+
* Details about the response from the Lambda parsing of the output of the pre-processing step.
|
436
|
+
*/
|
264
437
|
parsedResponse?: PreProcessingParsedResponse;
|
438
|
+
/**
|
439
|
+
* The unique identifier of the trace.
|
440
|
+
*/
|
441
|
+
traceId?: TraceId;
|
265
442
|
}
|
266
443
|
export interface PreProcessingParsedResponse {
|
267
|
-
rationale?: RationaleString;
|
268
444
|
/**
|
269
|
-
*
|
445
|
+
* Whether the user input is valid or not. If false, the agent doesn't proceed to orchestration.
|
270
446
|
*/
|
271
447
|
isValid?: Boolean;
|
448
|
+
/**
|
449
|
+
* The text returned by the parsing of the pre-processing step, explaining the steps that the agent plans to take in orchestration, if the user input is valid.
|
450
|
+
*/
|
451
|
+
rationale?: RationaleString;
|
272
452
|
}
|
273
453
|
export interface PreProcessingTrace {
|
454
|
+
/**
|
455
|
+
* The input for the pre-processing step. The type is PRE_PROCESSING. The text contains the prompt. The inferenceConfiguration, parserMode, and overrideLambda values are set in the PromptOverrideConfiguration object that was set when the agent was created or updated.
|
456
|
+
*/
|
274
457
|
modelInvocationInput?: ModelInvocationInput;
|
458
|
+
/**
|
459
|
+
* The foundation model output from the pre-processing step.
|
460
|
+
*/
|
275
461
|
modelInvocationOutput?: PreProcessingModelInvocationOutput;
|
276
462
|
}
|
277
463
|
export type PromptSessionAttributesMap = {[key: string]: String};
|
278
464
|
export type PromptText = string;
|
279
465
|
export type PromptType = "PRE_PROCESSING"|"ORCHESTRATION"|"KNOWLEDGE_BASE_RESPONSE_GENERATION"|"POST_PROCESSING"|string;
|
280
466
|
export interface Rationale {
|
281
|
-
|
467
|
+
/**
|
468
|
+
* The reasoning or thought process of the agent, based on the input.
|
469
|
+
*/
|
282
470
|
text?: RationaleString;
|
471
|
+
/**
|
472
|
+
* The unique identifier of the trace step.
|
473
|
+
*/
|
474
|
+
traceId?: TraceId;
|
283
475
|
}
|
284
476
|
export type RationaleString = string;
|
285
477
|
export interface RepromptResponse {
|
286
478
|
/**
|
287
|
-
*
|
479
|
+
* Specifies what output is prompting the agent to reprompt the input.
|
288
480
|
*/
|
289
|
-
text?: String;
|
290
481
|
source?: Source;
|
482
|
+
/**
|
483
|
+
* The text reprompting the input.
|
484
|
+
*/
|
485
|
+
text?: String;
|
291
486
|
}
|
292
487
|
export interface RequestBody {
|
488
|
+
/**
|
489
|
+
* The content in the request body.
|
490
|
+
*/
|
293
491
|
content?: ContentMap;
|
294
492
|
}
|
295
493
|
export interface ResourceNotFoundException {
|
296
494
|
message?: NonBlankString;
|
297
495
|
}
|
298
|
-
export type ResponseStream = EventStream<{chunk?:PayloadPart,
|
496
|
+
export type ResponseStream = EventStream<{accessDeniedException?:AccessDeniedException,badGatewayException?:BadGatewayException,chunk?:PayloadPart,conflictException?:ConflictException,dependencyFailedException?:DependencyFailedException,internalServerException?:InternalServerException,resourceNotFoundException?:ResourceNotFoundException,serviceQuotaExceededException?:ServiceQuotaExceededException,throttlingException?:ThrottlingException,trace?:TracePart,validationException?:ValidationException}>;
|
299
497
|
export interface RetrievalResultContent {
|
300
498
|
/**
|
301
|
-
*
|
499
|
+
* The cited text from the data source.
|
302
500
|
*/
|
303
501
|
text: String;
|
304
502
|
}
|
305
503
|
export interface RetrievalResultLocation {
|
306
|
-
|
504
|
+
/**
|
505
|
+
* Contains the S3 location of the data source.
|
506
|
+
*/
|
307
507
|
s3Location?: RetrievalResultS3Location;
|
508
|
+
/**
|
509
|
+
* The type of the location of the data source.
|
510
|
+
*/
|
511
|
+
type: RetrievalResultLocationType;
|
308
512
|
}
|
309
513
|
export type RetrievalResultLocationType = "S3"|string;
|
310
514
|
export interface RetrievalResultS3Location {
|
311
515
|
/**
|
312
|
-
* URI of
|
516
|
+
* The S3 URI of the data source.
|
313
517
|
*/
|
314
518
|
uri?: String;
|
315
519
|
}
|
316
520
|
export interface RetrieveAndGenerateConfiguration {
|
317
|
-
|
521
|
+
/**
|
522
|
+
* Contains details about the resource being queried.
|
523
|
+
*/
|
318
524
|
knowledgeBaseConfiguration?: KnowledgeBaseRetrieveAndGenerateConfiguration;
|
525
|
+
/**
|
526
|
+
* The type of resource that is queried by the request.
|
527
|
+
*/
|
528
|
+
type: RetrieveAndGenerateType;
|
319
529
|
}
|
320
530
|
export interface RetrieveAndGenerateInput {
|
321
531
|
/**
|
322
|
-
*
|
532
|
+
* The query made to the knowledge base.
|
323
533
|
*/
|
324
534
|
text: RetrieveAndGenerateInputTextString;
|
325
535
|
}
|
326
536
|
export type RetrieveAndGenerateInputTextString = string;
|
327
537
|
export interface RetrieveAndGenerateOutput {
|
328
538
|
/**
|
329
|
-
*
|
539
|
+
* The response generated from querying the knowledge base.
|
330
540
|
*/
|
331
541
|
text: String;
|
332
542
|
}
|
333
543
|
export interface RetrieveAndGenerateRequest {
|
334
|
-
|
544
|
+
/**
|
545
|
+
* Contains the query made to the knowledge base.
|
546
|
+
*/
|
335
547
|
input: RetrieveAndGenerateInput;
|
548
|
+
/**
|
549
|
+
* Contains details about the resource being queried and the foundation model used for generation.
|
550
|
+
*/
|
336
551
|
retrieveAndGenerateConfiguration?: RetrieveAndGenerateConfiguration;
|
552
|
+
/**
|
553
|
+
* Contains details about the session with the knowledge base.
|
554
|
+
*/
|
337
555
|
sessionConfiguration?: RetrieveAndGenerateSessionConfiguration;
|
556
|
+
/**
|
557
|
+
* The unique identifier of the session. Reuse the same value to continue the same session with the knowledge base.
|
558
|
+
*/
|
559
|
+
sessionId?: SessionId;
|
338
560
|
}
|
339
561
|
export interface RetrieveAndGenerateResponse {
|
340
|
-
|
341
|
-
|
562
|
+
/**
|
563
|
+
* A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.
|
564
|
+
*/
|
342
565
|
citations?: Citations;
|
566
|
+
/**
|
567
|
+
* Contains the response generated from querying the knowledge base.
|
568
|
+
*/
|
569
|
+
output: RetrieveAndGenerateOutput;
|
570
|
+
/**
|
571
|
+
* The unique identifier of the session. Reuse the same value to continue the same session with the knowledge base.
|
572
|
+
*/
|
573
|
+
sessionId: SessionId;
|
343
574
|
}
|
344
575
|
export interface RetrieveAndGenerateSessionConfiguration {
|
345
576
|
/**
|
346
|
-
* The
|
577
|
+
* The ARN of the KMS key encrypting the session.
|
347
578
|
*/
|
348
579
|
kmsKeyArn: KmsKeyArn;
|
349
580
|
}
|
350
581
|
export type RetrieveAndGenerateType = "KNOWLEDGE_BASE"|string;
|
351
582
|
export interface RetrieveRequest {
|
583
|
+
/**
|
584
|
+
* The unique identifier of the knowledge base to query.
|
585
|
+
*/
|
352
586
|
knowledgeBaseId: KnowledgeBaseId;
|
353
|
-
|
354
|
-
|
587
|
+
/**
|
588
|
+
* If there are more results than can fit in the response, the response returns a nextToken. Use this token in the nextToken field of another request to retrieve the next batch of results.
|
589
|
+
*/
|
355
590
|
nextToken?: NextToken;
|
591
|
+
/**
|
592
|
+
* Contains details about how the results should be returned.
|
593
|
+
*/
|
594
|
+
retrievalConfiguration?: KnowledgeBaseRetrievalConfiguration;
|
595
|
+
/**
|
596
|
+
* The query to send the knowledge base.
|
597
|
+
*/
|
598
|
+
retrievalQuery: KnowledgeBaseQuery;
|
356
599
|
}
|
357
600
|
export interface RetrieveResponse {
|
358
|
-
|
601
|
+
/**
|
602
|
+
* If there are more results than can fit in the response, the response returns a nextToken. Use this token in the nextToken field of another request to retrieve the next batch of results.
|
603
|
+
*/
|
359
604
|
nextToken?: NextToken;
|
605
|
+
/**
|
606
|
+
* A list of results from querying the knowledge base.
|
607
|
+
*/
|
608
|
+
retrievalResults: KnowledgeBaseRetrievalResults;
|
360
609
|
}
|
361
610
|
export interface RetrievedReference {
|
611
|
+
/**
|
612
|
+
* Contains the cited text from the data source.
|
613
|
+
*/
|
362
614
|
content?: RetrievalResultContent;
|
615
|
+
/**
|
616
|
+
* Contains information about the location of the data source.
|
617
|
+
*/
|
363
618
|
location?: RetrievalResultLocation;
|
364
619
|
}
|
365
620
|
export type RetrievedReferences = RetrievedReference[];
|
@@ -371,24 +626,24 @@ declare namespace BedrockAgentRuntime {
|
|
371
626
|
export type SessionId = string;
|
372
627
|
export interface SessionState {
|
373
628
|
/**
|
374
|
-
*
|
629
|
+
* Contains attributes that persist across a prompt and the values of those attributes. These attributes replace the $prompt_session_attributes$ placeholder variable in the orchestration prompt template. For more information, see Prompt template placeholder variables.
|
375
630
|
*/
|
376
|
-
|
631
|
+
promptSessionAttributes?: PromptSessionAttributesMap;
|
377
632
|
/**
|
378
|
-
*
|
633
|
+
* Contains attributes that persist across a session and the values of those attributes.
|
379
634
|
*/
|
380
|
-
|
635
|
+
sessionAttributes?: SessionAttributesMap;
|
381
636
|
}
|
382
637
|
export type Source = "ACTION_GROUP"|"KNOWLEDGE_BASE"|"PARSER"|string;
|
383
638
|
export interface Span {
|
384
639
|
/**
|
385
|
-
*
|
640
|
+
* Where the text with a citation ends in the generated output.
|
386
641
|
*/
|
387
|
-
|
642
|
+
end?: SpanEndInteger;
|
388
643
|
/**
|
389
|
-
*
|
644
|
+
* Where the text with a citation starts in the generated output.
|
390
645
|
*/
|
391
|
-
|
646
|
+
start?: SpanStartInteger;
|
392
647
|
}
|
393
648
|
export type SpanEndInteger = number;
|
394
649
|
export type SpanStartInteger = number;
|
@@ -397,10 +652,13 @@ declare namespace BedrockAgentRuntime {
|
|
397
652
|
export type Temperature = number;
|
398
653
|
export interface TextResponsePart {
|
399
654
|
/**
|
400
|
-
*
|
655
|
+
* Contains information about where the text with a citation begins and ends in the generated output.
|
401
656
|
*/
|
402
|
-
text?: String;
|
403
657
|
span?: Span;
|
658
|
+
/**
|
659
|
+
* The part of the generated text that contains a citation.
|
660
|
+
*/
|
661
|
+
text?: String;
|
404
662
|
}
|
405
663
|
export interface ThrottlingException {
|
406
664
|
message?: NonBlankString;
|
@@ -408,17 +666,41 @@ declare namespace BedrockAgentRuntime {
|
|
408
666
|
export type TopK = number;
|
409
667
|
export type TopP = number;
|
410
668
|
export interface Trace {
|
411
|
-
|
669
|
+
/**
|
670
|
+
* Contains information about the failure of the interaction.
|
671
|
+
*/
|
672
|
+
failureTrace?: FailureTrace;
|
673
|
+
/**
|
674
|
+
* Details about the orchestration step, in which the agent determines the order in which actions are executed and which knowledge bases are retrieved.
|
675
|
+
*/
|
412
676
|
orchestrationTrace?: OrchestrationTrace;
|
677
|
+
/**
|
678
|
+
* Details about the post-processing step, in which the agent shapes the response..
|
679
|
+
*/
|
413
680
|
postProcessingTrace?: PostProcessingTrace;
|
414
|
-
|
681
|
+
/**
|
682
|
+
* Details about the pre-processing step, in which the agent contextualizes and categorizes user inputs.
|
683
|
+
*/
|
684
|
+
preProcessingTrace?: PreProcessingTrace;
|
415
685
|
}
|
416
686
|
export type TraceId = string;
|
417
687
|
export type TraceKnowledgeBaseId = string;
|
418
688
|
export interface TracePart {
|
419
|
-
|
689
|
+
/**
|
690
|
+
* The unique identifier of the alias of the agent.
|
691
|
+
*/
|
420
692
|
agentAliasId?: AgentAliasId;
|
693
|
+
/**
|
694
|
+
* The unique identifier of the agent.
|
695
|
+
*/
|
696
|
+
agentId?: AgentId;
|
697
|
+
/**
|
698
|
+
* The unique identifier of the session with the agent.
|
699
|
+
*/
|
421
700
|
sessionId?: SessionId;
|
701
|
+
/**
|
702
|
+
* Contains one part of the agent's reasoning process and results from calling API actions and querying knowledge bases. You can use the trace to understand how the agent arrived at the response it provided the customer. For more information, see Trace enablement.
|
703
|
+
*/
|
422
704
|
trace?: Trace;
|
423
705
|
}
|
424
706
|
export type Type = "ACTION_GROUP"|"KNOWLEDGE_BASE"|"FINISH"|"ASK_USER"|"REPROMPT"|string;
|