@aws-sdk/client-bedrock-agent-runtime 3.755.0 → 3.758.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/README.md +119 -7
- package/dist-cjs/index.js +941 -56
- package/dist-es/BedrockAgentRuntime.js +28 -0
- package/dist-es/commands/CreateInvocationCommand.js +22 -0
- package/dist-es/commands/CreateSessionCommand.js +22 -0
- package/dist-es/commands/DeleteSessionCommand.js +22 -0
- package/dist-es/commands/EndSessionCommand.js +22 -0
- package/dist-es/commands/GetInvocationStepCommand.js +23 -0
- package/dist-es/commands/GetSessionCommand.js +22 -0
- package/dist-es/commands/InvokeAgentCommand.js +2 -1
- package/dist-es/commands/InvokeInlineAgentCommand.js +2 -1
- package/dist-es/commands/ListInvocationStepsCommand.js +22 -0
- package/dist-es/commands/ListInvocationsCommand.js +22 -0
- package/dist-es/commands/ListSessionsCommand.js +22 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +22 -0
- package/dist-es/commands/PutInvocationStepCommand.js +23 -0
- package/dist-es/commands/RetrieveAndGenerateCommand.js +2 -1
- package/dist-es/commands/RetrieveAndGenerateStreamCommand.js +2 -1
- package/dist-es/commands/RetrieveCommand.js +2 -1
- package/dist-es/commands/TagResourceCommand.js +22 -0
- package/dist-es/commands/UntagResourceCommand.js +22 -0
- package/dist-es/commands/UpdateSessionCommand.js +22 -0
- package/dist-es/commands/index.js +14 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +54 -151
- package/dist-es/models/models_1.js +164 -0
- package/dist-es/pagination/ListInvocationStepsPaginator.js +4 -0
- package/dist-es/pagination/ListInvocationsPaginator.js +4 -0
- package/dist-es/pagination/ListSessionsPaginator.js +4 -0
- package/dist-es/pagination/index.js +3 -0
- package/dist-es/protocols/Aws_restJson1.js +532 -8
- package/dist-types/BedrockAgentRuntime.d.ts +100 -0
- package/dist-types/BedrockAgentRuntimeClient.d.ts +16 -2
- package/dist-types/commands/CreateInvocationCommand.d.ts +115 -0
- package/dist-types/commands/CreateSessionCommand.d.ts +133 -0
- package/dist-types/commands/DeleteSessionCommand.d.ts +89 -0
- package/dist-types/commands/EndSessionCommand.d.ts +93 -0
- package/dist-types/commands/GetInvocationStepCommand.d.ts +109 -0
- package/dist-types/commands/GetSessionCommand.d.ts +94 -0
- package/dist-types/commands/InvokeAgentCommand.d.ts +2 -1
- package/dist-types/commands/InvokeInlineAgentCommand.d.ts +2 -1
- package/dist-types/commands/ListInvocationStepsCommand.d.ts +97 -0
- package/dist-types/commands/ListInvocationsCommand.d.ts +95 -0
- package/dist-types/commands/ListSessionsCommand.d.ts +93 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +88 -0
- package/dist-types/commands/PutInvocationStepCommand.d.ts +134 -0
- package/dist-types/commands/RetrieveAndGenerateCommand.d.ts +2 -1
- package/dist-types/commands/RetrieveAndGenerateStreamCommand.d.ts +2 -1
- package/dist-types/commands/RetrieveCommand.d.ts +2 -1
- package/dist-types/commands/TagResourceCommand.d.ts +90 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +87 -0
- package/dist-types/commands/UpdateSessionCommand.d.ts +96 -0
- package/dist-types/commands/index.d.ts +14 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +494 -634
- package/dist-types/models/models_1.d.ts +919 -0
- package/dist-types/pagination/ListInvocationStepsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListInvocationsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListSessionsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +3 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +126 -0
- package/dist-types/ts3.4/BedrockAgentRuntime.d.ts +240 -0
- package/dist-types/ts3.4/BedrockAgentRuntimeClient.d.ts +86 -2
- package/dist-types/ts3.4/commands/CreateInvocationCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/CreateSessionCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/DeleteSessionCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/EndSessionCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/GetInvocationStepCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetSessionCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/InvokeAgentCommand.d.ts +2 -1
- package/dist-types/ts3.4/commands/InvokeInlineAgentCommand.d.ts +2 -4
- package/dist-types/ts3.4/commands/ListInvocationStepsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListInvocationsCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/ListSessionsCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/PutInvocationStepCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/RetrieveAndGenerateCommand.d.ts +2 -4
- package/dist-types/ts3.4/commands/RetrieveAndGenerateStreamCommand.d.ts +2 -4
- package/dist-types/ts3.4/commands/RetrieveCommand.d.ts +2 -1
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/UpdateSessionCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/index.d.ts +14 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +222 -365
- package/dist-types/ts3.4/models/models_1.d.ts +416 -0
- package/dist-types/ts3.4/pagination/ListInvocationStepsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListInvocationsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListSessionsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +3 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +168 -0
- package/package.json +12 -12
|
@@ -0,0 +1,919 @@
|
|
|
1
|
+
import { AgentActionGroup, BedrockModelConfigurations, ConversationHistory, ExternalSourcesRetrieveAndGenerateConfiguration, FilterAttribute, GenerationConfiguration, GuardrailConfiguration, GuardrailConfigurationWithArn, ImplicitFilterConfiguration, InlineBedrockModelConfigurations, InlineSessionState, InputFile, InvocationResultMember, KnowledgeBaseQuery, OrchestrationConfiguration, PromptOverrideConfiguration, RetrieveAndGenerateInput, RetrieveAndGenerateSessionConfiguration, RetrieveAndGenerateType, SearchType, StreamingConfigurations, VectorSearchRerankingConfiguration } from "./models_0";
|
|
2
|
+
/**
|
|
3
|
+
* <p>Specifies the filters to use on the metadata attributes in the knowledge base data sources before returning results. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>. See the examples below to see how to use these filters.</p>
|
|
4
|
+
* <p>This data type is used in the following API operations:</p>
|
|
5
|
+
* <ul>
|
|
6
|
+
* <li>
|
|
7
|
+
* <p>
|
|
8
|
+
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax">Retrieve request</a> – in the <code>filter</code> field</p>
|
|
9
|
+
* </li>
|
|
10
|
+
* <li>
|
|
11
|
+
* <p>
|
|
12
|
+
* <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>filter</code> field</p>
|
|
13
|
+
* </li>
|
|
14
|
+
* </ul>
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export type RetrievalFilter = RetrievalFilter.AndAllMember | RetrievalFilter.EqualsMember | RetrievalFilter.GreaterThanMember | RetrievalFilter.GreaterThanOrEqualsMember | RetrievalFilter.InMember | RetrievalFilter.LessThanMember | RetrievalFilter.LessThanOrEqualsMember | RetrievalFilter.ListContainsMember | RetrievalFilter.NotEqualsMember | RetrievalFilter.NotInMember | RetrievalFilter.OrAllMember | RetrievalFilter.StartsWithMember | RetrievalFilter.StringContainsMember | RetrievalFilter.$UnknownMember;
|
|
18
|
+
/**
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare namespace RetrievalFilter {
|
|
22
|
+
/**
|
|
23
|
+
* <p>Knowledge base data sources are returned if they contain a metadata attribute whose name matches the <code>key</code> and whose value matches the <code>value</code> in this object.</p>
|
|
24
|
+
* <p>The following example would return data sources with an <code>animal</code> attribute whose value is <code>cat</code>:</p>
|
|
25
|
+
* <p>
|
|
26
|
+
* <code>"equals": \{ "key": "animal", "value": "cat" \}</code>
|
|
27
|
+
* </p>
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
interface EqualsMember {
|
|
31
|
+
equals: FilterAttribute;
|
|
32
|
+
notEquals?: never;
|
|
33
|
+
greaterThan?: never;
|
|
34
|
+
greaterThanOrEquals?: never;
|
|
35
|
+
lessThan?: never;
|
|
36
|
+
lessThanOrEquals?: never;
|
|
37
|
+
in?: never;
|
|
38
|
+
notIn?: never;
|
|
39
|
+
startsWith?: never;
|
|
40
|
+
listContains?: never;
|
|
41
|
+
stringContains?: never;
|
|
42
|
+
andAll?: never;
|
|
43
|
+
orAll?: never;
|
|
44
|
+
$unknown?: never;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* <p>Knowledge base data sources that contain a metadata attribute whose name matches the <code>key</code> and whose value doesn't match the <code>value</code> in this object are returned.</p>
|
|
48
|
+
* <p>The following example would return data sources that don't contain an <code>animal</code> attribute whose value is <code>cat</code>.</p>
|
|
49
|
+
* <p>
|
|
50
|
+
* <code>"notEquals": \{ "key": "animal", "value": "cat" \}</code>
|
|
51
|
+
* </p>
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
interface NotEqualsMember {
|
|
55
|
+
equals?: never;
|
|
56
|
+
notEquals: FilterAttribute;
|
|
57
|
+
greaterThan?: never;
|
|
58
|
+
greaterThanOrEquals?: never;
|
|
59
|
+
lessThan?: never;
|
|
60
|
+
lessThanOrEquals?: never;
|
|
61
|
+
in?: never;
|
|
62
|
+
notIn?: never;
|
|
63
|
+
startsWith?: never;
|
|
64
|
+
listContains?: never;
|
|
65
|
+
stringContains?: never;
|
|
66
|
+
andAll?: never;
|
|
67
|
+
orAll?: never;
|
|
68
|
+
$unknown?: never;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* <p>Knowledge base data sources are returned if they contain a metadata attribute whose name matches the <code>key</code> and whose value is greater than the <code>value</code> in this object.</p>
|
|
72
|
+
* <p>The following example would return data sources with an <code>year</code> attribute whose value is greater than <code>1989</code>:</p>
|
|
73
|
+
* <p>
|
|
74
|
+
* <code>"greaterThan": \{ "key": "year", "value": 1989 \}</code>
|
|
75
|
+
* </p>
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
interface GreaterThanMember {
|
|
79
|
+
equals?: never;
|
|
80
|
+
notEquals?: never;
|
|
81
|
+
greaterThan: FilterAttribute;
|
|
82
|
+
greaterThanOrEquals?: never;
|
|
83
|
+
lessThan?: never;
|
|
84
|
+
lessThanOrEquals?: never;
|
|
85
|
+
in?: never;
|
|
86
|
+
notIn?: never;
|
|
87
|
+
startsWith?: never;
|
|
88
|
+
listContains?: never;
|
|
89
|
+
stringContains?: never;
|
|
90
|
+
andAll?: never;
|
|
91
|
+
orAll?: never;
|
|
92
|
+
$unknown?: never;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* <p>Knowledge base data sources are returned if they contain a metadata attribute whose name matches the <code>key</code> and whose value is greater than or equal to the <code>value</code> in this object.</p>
|
|
96
|
+
* <p>The following example would return data sources with an <code>year</code> attribute whose value is greater than or equal to <code>1989</code>:</p>
|
|
97
|
+
* <p>
|
|
98
|
+
* <code>"greaterThanOrEquals": \{ "key": "year", "value": 1989 \}</code>
|
|
99
|
+
* </p>
|
|
100
|
+
* @public
|
|
101
|
+
*/
|
|
102
|
+
interface GreaterThanOrEqualsMember {
|
|
103
|
+
equals?: never;
|
|
104
|
+
notEquals?: never;
|
|
105
|
+
greaterThan?: never;
|
|
106
|
+
greaterThanOrEquals: FilterAttribute;
|
|
107
|
+
lessThan?: never;
|
|
108
|
+
lessThanOrEquals?: never;
|
|
109
|
+
in?: never;
|
|
110
|
+
notIn?: never;
|
|
111
|
+
startsWith?: never;
|
|
112
|
+
listContains?: never;
|
|
113
|
+
stringContains?: never;
|
|
114
|
+
andAll?: never;
|
|
115
|
+
orAll?: never;
|
|
116
|
+
$unknown?: never;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* <p>Knowledge base data sources are returned if they contain a metadata attribute whose name matches the <code>key</code> and whose value is less than the <code>value</code> in this object.</p>
|
|
120
|
+
* <p>The following example would return data sources with an <code>year</code> attribute whose value is less than to <code>1989</code>.</p>
|
|
121
|
+
* <p>
|
|
122
|
+
* <code>"lessThan": \{ "key": "year", "value": 1989 \}</code>
|
|
123
|
+
* </p>
|
|
124
|
+
* @public
|
|
125
|
+
*/
|
|
126
|
+
interface LessThanMember {
|
|
127
|
+
equals?: never;
|
|
128
|
+
notEquals?: never;
|
|
129
|
+
greaterThan?: never;
|
|
130
|
+
greaterThanOrEquals?: never;
|
|
131
|
+
lessThan: FilterAttribute;
|
|
132
|
+
lessThanOrEquals?: never;
|
|
133
|
+
in?: never;
|
|
134
|
+
notIn?: never;
|
|
135
|
+
startsWith?: never;
|
|
136
|
+
listContains?: never;
|
|
137
|
+
stringContains?: never;
|
|
138
|
+
andAll?: never;
|
|
139
|
+
orAll?: never;
|
|
140
|
+
$unknown?: never;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* <p>Knowledge base data sources are returned if they contain a metadata attribute whose name matches the <code>key</code> and whose value is less than or equal to the <code>value</code> in this object.</p>
|
|
144
|
+
* <p>The following example would return data sources with an <code>year</code> attribute whose value is less than or equal to <code>1989</code>.</p>
|
|
145
|
+
* <p>
|
|
146
|
+
* <code>"lessThanOrEquals": \{ "key": "year", "value": 1989 \}</code>
|
|
147
|
+
* </p>
|
|
148
|
+
* @public
|
|
149
|
+
*/
|
|
150
|
+
interface LessThanOrEqualsMember {
|
|
151
|
+
equals?: never;
|
|
152
|
+
notEquals?: never;
|
|
153
|
+
greaterThan?: never;
|
|
154
|
+
greaterThanOrEquals?: never;
|
|
155
|
+
lessThan?: never;
|
|
156
|
+
lessThanOrEquals: FilterAttribute;
|
|
157
|
+
in?: never;
|
|
158
|
+
notIn?: never;
|
|
159
|
+
startsWith?: never;
|
|
160
|
+
listContains?: never;
|
|
161
|
+
stringContains?: never;
|
|
162
|
+
andAll?: never;
|
|
163
|
+
orAll?: never;
|
|
164
|
+
$unknown?: never;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* <p>Knowledge base data sources are returned if they contain a metadata attribute whose name matches the <code>key</code> and whose value is in the list specified in the <code>value</code> in this object.</p>
|
|
168
|
+
* <p>The following example would return data sources with an <code>animal</code> attribute that is either <code>cat</code> or <code>dog</code>:</p>
|
|
169
|
+
* <p>
|
|
170
|
+
* <code>"in": \{ "key": "animal", "value": ["cat", "dog"] \}</code>
|
|
171
|
+
* </p>
|
|
172
|
+
* @public
|
|
173
|
+
*/
|
|
174
|
+
interface InMember {
|
|
175
|
+
equals?: never;
|
|
176
|
+
notEquals?: never;
|
|
177
|
+
greaterThan?: never;
|
|
178
|
+
greaterThanOrEquals?: never;
|
|
179
|
+
lessThan?: never;
|
|
180
|
+
lessThanOrEquals?: never;
|
|
181
|
+
in: FilterAttribute;
|
|
182
|
+
notIn?: never;
|
|
183
|
+
startsWith?: never;
|
|
184
|
+
listContains?: never;
|
|
185
|
+
stringContains?: never;
|
|
186
|
+
andAll?: never;
|
|
187
|
+
orAll?: never;
|
|
188
|
+
$unknown?: never;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* <p>Knowledge base data sources are returned if they contain a metadata attribute whose name matches the <code>key</code> and whose value isn't in the list specified in the <code>value</code> in this object.</p>
|
|
192
|
+
* <p>The following example would return data sources whose <code>animal</code> attribute is neither <code>cat</code> nor <code>dog</code>.</p>
|
|
193
|
+
* <p>
|
|
194
|
+
* <code>"notIn": \{ "key": "animal", "value": ["cat", "dog"] \}</code>
|
|
195
|
+
* </p>
|
|
196
|
+
* @public
|
|
197
|
+
*/
|
|
198
|
+
interface NotInMember {
|
|
199
|
+
equals?: never;
|
|
200
|
+
notEquals?: never;
|
|
201
|
+
greaterThan?: never;
|
|
202
|
+
greaterThanOrEquals?: never;
|
|
203
|
+
lessThan?: never;
|
|
204
|
+
lessThanOrEquals?: never;
|
|
205
|
+
in?: never;
|
|
206
|
+
notIn: FilterAttribute;
|
|
207
|
+
startsWith?: never;
|
|
208
|
+
listContains?: never;
|
|
209
|
+
stringContains?: never;
|
|
210
|
+
andAll?: never;
|
|
211
|
+
orAll?: never;
|
|
212
|
+
$unknown?: never;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* <p>Knowledge base data sources are returned if they contain a metadata attribute whose name matches the <code>key</code> and whose value starts with the <code>value</code> in this object. This filter is currently only supported for Amazon OpenSearch Serverless vector stores.</p>
|
|
216
|
+
* <p>The following example would return data sources with an <code>animal</code> attribute starts with <code>ca</code> (for example, <code>cat</code> or <code>camel</code>).</p>
|
|
217
|
+
* <p>
|
|
218
|
+
* <code>"startsWith": \{ "key": "animal", "value": "ca" \}</code>
|
|
219
|
+
* </p>
|
|
220
|
+
* @public
|
|
221
|
+
*/
|
|
222
|
+
interface StartsWithMember {
|
|
223
|
+
equals?: never;
|
|
224
|
+
notEquals?: never;
|
|
225
|
+
greaterThan?: never;
|
|
226
|
+
greaterThanOrEquals?: never;
|
|
227
|
+
lessThan?: never;
|
|
228
|
+
lessThanOrEquals?: never;
|
|
229
|
+
in?: never;
|
|
230
|
+
notIn?: never;
|
|
231
|
+
startsWith: FilterAttribute;
|
|
232
|
+
listContains?: never;
|
|
233
|
+
stringContains?: never;
|
|
234
|
+
andAll?: never;
|
|
235
|
+
orAll?: never;
|
|
236
|
+
$unknown?: never;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* <p>Knowledge base data sources are returned if they contain a metadata attribute whose name matches the <code>key</code> and whose value is a list that contains the <code>value</code> as one of its members.</p>
|
|
240
|
+
* <p>The following example would return data sources with an <code>animals</code> attribute that is a list containing a <code>cat</code> member (for example <code>["dog", "cat"]</code>).</p>
|
|
241
|
+
* <p>
|
|
242
|
+
* <code>"listContains": \{ "key": "animals", "value": "cat" \}</code>
|
|
243
|
+
* </p>
|
|
244
|
+
* @public
|
|
245
|
+
*/
|
|
246
|
+
interface ListContainsMember {
|
|
247
|
+
equals?: never;
|
|
248
|
+
notEquals?: never;
|
|
249
|
+
greaterThan?: never;
|
|
250
|
+
greaterThanOrEquals?: never;
|
|
251
|
+
lessThan?: never;
|
|
252
|
+
lessThanOrEquals?: never;
|
|
253
|
+
in?: never;
|
|
254
|
+
notIn?: never;
|
|
255
|
+
startsWith?: never;
|
|
256
|
+
listContains: FilterAttribute;
|
|
257
|
+
stringContains?: never;
|
|
258
|
+
andAll?: never;
|
|
259
|
+
orAll?: never;
|
|
260
|
+
$unknown?: never;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* <p>Knowledge base data sources are returned if they contain a metadata attribute whose name matches the <code>key</code> and whose value is one of the following:</p>
|
|
264
|
+
* <ul>
|
|
265
|
+
* <li>
|
|
266
|
+
* <p>A string that contains the <code>value</code> as a substring. The following example would return data sources with an <code>animal</code> attribute that contains the substring <code>at</code> (for example <code>cat</code>).</p>
|
|
267
|
+
* <p>
|
|
268
|
+
* <code>"stringContains": \{ "key": "animal", "value": "at" \}</code>
|
|
269
|
+
* </p>
|
|
270
|
+
* </li>
|
|
271
|
+
* <li>
|
|
272
|
+
* <p>A list with a member that contains the <code>value</code> as a substring. The following example would return data sources with an <code>animals</code> attribute that is a list containing a member that contains the substring <code>at</code> (for example <code>["dog", "cat"]</code>).</p>
|
|
273
|
+
* <p>
|
|
274
|
+
* <code>"stringContains": \{ "key": "animals", "value": "at" \}</code>
|
|
275
|
+
* </p>
|
|
276
|
+
* </li>
|
|
277
|
+
* </ul>
|
|
278
|
+
* @public
|
|
279
|
+
*/
|
|
280
|
+
interface StringContainsMember {
|
|
281
|
+
equals?: never;
|
|
282
|
+
notEquals?: never;
|
|
283
|
+
greaterThan?: never;
|
|
284
|
+
greaterThanOrEquals?: never;
|
|
285
|
+
lessThan?: never;
|
|
286
|
+
lessThanOrEquals?: never;
|
|
287
|
+
in?: never;
|
|
288
|
+
notIn?: never;
|
|
289
|
+
startsWith?: never;
|
|
290
|
+
listContains?: never;
|
|
291
|
+
stringContains: FilterAttribute;
|
|
292
|
+
andAll?: never;
|
|
293
|
+
orAll?: never;
|
|
294
|
+
$unknown?: never;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* <p>Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list.</p>
|
|
298
|
+
* @public
|
|
299
|
+
*/
|
|
300
|
+
interface AndAllMember {
|
|
301
|
+
equals?: never;
|
|
302
|
+
notEquals?: never;
|
|
303
|
+
greaterThan?: never;
|
|
304
|
+
greaterThanOrEquals?: never;
|
|
305
|
+
lessThan?: never;
|
|
306
|
+
lessThanOrEquals?: never;
|
|
307
|
+
in?: never;
|
|
308
|
+
notIn?: never;
|
|
309
|
+
startsWith?: never;
|
|
310
|
+
listContains?: never;
|
|
311
|
+
stringContains?: never;
|
|
312
|
+
andAll: RetrievalFilter[];
|
|
313
|
+
orAll?: never;
|
|
314
|
+
$unknown?: never;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* <p>Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list.</p>
|
|
318
|
+
* @public
|
|
319
|
+
*/
|
|
320
|
+
interface OrAllMember {
|
|
321
|
+
equals?: never;
|
|
322
|
+
notEquals?: never;
|
|
323
|
+
greaterThan?: never;
|
|
324
|
+
greaterThanOrEquals?: never;
|
|
325
|
+
lessThan?: never;
|
|
326
|
+
lessThanOrEquals?: never;
|
|
327
|
+
in?: never;
|
|
328
|
+
notIn?: never;
|
|
329
|
+
startsWith?: never;
|
|
330
|
+
listContains?: never;
|
|
331
|
+
stringContains?: never;
|
|
332
|
+
andAll?: never;
|
|
333
|
+
orAll: RetrievalFilter[];
|
|
334
|
+
$unknown?: never;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* @public
|
|
338
|
+
*/
|
|
339
|
+
interface $UnknownMember {
|
|
340
|
+
equals?: never;
|
|
341
|
+
notEquals?: never;
|
|
342
|
+
greaterThan?: never;
|
|
343
|
+
greaterThanOrEquals?: never;
|
|
344
|
+
lessThan?: never;
|
|
345
|
+
lessThanOrEquals?: never;
|
|
346
|
+
in?: never;
|
|
347
|
+
notIn?: never;
|
|
348
|
+
startsWith?: never;
|
|
349
|
+
listContains?: never;
|
|
350
|
+
stringContains?: never;
|
|
351
|
+
andAll?: never;
|
|
352
|
+
orAll?: never;
|
|
353
|
+
$unknown: [string, any];
|
|
354
|
+
}
|
|
355
|
+
interface Visitor<T> {
|
|
356
|
+
equals: (value: FilterAttribute) => T;
|
|
357
|
+
notEquals: (value: FilterAttribute) => T;
|
|
358
|
+
greaterThan: (value: FilterAttribute) => T;
|
|
359
|
+
greaterThanOrEquals: (value: FilterAttribute) => T;
|
|
360
|
+
lessThan: (value: FilterAttribute) => T;
|
|
361
|
+
lessThanOrEquals: (value: FilterAttribute) => T;
|
|
362
|
+
in: (value: FilterAttribute) => T;
|
|
363
|
+
notIn: (value: FilterAttribute) => T;
|
|
364
|
+
startsWith: (value: FilterAttribute) => T;
|
|
365
|
+
listContains: (value: FilterAttribute) => T;
|
|
366
|
+
stringContains: (value: FilterAttribute) => T;
|
|
367
|
+
andAll: (value: RetrievalFilter[]) => T;
|
|
368
|
+
orAll: (value: RetrievalFilter[]) => T;
|
|
369
|
+
_: (name: string, value: any) => T;
|
|
370
|
+
}
|
|
371
|
+
const visit: <T>(value: RetrievalFilter, visitor: Visitor<T>) => T;
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* <p>Configurations for how to perform the search query and return results. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.</p>
|
|
375
|
+
* <p>This data type is used in the following API operations:</p>
|
|
376
|
+
* <ul>
|
|
377
|
+
* <li>
|
|
378
|
+
* <p>
|
|
379
|
+
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax">Retrieve request</a> – in the <code>vectorSearchConfiguration</code> field</p>
|
|
380
|
+
* </li>
|
|
381
|
+
* <li>
|
|
382
|
+
* <p>
|
|
383
|
+
* <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>vectorSearchConfiguration</code> field</p>
|
|
384
|
+
* </li>
|
|
385
|
+
* </ul>
|
|
386
|
+
* @public
|
|
387
|
+
*/
|
|
388
|
+
export interface KnowledgeBaseVectorSearchConfiguration {
|
|
389
|
+
/**
|
|
390
|
+
* <p>The number of source chunks to retrieve.</p>
|
|
391
|
+
* @public
|
|
392
|
+
*/
|
|
393
|
+
numberOfResults?: number | undefined;
|
|
394
|
+
/**
|
|
395
|
+
* <p>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 <code>HYBRID</code> search using both vector embeddings and raw text, or <code>SEMANTIC</code> search using only vector embeddings. For other vector store configurations, only <code>SEMANTIC</code> search is available. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-test.html">Test a knowledge base</a>.</p>
|
|
396
|
+
* @public
|
|
397
|
+
*/
|
|
398
|
+
overrideSearchType?: SearchType | undefined;
|
|
399
|
+
/**
|
|
400
|
+
* <p>Specifies the filters to use on the metadata in the knowledge base data sources before returning results. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.</p>
|
|
401
|
+
* @public
|
|
402
|
+
*/
|
|
403
|
+
filter?: RetrievalFilter | undefined;
|
|
404
|
+
/**
|
|
405
|
+
* <p>Contains configurations for reranking the retrieved results. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/rerank.html">Improve the relevance of query responses with a reranker model</a>.</p>
|
|
406
|
+
* @public
|
|
407
|
+
*/
|
|
408
|
+
rerankingConfiguration?: VectorSearchRerankingConfiguration | undefined;
|
|
409
|
+
/**
|
|
410
|
+
* <p>Settings for implicit filtering.</p>
|
|
411
|
+
* @public
|
|
412
|
+
*/
|
|
413
|
+
implicitFilterConfiguration?: ImplicitFilterConfiguration | undefined;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* <p>Contains configurations for knowledge base query. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.</p>
|
|
417
|
+
* <p>This data type is used in the following API operations:</p>
|
|
418
|
+
* <ul>
|
|
419
|
+
* <li>
|
|
420
|
+
* <p>
|
|
421
|
+
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax">Retrieve request</a> – in the <code>retrievalConfiguration</code> field</p>
|
|
422
|
+
* </li>
|
|
423
|
+
* <li>
|
|
424
|
+
* <p>
|
|
425
|
+
* <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>retrievalConfiguration</code> field</p>
|
|
426
|
+
* </li>
|
|
427
|
+
* </ul>
|
|
428
|
+
* @public
|
|
429
|
+
*/
|
|
430
|
+
export interface KnowledgeBaseRetrievalConfiguration {
|
|
431
|
+
/**
|
|
432
|
+
* <p>Contains details about how the results from the vector search should be returned. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.</p>
|
|
433
|
+
* @public
|
|
434
|
+
*/
|
|
435
|
+
vectorSearchConfiguration: KnowledgeBaseVectorSearchConfiguration | undefined;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* <p>
|
|
439
|
+
* Details of the knowledge base associated withe inline agent.
|
|
440
|
+
* </p>
|
|
441
|
+
* @public
|
|
442
|
+
*/
|
|
443
|
+
export interface KnowledgeBase {
|
|
444
|
+
/**
|
|
445
|
+
* <p>
|
|
446
|
+
* The unique identifier for a knowledge base associated with the inline agent.
|
|
447
|
+
* </p>
|
|
448
|
+
* @public
|
|
449
|
+
*/
|
|
450
|
+
knowledgeBaseId: string | undefined;
|
|
451
|
+
/**
|
|
452
|
+
* <p>
|
|
453
|
+
* The description of the knowledge base associated with the inline agent.
|
|
454
|
+
* </p>
|
|
455
|
+
* @public
|
|
456
|
+
*/
|
|
457
|
+
description: string | undefined;
|
|
458
|
+
/**
|
|
459
|
+
* <p>
|
|
460
|
+
* The configurations to apply to the knowledge base during query. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.
|
|
461
|
+
* </p>
|
|
462
|
+
* @public
|
|
463
|
+
*/
|
|
464
|
+
retrievalConfiguration?: KnowledgeBaseRetrievalConfiguration | undefined;
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* <p>Configurations to apply to a knowledge base attached to the agent during query. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html#session-state-kb">Knowledge base retrieval configurations</a>.</p>
|
|
468
|
+
* @public
|
|
469
|
+
*/
|
|
470
|
+
export interface KnowledgeBaseConfiguration {
|
|
471
|
+
/**
|
|
472
|
+
* <p>The unique identifier for a knowledge base attached to the agent.</p>
|
|
473
|
+
* @public
|
|
474
|
+
*/
|
|
475
|
+
knowledgeBaseId: string | undefined;
|
|
476
|
+
/**
|
|
477
|
+
* <p>The configurations to apply to the knowledge base during query. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.</p>
|
|
478
|
+
* @public
|
|
479
|
+
*/
|
|
480
|
+
retrievalConfiguration: KnowledgeBaseRetrievalConfiguration | undefined;
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* <p>Contains details about the resource being queried.</p>
|
|
484
|
+
* <p>This data type is used in the following API operations:</p>
|
|
485
|
+
* <ul>
|
|
486
|
+
* <li>
|
|
487
|
+
* <p>
|
|
488
|
+
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Retrieve.html#API_agent-runtime_Retrieve_RequestSyntax">Retrieve request</a> – in the <code>knowledgeBaseConfiguration</code> field</p>
|
|
489
|
+
* </li>
|
|
490
|
+
* <li>
|
|
491
|
+
* <p>
|
|
492
|
+
* <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>knowledgeBaseConfiguration</code> field</p>
|
|
493
|
+
* </li>
|
|
494
|
+
* </ul>
|
|
495
|
+
* @public
|
|
496
|
+
*/
|
|
497
|
+
export interface KnowledgeBaseRetrieveAndGenerateConfiguration {
|
|
498
|
+
/**
|
|
499
|
+
* <p>The unique identifier of the knowledge base that is queried.</p>
|
|
500
|
+
* @public
|
|
501
|
+
*/
|
|
502
|
+
knowledgeBaseId: string | undefined;
|
|
503
|
+
/**
|
|
504
|
+
* <p>The ARN of the foundation model or <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html">inference profile</a> used to generate a response.</p>
|
|
505
|
+
* @public
|
|
506
|
+
*/
|
|
507
|
+
modelArn: string | undefined;
|
|
508
|
+
/**
|
|
509
|
+
* <p>Contains configurations for how to retrieve and return the knowledge base query.</p>
|
|
510
|
+
* @public
|
|
511
|
+
*/
|
|
512
|
+
retrievalConfiguration?: KnowledgeBaseRetrievalConfiguration | undefined;
|
|
513
|
+
/**
|
|
514
|
+
* <p>Contains configurations for response generation based on the knowledge base query results.</p>
|
|
515
|
+
* @public
|
|
516
|
+
*/
|
|
517
|
+
generationConfiguration?: GenerationConfiguration | undefined;
|
|
518
|
+
/**
|
|
519
|
+
* <p>Settings for how the model processes the prompt prior to retrieval and generation.</p>
|
|
520
|
+
* @public
|
|
521
|
+
*/
|
|
522
|
+
orchestrationConfiguration?: OrchestrationConfiguration | undefined;
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* @public
|
|
526
|
+
*/
|
|
527
|
+
export interface RetrieveRequest {
|
|
528
|
+
/**
|
|
529
|
+
* <p>The unique identifier of the knowledge base to query.</p>
|
|
530
|
+
* @public
|
|
531
|
+
*/
|
|
532
|
+
knowledgeBaseId: string | undefined;
|
|
533
|
+
/**
|
|
534
|
+
* <p>Contains the query to send the knowledge base.</p>
|
|
535
|
+
* @public
|
|
536
|
+
*/
|
|
537
|
+
retrievalQuery: KnowledgeBaseQuery | undefined;
|
|
538
|
+
/**
|
|
539
|
+
* <p>Contains configurations for the knowledge base query and retrieval process. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.</p>
|
|
540
|
+
* @public
|
|
541
|
+
*/
|
|
542
|
+
retrievalConfiguration?: KnowledgeBaseRetrievalConfiguration | undefined;
|
|
543
|
+
/**
|
|
544
|
+
* <p>Guardrail settings.</p>
|
|
545
|
+
* @public
|
|
546
|
+
*/
|
|
547
|
+
guardrailConfiguration?: GuardrailConfiguration | undefined;
|
|
548
|
+
/**
|
|
549
|
+
* <p>If there are more results than can fit in the response, the response returns a <code>nextToken</code>. Use this token in the <code>nextToken</code> field of another request to retrieve the next batch of results.</p>
|
|
550
|
+
* @public
|
|
551
|
+
*/
|
|
552
|
+
nextToken?: string | undefined;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* <p>Contains details about the resource being queried.</p>
|
|
556
|
+
* <p>This data type is used in the following API operations:</p>
|
|
557
|
+
* <ul>
|
|
558
|
+
* <li>
|
|
559
|
+
* <p>
|
|
560
|
+
* <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>retrieveAndGenerateConfiguration</code> field</p>
|
|
561
|
+
* </li>
|
|
562
|
+
* </ul>
|
|
563
|
+
* @public
|
|
564
|
+
*/
|
|
565
|
+
export interface RetrieveAndGenerateConfiguration {
|
|
566
|
+
/**
|
|
567
|
+
* <p>The type of resource that contains your data for retrieving information and generating responses.</p>
|
|
568
|
+
* <p>If you choose to use <code>EXTERNAL_SOURCES</code>, then currently only Anthropic Claude 3 Sonnet models for knowledge bases are supported.</p>
|
|
569
|
+
* @public
|
|
570
|
+
*/
|
|
571
|
+
type: RetrieveAndGenerateType | undefined;
|
|
572
|
+
/**
|
|
573
|
+
* <p>Contains details about the knowledge base for retrieving information and generating responses.</p>
|
|
574
|
+
* @public
|
|
575
|
+
*/
|
|
576
|
+
knowledgeBaseConfiguration?: KnowledgeBaseRetrieveAndGenerateConfiguration | undefined;
|
|
577
|
+
/**
|
|
578
|
+
* <p>The configuration for the external source wrapper object in the <code>retrieveAndGenerate</code> function.</p>
|
|
579
|
+
* @public
|
|
580
|
+
*/
|
|
581
|
+
externalSourcesConfiguration?: ExternalSourcesRetrieveAndGenerateConfiguration | undefined;
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* @public
|
|
585
|
+
*/
|
|
586
|
+
export interface InvokeInlineAgentRequest {
|
|
587
|
+
/**
|
|
588
|
+
* <p>
|
|
589
|
+
* The unique identifier of the session. Use the same value across requests to continue the same conversation.
|
|
590
|
+
* </p>
|
|
591
|
+
* @public
|
|
592
|
+
*/
|
|
593
|
+
sessionId: string | undefined;
|
|
594
|
+
/**
|
|
595
|
+
* <p>
|
|
596
|
+
* The Amazon Resource Name (ARN) of the Amazon Web Services KMS key to use to encrypt your inline agent.
|
|
597
|
+
* </p>
|
|
598
|
+
* @public
|
|
599
|
+
*/
|
|
600
|
+
customerEncryptionKeyArn?: string | undefined;
|
|
601
|
+
/**
|
|
602
|
+
* <p>
|
|
603
|
+
* Specifies whether to end the session with the inline agent or not.
|
|
604
|
+
* </p>
|
|
605
|
+
* @public
|
|
606
|
+
*/
|
|
607
|
+
endSession?: boolean | undefined;
|
|
608
|
+
/**
|
|
609
|
+
* <p>
|
|
610
|
+
* Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/trace-events.html">Using trace</a>.
|
|
611
|
+
*
|
|
612
|
+
* </p>
|
|
613
|
+
* @public
|
|
614
|
+
*/
|
|
615
|
+
enableTrace?: boolean | undefined;
|
|
616
|
+
/**
|
|
617
|
+
* <p>
|
|
618
|
+
* The prompt text to send to the agent.
|
|
619
|
+
* </p>
|
|
620
|
+
* <note>
|
|
621
|
+
* <p>If you include <code>returnControlInvocationResults</code> in the <code>sessionState</code> field, the <code>inputText</code> field will be ignored.</p>
|
|
622
|
+
* </note>
|
|
623
|
+
* @public
|
|
624
|
+
*/
|
|
625
|
+
inputText?: string | undefined;
|
|
626
|
+
/**
|
|
627
|
+
* <p>
|
|
628
|
+
* Parameters that specify the various attributes of a sessions. You can include attributes for the session or prompt or, if you configured an
|
|
629
|
+
* action group to return control, results from invocation of the action group. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html">Control session context</a>.
|
|
630
|
+
* </p>
|
|
631
|
+
* <note>
|
|
632
|
+
* <p>If you include <code>returnControlInvocationResults</code> in the <code>sessionState</code> field, the <code>inputText</code> field will be ignored.</p>
|
|
633
|
+
* </note>
|
|
634
|
+
* @public
|
|
635
|
+
*/
|
|
636
|
+
inlineSessionState?: InlineSessionState | undefined;
|
|
637
|
+
/**
|
|
638
|
+
* <p>
|
|
639
|
+
* The <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">model identifier (ID)</a> of the model to use for orchestration by the inline agent. For example, <code>meta.llama3-1-70b-instruct-v1:0</code>.
|
|
640
|
+
* </p>
|
|
641
|
+
* @public
|
|
642
|
+
*/
|
|
643
|
+
foundationModel: string | undefined;
|
|
644
|
+
/**
|
|
645
|
+
* <p>
|
|
646
|
+
* The instructions that tell the inline agent what it should do and how it should interact with users.
|
|
647
|
+
* </p>
|
|
648
|
+
* @public
|
|
649
|
+
*/
|
|
650
|
+
instruction: string | undefined;
|
|
651
|
+
/**
|
|
652
|
+
* <p>
|
|
653
|
+
* The number of seconds for which the inline agent should maintain session information. After this time expires, the subsequent <code>InvokeInlineAgent</code> request begins a new session.
|
|
654
|
+
* </p>
|
|
655
|
+
* <p>A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and the data provided before the timeout is deleted.</p>
|
|
656
|
+
* @public
|
|
657
|
+
*/
|
|
658
|
+
idleSessionTTLInSeconds?: number | undefined;
|
|
659
|
+
/**
|
|
660
|
+
* <p>
|
|
661
|
+
* A list of action groups with each action group defining the action the inline agent needs to carry out.
|
|
662
|
+
* </p>
|
|
663
|
+
* @public
|
|
664
|
+
*/
|
|
665
|
+
actionGroups?: AgentActionGroup[] | undefined;
|
|
666
|
+
/**
|
|
667
|
+
* <p>
|
|
668
|
+
* Contains information of the knowledge bases to associate with.
|
|
669
|
+
* </p>
|
|
670
|
+
* @public
|
|
671
|
+
*/
|
|
672
|
+
knowledgeBases?: KnowledgeBase[] | undefined;
|
|
673
|
+
/**
|
|
674
|
+
* <p>
|
|
675
|
+
* The <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html">guardrails</a> to assign to the inline agent.
|
|
676
|
+
* </p>
|
|
677
|
+
* @public
|
|
678
|
+
*/
|
|
679
|
+
guardrailConfiguration?: GuardrailConfigurationWithArn | undefined;
|
|
680
|
+
/**
|
|
681
|
+
* <p>
|
|
682
|
+
* Configurations for advanced prompts used to override the default prompts to enhance the accuracy of the inline agent.
|
|
683
|
+
* </p>
|
|
684
|
+
* @public
|
|
685
|
+
*/
|
|
686
|
+
promptOverrideConfiguration?: PromptOverrideConfiguration | undefined;
|
|
687
|
+
/**
|
|
688
|
+
* <p>Model settings for the request.</p>
|
|
689
|
+
* @public
|
|
690
|
+
*/
|
|
691
|
+
bedrockModelConfigurations?: InlineBedrockModelConfigurations | undefined;
|
|
692
|
+
/**
|
|
693
|
+
* <p>
|
|
694
|
+
* Specifies the configurations for streaming.
|
|
695
|
+
* </p>
|
|
696
|
+
* <note>
|
|
697
|
+
* <p>To use agent streaming, you need permissions to perform the <code>bedrock:InvokeModelWithResponseStream</code> action.</p>
|
|
698
|
+
* </note>
|
|
699
|
+
* @public
|
|
700
|
+
*/
|
|
701
|
+
streamingConfigurations?: StreamingConfigurations | undefined;
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* @public
|
|
705
|
+
*/
|
|
706
|
+
export interface RetrieveAndGenerateRequest {
|
|
707
|
+
/**
|
|
708
|
+
* <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>
|
|
709
|
+
* @public
|
|
710
|
+
*/
|
|
711
|
+
sessionId?: string | undefined;
|
|
712
|
+
/**
|
|
713
|
+
* <p>Contains the query to be made to the knowledge base.</p>
|
|
714
|
+
* @public
|
|
715
|
+
*/
|
|
716
|
+
input: RetrieveAndGenerateInput | undefined;
|
|
717
|
+
/**
|
|
718
|
+
* <p>Contains configurations for the knowledge base query and retrieval process. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.</p>
|
|
719
|
+
* @public
|
|
720
|
+
*/
|
|
721
|
+
retrieveAndGenerateConfiguration?: RetrieveAndGenerateConfiguration | undefined;
|
|
722
|
+
/**
|
|
723
|
+
* <p>Contains details about the session with the knowledge base.</p>
|
|
724
|
+
* @public
|
|
725
|
+
*/
|
|
726
|
+
sessionConfiguration?: RetrieveAndGenerateSessionConfiguration | undefined;
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* @public
|
|
730
|
+
*/
|
|
731
|
+
export interface RetrieveAndGenerateStreamRequest {
|
|
732
|
+
/**
|
|
733
|
+
* <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>
|
|
734
|
+
* @public
|
|
735
|
+
*/
|
|
736
|
+
sessionId?: string | undefined;
|
|
737
|
+
/**
|
|
738
|
+
* <p>Contains the query to be made to the knowledge base.</p>
|
|
739
|
+
* @public
|
|
740
|
+
*/
|
|
741
|
+
input: RetrieveAndGenerateInput | undefined;
|
|
742
|
+
/**
|
|
743
|
+
* <p>Contains configurations for the knowledge base query and retrieval process. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html">Query configurations</a>.</p>
|
|
744
|
+
* @public
|
|
745
|
+
*/
|
|
746
|
+
retrieveAndGenerateConfiguration?: RetrieveAndGenerateConfiguration | undefined;
|
|
747
|
+
/**
|
|
748
|
+
* <p>Contains details about the session with the knowledge base.</p>
|
|
749
|
+
* @public
|
|
750
|
+
*/
|
|
751
|
+
sessionConfiguration?: RetrieveAndGenerateSessionConfiguration | undefined;
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* <p>Contains parameters that specify various attributes that persist across a session or prompt. You can define session state attributes as key-value pairs when writing a <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-lambda.html">Lambda function</a> for an action group or pass them when making an <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html">InvokeAgent</a> request. Use session state attributes to control and provide conversational context for your agent and to help customize your agent's behavior. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html">Control session context</a>.</p>
|
|
755
|
+
* @public
|
|
756
|
+
*/
|
|
757
|
+
export interface SessionState {
|
|
758
|
+
/**
|
|
759
|
+
* <p>Contains attributes that persist across a session and the values of those attributes.</p>
|
|
760
|
+
* @public
|
|
761
|
+
*/
|
|
762
|
+
sessionAttributes?: Record<string, string> | undefined;
|
|
763
|
+
/**
|
|
764
|
+
* <p>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 <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html">Prompt template placeholder variables</a>.</p>
|
|
765
|
+
* @public
|
|
766
|
+
*/
|
|
767
|
+
promptSessionAttributes?: Record<string, string> | undefined;
|
|
768
|
+
/**
|
|
769
|
+
* <p>Contains information about the results from the action group invocation. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-returncontrol.html">Return control to the agent developer</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html">Control session context</a>.</p>
|
|
770
|
+
* <note>
|
|
771
|
+
* <p>If you include this field, the <code>inputText</code> field will be ignored.</p>
|
|
772
|
+
* </note>
|
|
773
|
+
* @public
|
|
774
|
+
*/
|
|
775
|
+
returnControlInvocationResults?: InvocationResultMember[] | undefined;
|
|
776
|
+
/**
|
|
777
|
+
* <p>The identifier of the invocation of an action. This value must match the <code>invocationId</code> returned in the <code>InvokeAgent</code> response for the action whose results are provided in the <code>returnControlInvocationResults</code> field. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-returncontrol.html">Return control to the agent developer</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html">Control session context</a>.</p>
|
|
778
|
+
* @public
|
|
779
|
+
*/
|
|
780
|
+
invocationId?: string | undefined;
|
|
781
|
+
/**
|
|
782
|
+
* <p>Contains information about the files used by code interpreter.</p>
|
|
783
|
+
* @public
|
|
784
|
+
*/
|
|
785
|
+
files?: InputFile[] | undefined;
|
|
786
|
+
/**
|
|
787
|
+
* <p>An array of configurations, each of which applies to a knowledge base attached to the agent.</p>
|
|
788
|
+
* @public
|
|
789
|
+
*/
|
|
790
|
+
knowledgeBaseConfigurations?: KnowledgeBaseConfiguration[] | undefined;
|
|
791
|
+
/**
|
|
792
|
+
* <p>The state's conversation history.</p>
|
|
793
|
+
* @public
|
|
794
|
+
*/
|
|
795
|
+
conversationHistory?: ConversationHistory | undefined;
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* @public
|
|
799
|
+
*/
|
|
800
|
+
export interface InvokeAgentRequest {
|
|
801
|
+
/**
|
|
802
|
+
* <p>Contains parameters that specify various attributes of the session. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html">Control session context</a>.</p>
|
|
803
|
+
* <note>
|
|
804
|
+
* <p>If you include <code>returnControlInvocationResults</code> in the <code>sessionState</code> field, the <code>inputText</code> field will be ignored.</p>
|
|
805
|
+
* </note>
|
|
806
|
+
* @public
|
|
807
|
+
*/
|
|
808
|
+
sessionState?: SessionState | undefined;
|
|
809
|
+
/**
|
|
810
|
+
* <p>The unique identifier of the agent to use.</p>
|
|
811
|
+
* @public
|
|
812
|
+
*/
|
|
813
|
+
agentId: string | undefined;
|
|
814
|
+
/**
|
|
815
|
+
* <p>The alias of the agent to use.</p>
|
|
816
|
+
* @public
|
|
817
|
+
*/
|
|
818
|
+
agentAliasId: string | undefined;
|
|
819
|
+
/**
|
|
820
|
+
* <p>The unique identifier of the session. Use the same value across requests to continue the same conversation.</p>
|
|
821
|
+
* @public
|
|
822
|
+
*/
|
|
823
|
+
sessionId: string | undefined;
|
|
824
|
+
/**
|
|
825
|
+
* <p>Specifies whether to end the session with the agent or not.</p>
|
|
826
|
+
* @public
|
|
827
|
+
*/
|
|
828
|
+
endSession?: boolean | undefined;
|
|
829
|
+
/**
|
|
830
|
+
* <p>Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-test.html#trace-events">Trace enablement</a>.</p>
|
|
831
|
+
* @public
|
|
832
|
+
*/
|
|
833
|
+
enableTrace?: boolean | undefined;
|
|
834
|
+
/**
|
|
835
|
+
* <p>The prompt text to send the agent.</p>
|
|
836
|
+
* <note>
|
|
837
|
+
* <p>If you include <code>returnControlInvocationResults</code> in the <code>sessionState</code> field, the <code>inputText</code> field will be ignored.</p>
|
|
838
|
+
* </note>
|
|
839
|
+
* @public
|
|
840
|
+
*/
|
|
841
|
+
inputText?: string | undefined;
|
|
842
|
+
/**
|
|
843
|
+
* <p>The unique identifier of the agent memory.</p>
|
|
844
|
+
* @public
|
|
845
|
+
*/
|
|
846
|
+
memoryId?: string | undefined;
|
|
847
|
+
/**
|
|
848
|
+
* <p>Model performance settings for the request.</p>
|
|
849
|
+
* @public
|
|
850
|
+
*/
|
|
851
|
+
bedrockModelConfigurations?: BedrockModelConfigurations | undefined;
|
|
852
|
+
/**
|
|
853
|
+
* <p>
|
|
854
|
+
* Specifies the configurations for streaming.
|
|
855
|
+
* </p>
|
|
856
|
+
* <note>
|
|
857
|
+
* <p>To use agent streaming, you need permissions to perform the <code>bedrock:InvokeModelWithResponseStream</code> action.</p>
|
|
858
|
+
* </note>
|
|
859
|
+
* @public
|
|
860
|
+
*/
|
|
861
|
+
streamingConfigurations?: StreamingConfigurations | undefined;
|
|
862
|
+
/**
|
|
863
|
+
* <p>The ARN of the resource making the request.</p>
|
|
864
|
+
* @public
|
|
865
|
+
*/
|
|
866
|
+
sourceArn?: string | undefined;
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* @internal
|
|
870
|
+
*/
|
|
871
|
+
export declare const RetrievalFilterFilterSensitiveLog: (obj: RetrievalFilter) => any;
|
|
872
|
+
/**
|
|
873
|
+
* @internal
|
|
874
|
+
*/
|
|
875
|
+
export declare const KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog: (obj: KnowledgeBaseVectorSearchConfiguration) => any;
|
|
876
|
+
/**
|
|
877
|
+
* @internal
|
|
878
|
+
*/
|
|
879
|
+
export declare const KnowledgeBaseRetrievalConfigurationFilterSensitiveLog: (obj: KnowledgeBaseRetrievalConfiguration) => any;
|
|
880
|
+
/**
|
|
881
|
+
* @internal
|
|
882
|
+
*/
|
|
883
|
+
export declare const KnowledgeBaseFilterSensitiveLog: (obj: KnowledgeBase) => any;
|
|
884
|
+
/**
|
|
885
|
+
* @internal
|
|
886
|
+
*/
|
|
887
|
+
export declare const KnowledgeBaseConfigurationFilterSensitiveLog: (obj: KnowledgeBaseConfiguration) => any;
|
|
888
|
+
/**
|
|
889
|
+
* @internal
|
|
890
|
+
*/
|
|
891
|
+
export declare const KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog: (obj: KnowledgeBaseRetrieveAndGenerateConfiguration) => any;
|
|
892
|
+
/**
|
|
893
|
+
* @internal
|
|
894
|
+
*/
|
|
895
|
+
export declare const RetrieveRequestFilterSensitiveLog: (obj: RetrieveRequest) => any;
|
|
896
|
+
/**
|
|
897
|
+
* @internal
|
|
898
|
+
*/
|
|
899
|
+
export declare const RetrieveAndGenerateConfigurationFilterSensitiveLog: (obj: RetrieveAndGenerateConfiguration) => any;
|
|
900
|
+
/**
|
|
901
|
+
* @internal
|
|
902
|
+
*/
|
|
903
|
+
export declare const InvokeInlineAgentRequestFilterSensitiveLog: (obj: InvokeInlineAgentRequest) => any;
|
|
904
|
+
/**
|
|
905
|
+
* @internal
|
|
906
|
+
*/
|
|
907
|
+
export declare const RetrieveAndGenerateRequestFilterSensitiveLog: (obj: RetrieveAndGenerateRequest) => any;
|
|
908
|
+
/**
|
|
909
|
+
* @internal
|
|
910
|
+
*/
|
|
911
|
+
export declare const RetrieveAndGenerateStreamRequestFilterSensitiveLog: (obj: RetrieveAndGenerateStreamRequest) => any;
|
|
912
|
+
/**
|
|
913
|
+
* @internal
|
|
914
|
+
*/
|
|
915
|
+
export declare const SessionStateFilterSensitiveLog: (obj: SessionState) => any;
|
|
916
|
+
/**
|
|
917
|
+
* @internal
|
|
918
|
+
*/
|
|
919
|
+
export declare const InvokeAgentRequestFilterSensitiveLog: (obj: InvokeAgentRequest) => any;
|