@aws-sdk/client-bedrock-agent-runtime 3.896.0 → 3.899.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.
- package/dist-cjs/index.js +804 -621
- package/dist-es/commands/RetrieveAndGenerateCommand.js +1 -2
- package/dist-es/models/models_0.js +662 -625
- package/dist-es/models/models_1.js +53 -1
- package/dist-es/protocols/Aws_restJson1.js +78 -0
- package/dist-types/commands/InvokeFlowCommand.d.ts +773 -0
- package/dist-types/commands/ListFlowExecutionEventsCommand.d.ts +780 -0
- package/dist-types/commands/RetrieveAndGenerateCommand.d.ts +1 -2
- package/dist-types/models/models_0.d.ts +2963 -2757
- package/dist-types/models/models_1.d.ts +272 -1
- package/dist-types/ts3.4/commands/RetrieveAndGenerateCommand.d.ts +4 -2
- package/dist-types/ts3.4/models/models_0.d.ts +1871 -1756
- package/dist-types/ts3.4/models/models_1.d.ts +102 -8
- package/package.json +11 -11
|
@@ -1,5 +1,248 @@
|
|
|
1
1
|
import { DocumentType as __DocumentType } from "@smithy/types";
|
|
2
|
-
import { AccessDeniedException, AgentActionGroup, AgentCollaboration, BadGatewayException, BedrockModelConfigurations,
|
|
2
|
+
import { AccessDeniedException, AgentActionGroup, AgentCollaboration, BadGatewayException, BedrockModelConfigurations, ByteContentDoc, Citation, CollaboratorConfiguration, ConflictException, ConversationHistory, CustomOrchestration, DependencyFailedException, ExternalSourcesGenerationConfiguration, FilterAttribute, GeneratedResponsePart, GuardrailConfiguration, GuardrailConfigurationWithArn, ImplicitFilterConfiguration, InferenceConfig, InlineBedrockModelConfigurations, InlineSessionState, InputFile, InternalServerException, InvocationResultMember, OrchestrationType, PerformanceConfiguration, PromptCreationConfigurations, PromptOverrideConfiguration, PromptTemplate, ResourceNotFoundException, RetrievalResultContent, RetrievalResultLocation, RetrieveAndGenerateInput, RetrievedReference, S3ObjectDoc, SearchType, ServiceQuotaExceededException, StreamingConfigurations, ThrottlingException, ValidationException, VectorSearchRerankingConfiguration } from "./models_0";
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
* @enum
|
|
6
|
+
*/
|
|
7
|
+
export declare const ExternalSourceType: {
|
|
8
|
+
readonly BYTE_CONTENT: "BYTE_CONTENT";
|
|
9
|
+
readonly S3: "S3";
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export type ExternalSourceType = (typeof ExternalSourceType)[keyof typeof ExternalSourceType];
|
|
15
|
+
/**
|
|
16
|
+
* <p>The unique external source of the content contained in the wrapper object.</p>
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export interface ExternalSource {
|
|
20
|
+
/**
|
|
21
|
+
* <p>The source type of the external source wrapper object.</p>
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
sourceType: ExternalSourceType | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* <p>The S3 location of the external source wrapper object.</p>
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
s3Location?: S3ObjectDoc | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* <p>The identifier, contentType, and data of the external source wrapper object.</p>
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
byteContent?: ByteContentDoc | undefined;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* <p>The configurations of the external source wrapper object in the <code>retrieveAndGenerate</code> function.</p>
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
export interface ExternalSourcesRetrieveAndGenerateConfiguration {
|
|
41
|
+
/**
|
|
42
|
+
* <p>The model Amazon Resource Name (ARN) for the external source wrapper object in the <code>retrieveAndGenerate</code> function.</p>
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
modelArn: string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* <p>The document for the external source wrapper object in the <code>retrieveAndGenerate</code> function.</p>
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
sources: ExternalSource[] | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* <p>The prompt used with the external source wrapper object with the <code>retrieveAndGenerate</code> function.</p>
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
generationConfiguration?: ExternalSourcesGenerationConfiguration | undefined;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* <p>Contains configurations for response generation based on the knowledge base query results.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax">RetrieveAndGenerate request</a> </p> </li> </ul>
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
export interface GenerationConfiguration {
|
|
62
|
+
/**
|
|
63
|
+
* <p>Contains the template for the prompt that's sent to the model for response generation. Generation prompts must include the <code>$search_results$</code> variable. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html">Use placeholder variables</a> in the user guide.</p>
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
promptTemplate?: PromptTemplate | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* <p>The configuration details for the guardrail.</p>
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
guardrailConfiguration?: GuardrailConfiguration | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* <p> Configuration settings for inference when using RetrieveAndGenerate to generate responses while using a knowledge base as a source. </p>
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
inferenceConfig?: InferenceConfig | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* <p> Additional model parameters and corresponding values not included in the textInferenceConfig structure for a knowledge base. This allows users to provide custom model parameters specific to the language model being used. </p>
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
additionalModelRequestFields?: Record<string, __DocumentType> | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* <p>The latency configuration for the model.</p>
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
86
|
+
performanceConfig?: PerformanceConfiguration | undefined;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* @public
|
|
90
|
+
* @enum
|
|
91
|
+
*/
|
|
92
|
+
export declare const QueryTransformationType: {
|
|
93
|
+
readonly QUERY_DECOMPOSITION: "QUERY_DECOMPOSITION";
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
export type QueryTransformationType = (typeof QueryTransformationType)[keyof typeof QueryTransformationType];
|
|
99
|
+
/**
|
|
100
|
+
* <p>To split up the prompt and retrieve multiple sources, set the transformation type to <code>QUERY_DECOMPOSITION</code>.</p>
|
|
101
|
+
* @public
|
|
102
|
+
*/
|
|
103
|
+
export interface QueryTransformationConfiguration {
|
|
104
|
+
/**
|
|
105
|
+
* <p>The type of transformation to apply to the prompt.</p>
|
|
106
|
+
* @public
|
|
107
|
+
*/
|
|
108
|
+
type: QueryTransformationType | undefined;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* <p>Settings for how the model processes the prompt prior to retrieval and generation.</p>
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
export interface OrchestrationConfiguration {
|
|
115
|
+
/**
|
|
116
|
+
* <p>Contains the template for the prompt that's sent to the model. Orchestration prompts must include the <code>$conversation_history$</code> and <code>$output_format_instructions$</code> variables. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html">Use placeholder variables</a> in the user guide.</p>
|
|
117
|
+
* @public
|
|
118
|
+
*/
|
|
119
|
+
promptTemplate?: PromptTemplate | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* <p> Configuration settings for inference when using RetrieveAndGenerate to generate responses while using a knowledge base as a source. </p>
|
|
122
|
+
* @public
|
|
123
|
+
*/
|
|
124
|
+
inferenceConfig?: InferenceConfig | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* <p> Additional model parameters and corresponding values not included in the textInferenceConfig structure for a knowledge base. This allows users to provide custom model parameters specific to the language model being used. </p>
|
|
127
|
+
* @public
|
|
128
|
+
*/
|
|
129
|
+
additionalModelRequestFields?: Record<string, __DocumentType> | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* <p>To split up the prompt and retrieve multiple sources, set the transformation type to <code>QUERY_DECOMPOSITION</code>.</p>
|
|
132
|
+
* @public
|
|
133
|
+
*/
|
|
134
|
+
queryTransformationConfiguration?: QueryTransformationConfiguration | undefined;
|
|
135
|
+
/**
|
|
136
|
+
* <p>The latency configuration for the model.</p>
|
|
137
|
+
* @public
|
|
138
|
+
*/
|
|
139
|
+
performanceConfig?: PerformanceConfiguration | undefined;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* @public
|
|
143
|
+
* @enum
|
|
144
|
+
*/
|
|
145
|
+
export declare const RetrieveAndGenerateType: {
|
|
146
|
+
readonly EXTERNAL_SOURCES: "EXTERNAL_SOURCES";
|
|
147
|
+
readonly KNOWLEDGE_BASE: "KNOWLEDGE_BASE";
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* @public
|
|
151
|
+
*/
|
|
152
|
+
export type RetrieveAndGenerateType = (typeof RetrieveAndGenerateType)[keyof typeof RetrieveAndGenerateType];
|
|
153
|
+
/**
|
|
154
|
+
* <p>Contains configuration about the session with the knowledge base.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax">RetrieveAndGenerate request</a> – in the <code>sessionConfiguration</code> field</p> </li> </ul>
|
|
155
|
+
* @public
|
|
156
|
+
*/
|
|
157
|
+
export interface RetrieveAndGenerateSessionConfiguration {
|
|
158
|
+
/**
|
|
159
|
+
* <p>The ARN of the KMS key encrypting the session.</p>
|
|
160
|
+
* @public
|
|
161
|
+
*/
|
|
162
|
+
kmsKeyArn: string | undefined;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* @public
|
|
166
|
+
* @enum
|
|
167
|
+
*/
|
|
168
|
+
export declare const GuadrailAction: {
|
|
169
|
+
readonly INTERVENED: "INTERVENED";
|
|
170
|
+
readonly NONE: "NONE";
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* @public
|
|
174
|
+
*/
|
|
175
|
+
export type GuadrailAction = (typeof GuadrailAction)[keyof typeof GuadrailAction];
|
|
176
|
+
/**
|
|
177
|
+
* <p>Contains the response generated from querying the knowledge base.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_ResponseSyntax">RetrieveAndGenerate response</a> – in the <code>output</code> field</p> </li> </ul>
|
|
178
|
+
* @public
|
|
179
|
+
*/
|
|
180
|
+
export interface RetrieveAndGenerateOutput {
|
|
181
|
+
/**
|
|
182
|
+
* <p>The response generated from querying the knowledge base.</p>
|
|
183
|
+
* @public
|
|
184
|
+
*/
|
|
185
|
+
text: string | undefined;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* @public
|
|
189
|
+
*/
|
|
190
|
+
export interface RetrieveAndGenerateResponse {
|
|
191
|
+
/**
|
|
192
|
+
* <p>The unique identifier of the session. When you first make a <code>RetrieveAndGenerate</code> request, Amazon Bedrock automatically generates this value. You must reuse this value for all subsequent requests in the same conversational session. This value allows Amazon Bedrock to maintain context and knowledge from previous interactions. You can't explicitly set the <code>sessionId</code> yourself.</p>
|
|
193
|
+
* @public
|
|
194
|
+
*/
|
|
195
|
+
sessionId: string | undefined;
|
|
196
|
+
/**
|
|
197
|
+
* <p>Contains the response generated from querying the knowledge base.</p>
|
|
198
|
+
* @public
|
|
199
|
+
*/
|
|
200
|
+
output: RetrieveAndGenerateOutput | undefined;
|
|
201
|
+
/**
|
|
202
|
+
* <p>A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.</p>
|
|
203
|
+
* @public
|
|
204
|
+
*/
|
|
205
|
+
citations?: Citation[] | undefined;
|
|
206
|
+
/**
|
|
207
|
+
* <p>Specifies if there is a guardrail intervention in the response.</p>
|
|
208
|
+
* @public
|
|
209
|
+
*/
|
|
210
|
+
guardrailAction?: GuadrailAction | undefined;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* <p>A citation event.</p>
|
|
214
|
+
* @public
|
|
215
|
+
*/
|
|
216
|
+
export interface CitationEvent {
|
|
217
|
+
/**
|
|
218
|
+
* <p>The citation.</p>
|
|
219
|
+
*
|
|
220
|
+
* @deprecated
|
|
221
|
+
* @public
|
|
222
|
+
*/
|
|
223
|
+
citation?: Citation | undefined;
|
|
224
|
+
/**
|
|
225
|
+
* <p>The generated response to the citation event.</p>
|
|
226
|
+
* @public
|
|
227
|
+
*/
|
|
228
|
+
generatedResponsePart?: GeneratedResponsePart | undefined;
|
|
229
|
+
/**
|
|
230
|
+
* <p>The retrieved references of the citation event.</p>
|
|
231
|
+
* @public
|
|
232
|
+
*/
|
|
233
|
+
retrievedReferences?: RetrievedReference[] | undefined;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* <p>A guardrail event.</p>
|
|
237
|
+
* @public
|
|
238
|
+
*/
|
|
239
|
+
export interface GuardrailEvent {
|
|
240
|
+
/**
|
|
241
|
+
* <p>The guardrail action.</p>
|
|
242
|
+
* @public
|
|
243
|
+
*/
|
|
244
|
+
action?: GuadrailAction | undefined;
|
|
245
|
+
}
|
|
3
246
|
/**
|
|
4
247
|
* <p>A retrieve and generate output event.</p>
|
|
5
248
|
* @public
|
|
@@ -1891,6 +2134,34 @@ export interface InvokeInlineAgentRequest {
|
|
|
1891
2134
|
*/
|
|
1892
2135
|
customOrchestration?: CustomOrchestration | undefined;
|
|
1893
2136
|
}
|
|
2137
|
+
/**
|
|
2138
|
+
* @internal
|
|
2139
|
+
*/
|
|
2140
|
+
export declare const ExternalSourceFilterSensitiveLog: (obj: ExternalSource) => any;
|
|
2141
|
+
/**
|
|
2142
|
+
* @internal
|
|
2143
|
+
*/
|
|
2144
|
+
export declare const ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog: (obj: ExternalSourcesRetrieveAndGenerateConfiguration) => any;
|
|
2145
|
+
/**
|
|
2146
|
+
* @internal
|
|
2147
|
+
*/
|
|
2148
|
+
export declare const GenerationConfigurationFilterSensitiveLog: (obj: GenerationConfiguration) => any;
|
|
2149
|
+
/**
|
|
2150
|
+
* @internal
|
|
2151
|
+
*/
|
|
2152
|
+
export declare const OrchestrationConfigurationFilterSensitiveLog: (obj: OrchestrationConfiguration) => any;
|
|
2153
|
+
/**
|
|
2154
|
+
* @internal
|
|
2155
|
+
*/
|
|
2156
|
+
export declare const RetrieveAndGenerateOutputFilterSensitiveLog: (obj: RetrieveAndGenerateOutput) => any;
|
|
2157
|
+
/**
|
|
2158
|
+
* @internal
|
|
2159
|
+
*/
|
|
2160
|
+
export declare const RetrieveAndGenerateResponseFilterSensitiveLog: (obj: RetrieveAndGenerateResponse) => any;
|
|
2161
|
+
/**
|
|
2162
|
+
* @internal
|
|
2163
|
+
*/
|
|
2164
|
+
export declare const CitationEventFilterSensitiveLog: (obj: CitationEvent) => any;
|
|
1894
2165
|
/**
|
|
1895
2166
|
* @internal
|
|
1896
2167
|
*/
|
|
@@ -5,8 +5,10 @@ import {
|
|
|
5
5
|
ServiceInputTypes,
|
|
6
6
|
ServiceOutputTypes,
|
|
7
7
|
} from "../BedrockAgentRuntimeClient";
|
|
8
|
-
import {
|
|
9
|
-
|
|
8
|
+
import {
|
|
9
|
+
RetrieveAndGenerateRequest,
|
|
10
|
+
RetrieveAndGenerateResponse,
|
|
11
|
+
} from "../models/models_1";
|
|
10
12
|
export { __MetadataBearer };
|
|
11
13
|
export { $Command };
|
|
12
14
|
export interface RetrieveAndGenerateCommandInput
|