@aws-sdk/client-bedrock-agent-runtime 3.560.0 → 3.563.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 +67 -0
- package/dist-es/models/models_0.js +28 -0
- package/dist-es/protocols/Aws_restJson1.js +29 -0
- package/dist-types/commands/RetrieveAndGenerateCommand.d.ts +22 -1
- package/dist-types/models/models_0.d.ts +119 -0
- package/dist-types/ts3.4/models/models_0.d.ts +41 -0
- package/package.json +2 -2
package/dist-cjs/index.js
CHANGED
|
@@ -31,10 +31,15 @@ __export(src_exports, {
|
|
|
31
31
|
BedrockAgentRuntime: () => BedrockAgentRuntime,
|
|
32
32
|
BedrockAgentRuntimeClient: () => BedrockAgentRuntimeClient,
|
|
33
33
|
BedrockAgentRuntimeServiceException: () => BedrockAgentRuntimeServiceException,
|
|
34
|
+
ByteContentDocFilterSensitiveLog: () => ByteContentDocFilterSensitiveLog,
|
|
34
35
|
CitationFilterSensitiveLog: () => CitationFilterSensitiveLog,
|
|
35
36
|
ConflictException: () => ConflictException,
|
|
36
37
|
CreationMode: () => CreationMode,
|
|
37
38
|
DependencyFailedException: () => DependencyFailedException,
|
|
39
|
+
ExternalSourceFilterSensitiveLog: () => ExternalSourceFilterSensitiveLog,
|
|
40
|
+
ExternalSourceType: () => ExternalSourceType,
|
|
41
|
+
ExternalSourcesGenerationConfigurationFilterSensitiveLog: () => ExternalSourcesGenerationConfigurationFilterSensitiveLog,
|
|
42
|
+
ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog: () => ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog,
|
|
38
43
|
FailureTraceFilterSensitiveLog: () => FailureTraceFilterSensitiveLog,
|
|
39
44
|
FinalResponseFilterSensitiveLog: () => FinalResponseFilterSensitiveLog,
|
|
40
45
|
GeneratedResponsePartFilterSensitiveLog: () => GeneratedResponsePartFilterSensitiveLog,
|
|
@@ -569,11 +574,16 @@ var ResponseStream;
|
|
|
569
574
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
570
575
|
}, "visit");
|
|
571
576
|
})(ResponseStream || (ResponseStream = {}));
|
|
577
|
+
var ExternalSourceType = {
|
|
578
|
+
BYTE_CONTENT: "BYTE_CONTENT",
|
|
579
|
+
S3: "S3"
|
|
580
|
+
};
|
|
572
581
|
var SearchType = {
|
|
573
582
|
HYBRID: "HYBRID",
|
|
574
583
|
SEMANTIC: "SEMANTIC"
|
|
575
584
|
};
|
|
576
585
|
var RetrieveAndGenerateType = {
|
|
586
|
+
EXTERNAL_SOURCES: "EXTERNAL_SOURCES",
|
|
577
587
|
KNOWLEDGE_BASE: "KNOWLEDGE_BASE"
|
|
578
588
|
};
|
|
579
589
|
var RetrievalFilter;
|
|
@@ -845,6 +855,26 @@ var PromptTemplateFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
|
845
855
|
...obj,
|
|
846
856
|
...obj.textPromptTemplate && { textPromptTemplate: import_smithy_client.SENSITIVE_STRING }
|
|
847
857
|
}), "PromptTemplateFilterSensitiveLog");
|
|
858
|
+
var ExternalSourcesGenerationConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
859
|
+
...obj,
|
|
860
|
+
...obj.promptTemplate && { promptTemplate: PromptTemplateFilterSensitiveLog(obj.promptTemplate) }
|
|
861
|
+
}), "ExternalSourcesGenerationConfigurationFilterSensitiveLog");
|
|
862
|
+
var ByteContentDocFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
863
|
+
...obj,
|
|
864
|
+
...obj.identifier && { identifier: import_smithy_client.SENSITIVE_STRING },
|
|
865
|
+
...obj.data && { data: import_smithy_client.SENSITIVE_STRING }
|
|
866
|
+
}), "ByteContentDocFilterSensitiveLog");
|
|
867
|
+
var ExternalSourceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
868
|
+
...obj,
|
|
869
|
+
...obj.byteContent && { byteContent: ByteContentDocFilterSensitiveLog(obj.byteContent) }
|
|
870
|
+
}), "ExternalSourceFilterSensitiveLog");
|
|
871
|
+
var ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
872
|
+
...obj,
|
|
873
|
+
...obj.sources && { sources: obj.sources.map((item) => ExternalSourceFilterSensitiveLog(item)) },
|
|
874
|
+
...obj.generationConfiguration && {
|
|
875
|
+
generationConfiguration: ExternalSourcesGenerationConfigurationFilterSensitiveLog(obj.generationConfiguration)
|
|
876
|
+
}
|
|
877
|
+
}), "ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog");
|
|
848
878
|
var GenerationConfigurationFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
849
879
|
...obj,
|
|
850
880
|
...obj.promptTemplate && { promptTemplate: PromptTemplateFilterSensitiveLog(obj.promptTemplate) }
|
|
@@ -928,6 +958,11 @@ var RetrieveAndGenerateConfigurationFilterSensitiveLog = /* @__PURE__ */ __name(
|
|
|
928
958
|
knowledgeBaseConfiguration: KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog(
|
|
929
959
|
obj.knowledgeBaseConfiguration
|
|
930
960
|
)
|
|
961
|
+
},
|
|
962
|
+
...obj.externalSourcesConfiguration && {
|
|
963
|
+
externalSourcesConfiguration: ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog(
|
|
964
|
+
obj.externalSourcesConfiguration
|
|
965
|
+
)
|
|
931
966
|
}
|
|
932
967
|
}), "RetrieveAndGenerateConfigurationFilterSensitiveLog");
|
|
933
968
|
var RetrieveAndGenerateRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
@@ -1363,6 +1398,32 @@ var de_ValidationException_event = /* @__PURE__ */ __name(async (output, context
|
|
|
1363
1398
|
};
|
|
1364
1399
|
return de_ValidationExceptionRes(parsedOutput, context);
|
|
1365
1400
|
}, "de_ValidationException_event");
|
|
1401
|
+
var se_ByteContentDoc = /* @__PURE__ */ __name((input, context) => {
|
|
1402
|
+
return (0, import_smithy_client.take)(input, {
|
|
1403
|
+
contentType: [],
|
|
1404
|
+
data: context.base64Encoder,
|
|
1405
|
+
identifier: []
|
|
1406
|
+
});
|
|
1407
|
+
}, "se_ByteContentDoc");
|
|
1408
|
+
var se_ExternalSource = /* @__PURE__ */ __name((input, context) => {
|
|
1409
|
+
return (0, import_smithy_client.take)(input, {
|
|
1410
|
+
byteContent: (_) => se_ByteContentDoc(_, context),
|
|
1411
|
+
s3Location: import_smithy_client._json,
|
|
1412
|
+
sourceType: []
|
|
1413
|
+
});
|
|
1414
|
+
}, "se_ExternalSource");
|
|
1415
|
+
var se_ExternalSources = /* @__PURE__ */ __name((input, context) => {
|
|
1416
|
+
return input.filter((e) => e != null).map((entry) => {
|
|
1417
|
+
return se_ExternalSource(entry, context);
|
|
1418
|
+
});
|
|
1419
|
+
}, "se_ExternalSources");
|
|
1420
|
+
var se_ExternalSourcesRetrieveAndGenerateConfiguration = /* @__PURE__ */ __name((input, context) => {
|
|
1421
|
+
return (0, import_smithy_client.take)(input, {
|
|
1422
|
+
generationConfiguration: import_smithy_client._json,
|
|
1423
|
+
modelArn: [],
|
|
1424
|
+
sources: (_) => se_ExternalSources(_, context)
|
|
1425
|
+
});
|
|
1426
|
+
}, "se_ExternalSourcesRetrieveAndGenerateConfiguration");
|
|
1366
1427
|
var se_FilterAttribute = /* @__PURE__ */ __name((input, context) => {
|
|
1367
1428
|
return (0, import_smithy_client.take)(input, {
|
|
1368
1429
|
key: [],
|
|
@@ -1415,6 +1476,7 @@ var se_RetrievalFilterList = /* @__PURE__ */ __name((input, context) => {
|
|
|
1415
1476
|
}, "se_RetrievalFilterList");
|
|
1416
1477
|
var se_RetrieveAndGenerateConfiguration = /* @__PURE__ */ __name((input, context) => {
|
|
1417
1478
|
return (0, import_smithy_client.take)(input, {
|
|
1479
|
+
externalSourcesConfiguration: (_) => se_ExternalSourcesRetrieveAndGenerateConfiguration(_, context),
|
|
1418
1480
|
knowledgeBaseConfiguration: (_) => se_KnowledgeBaseRetrieveAndGenerateConfiguration(_, context),
|
|
1419
1481
|
type: []
|
|
1420
1482
|
});
|
|
@@ -1712,6 +1774,7 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
1712
1774
|
Trace,
|
|
1713
1775
|
ValidationException,
|
|
1714
1776
|
ResponseStream,
|
|
1777
|
+
ExternalSourceType,
|
|
1715
1778
|
SearchType,
|
|
1716
1779
|
RetrieveAndGenerateType,
|
|
1717
1780
|
RetrievalFilter,
|
|
@@ -1754,6 +1817,10 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
1754
1817
|
InvokeAgentResponseFilterSensitiveLog,
|
|
1755
1818
|
RetrieveAndGenerateInputFilterSensitiveLog,
|
|
1756
1819
|
PromptTemplateFilterSensitiveLog,
|
|
1820
|
+
ExternalSourcesGenerationConfigurationFilterSensitiveLog,
|
|
1821
|
+
ByteContentDocFilterSensitiveLog,
|
|
1822
|
+
ExternalSourceFilterSensitiveLog,
|
|
1823
|
+
ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog,
|
|
1757
1824
|
GenerationConfigurationFilterSensitiveLog,
|
|
1758
1825
|
RetrieveAndGenerateOutputFilterSensitiveLog,
|
|
1759
1826
|
RetrieveAndGenerateResponseFilterSensitiveLog,
|
|
@@ -242,11 +242,16 @@ export var ResponseStream;
|
|
|
242
242
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
243
243
|
};
|
|
244
244
|
})(ResponseStream || (ResponseStream = {}));
|
|
245
|
+
export const ExternalSourceType = {
|
|
246
|
+
BYTE_CONTENT: "BYTE_CONTENT",
|
|
247
|
+
S3: "S3",
|
|
248
|
+
};
|
|
245
249
|
export const SearchType = {
|
|
246
250
|
HYBRID: "HYBRID",
|
|
247
251
|
SEMANTIC: "SEMANTIC",
|
|
248
252
|
};
|
|
249
253
|
export const RetrieveAndGenerateType = {
|
|
254
|
+
EXTERNAL_SOURCES: "EXTERNAL_SOURCES",
|
|
250
255
|
KNOWLEDGE_BASE: "KNOWLEDGE_BASE",
|
|
251
256
|
};
|
|
252
257
|
export var RetrievalFilter;
|
|
@@ -516,6 +521,26 @@ export const PromptTemplateFilterSensitiveLog = (obj) => ({
|
|
|
516
521
|
...obj,
|
|
517
522
|
...(obj.textPromptTemplate && { textPromptTemplate: SENSITIVE_STRING }),
|
|
518
523
|
});
|
|
524
|
+
export const ExternalSourcesGenerationConfigurationFilterSensitiveLog = (obj) => ({
|
|
525
|
+
...obj,
|
|
526
|
+
...(obj.promptTemplate && { promptTemplate: PromptTemplateFilterSensitiveLog(obj.promptTemplate) }),
|
|
527
|
+
});
|
|
528
|
+
export const ByteContentDocFilterSensitiveLog = (obj) => ({
|
|
529
|
+
...obj,
|
|
530
|
+
...(obj.identifier && { identifier: SENSITIVE_STRING }),
|
|
531
|
+
...(obj.data && { data: SENSITIVE_STRING }),
|
|
532
|
+
});
|
|
533
|
+
export const ExternalSourceFilterSensitiveLog = (obj) => ({
|
|
534
|
+
...obj,
|
|
535
|
+
...(obj.byteContent && { byteContent: ByteContentDocFilterSensitiveLog(obj.byteContent) }),
|
|
536
|
+
});
|
|
537
|
+
export const ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog = (obj) => ({
|
|
538
|
+
...obj,
|
|
539
|
+
...(obj.sources && { sources: obj.sources.map((item) => ExternalSourceFilterSensitiveLog(item)) }),
|
|
540
|
+
...(obj.generationConfiguration && {
|
|
541
|
+
generationConfiguration: ExternalSourcesGenerationConfigurationFilterSensitiveLog(obj.generationConfiguration),
|
|
542
|
+
}),
|
|
543
|
+
});
|
|
519
544
|
export const GenerationConfigurationFilterSensitiveLog = (obj) => ({
|
|
520
545
|
...obj,
|
|
521
546
|
...(obj.promptTemplate && { promptTemplate: PromptTemplateFilterSensitiveLog(obj.promptTemplate) }),
|
|
@@ -598,6 +623,9 @@ export const RetrieveAndGenerateConfigurationFilterSensitiveLog = (obj) => ({
|
|
|
598
623
|
...(obj.knowledgeBaseConfiguration && {
|
|
599
624
|
knowledgeBaseConfiguration: KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog(obj.knowledgeBaseConfiguration),
|
|
600
625
|
}),
|
|
626
|
+
...(obj.externalSourcesConfiguration && {
|
|
627
|
+
externalSourcesConfiguration: ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog(obj.externalSourcesConfiguration),
|
|
628
|
+
}),
|
|
601
629
|
});
|
|
602
630
|
export const RetrieveAndGenerateRequestFilterSensitiveLog = (obj) => ({
|
|
603
631
|
...obj,
|
|
@@ -407,6 +407,34 @@ const de_ValidationException_event = async (output, context) => {
|
|
|
407
407
|
};
|
|
408
408
|
return de_ValidationExceptionRes(parsedOutput, context);
|
|
409
409
|
};
|
|
410
|
+
const se_ByteContentDoc = (input, context) => {
|
|
411
|
+
return take(input, {
|
|
412
|
+
contentType: [],
|
|
413
|
+
data: context.base64Encoder,
|
|
414
|
+
identifier: [],
|
|
415
|
+
});
|
|
416
|
+
};
|
|
417
|
+
const se_ExternalSource = (input, context) => {
|
|
418
|
+
return take(input, {
|
|
419
|
+
byteContent: (_) => se_ByteContentDoc(_, context),
|
|
420
|
+
s3Location: _json,
|
|
421
|
+
sourceType: [],
|
|
422
|
+
});
|
|
423
|
+
};
|
|
424
|
+
const se_ExternalSources = (input, context) => {
|
|
425
|
+
return input
|
|
426
|
+
.filter((e) => e != null)
|
|
427
|
+
.map((entry) => {
|
|
428
|
+
return se_ExternalSource(entry, context);
|
|
429
|
+
});
|
|
430
|
+
};
|
|
431
|
+
const se_ExternalSourcesRetrieveAndGenerateConfiguration = (input, context) => {
|
|
432
|
+
return take(input, {
|
|
433
|
+
generationConfiguration: _json,
|
|
434
|
+
modelArn: [],
|
|
435
|
+
sources: (_) => se_ExternalSources(_, context),
|
|
436
|
+
});
|
|
437
|
+
};
|
|
410
438
|
const se_FilterAttribute = (input, context) => {
|
|
411
439
|
return take(input, {
|
|
412
440
|
key: [],
|
|
@@ -461,6 +489,7 @@ const se_RetrievalFilterList = (input, context) => {
|
|
|
461
489
|
};
|
|
462
490
|
const se_RetrieveAndGenerateConfiguration = (input, context) => {
|
|
463
491
|
return take(input, {
|
|
492
|
+
externalSourcesConfiguration: (_) => se_ExternalSourcesRetrieveAndGenerateConfiguration(_, context),
|
|
464
493
|
knowledgeBaseConfiguration: (_) => se_KnowledgeBaseRetrieveAndGenerateConfiguration(_, context),
|
|
465
494
|
type: [],
|
|
466
495
|
});
|
|
@@ -39,7 +39,7 @@ declare const RetrieveAndGenerateCommand_base: {
|
|
|
39
39
|
* text: "STRING_VALUE", // required
|
|
40
40
|
* },
|
|
41
41
|
* retrieveAndGenerateConfiguration: { // RetrieveAndGenerateConfiguration
|
|
42
|
-
* type: "KNOWLEDGE_BASE", // required
|
|
42
|
+
* type: "KNOWLEDGE_BASE" || "EXTERNAL_SOURCES", // required
|
|
43
43
|
* knowledgeBaseConfiguration: { // KnowledgeBaseRetrieveAndGenerateConfiguration
|
|
44
44
|
* knowledgeBaseId: "STRING_VALUE", // required
|
|
45
45
|
* modelArn: "STRING_VALUE", // required
|
|
@@ -103,6 +103,27 @@ declare const RetrieveAndGenerateCommand_base: {
|
|
|
103
103
|
* },
|
|
104
104
|
* },
|
|
105
105
|
* },
|
|
106
|
+
* externalSourcesConfiguration: { // ExternalSourcesRetrieveAndGenerateConfiguration
|
|
107
|
+
* modelArn: "STRING_VALUE", // required
|
|
108
|
+
* sources: [ // ExternalSources // required
|
|
109
|
+
* { // ExternalSource
|
|
110
|
+
* sourceType: "S3" || "BYTE_CONTENT", // required
|
|
111
|
+
* s3Location: { // S3ObjectDoc
|
|
112
|
+
* uri: "STRING_VALUE", // required
|
|
113
|
+
* },
|
|
114
|
+
* byteContent: { // ByteContentDoc
|
|
115
|
+
* identifier: "STRING_VALUE", // required
|
|
116
|
+
* contentType: "STRING_VALUE", // required
|
|
117
|
+
* data: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required
|
|
118
|
+
* },
|
|
119
|
+
* },
|
|
120
|
+
* ],
|
|
121
|
+
* generationConfiguration: { // ExternalSourcesGenerationConfiguration
|
|
122
|
+
* promptTemplate: {
|
|
123
|
+
* textPromptTemplate: "STRING_VALUE",
|
|
124
|
+
* },
|
|
125
|
+
* },
|
|
126
|
+
* },
|
|
106
127
|
* },
|
|
107
128
|
* sessionConfiguration: { // RetrieveAndGenerateSessionConfiguration
|
|
108
129
|
* kmsKeyArn: "STRING_VALUE", // required
|
|
@@ -1914,6 +1914,103 @@ export interface PromptTemplate {
|
|
|
1914
1914
|
*/
|
|
1915
1915
|
textPromptTemplate?: string;
|
|
1916
1916
|
}
|
|
1917
|
+
/**
|
|
1918
|
+
* <p>Contains the generation configuration of the external source wrapper object.</p>
|
|
1919
|
+
* @public
|
|
1920
|
+
*/
|
|
1921
|
+
export interface ExternalSourcesGenerationConfiguration {
|
|
1922
|
+
/**
|
|
1923
|
+
* <p>Contain the textPromptTemplate string for the external source wrapper object.</p>
|
|
1924
|
+
* @public
|
|
1925
|
+
*/
|
|
1926
|
+
promptTemplate?: PromptTemplate;
|
|
1927
|
+
}
|
|
1928
|
+
/**
|
|
1929
|
+
* <p>This property contains the document to chat with, along with its attributes.</p>
|
|
1930
|
+
* @public
|
|
1931
|
+
*/
|
|
1932
|
+
export interface ByteContentDoc {
|
|
1933
|
+
/**
|
|
1934
|
+
* <p>The file name of the document contained in the wrapper object.</p>
|
|
1935
|
+
* @public
|
|
1936
|
+
*/
|
|
1937
|
+
identifier: string | undefined;
|
|
1938
|
+
/**
|
|
1939
|
+
* <p>The MIME type of the document contained in the wrapper object.</p>
|
|
1940
|
+
* @public
|
|
1941
|
+
*/
|
|
1942
|
+
contentType: string | undefined;
|
|
1943
|
+
/**
|
|
1944
|
+
* <p>The byte value of the file to upload, encoded as a Base-64 string.</p>
|
|
1945
|
+
* @public
|
|
1946
|
+
*/
|
|
1947
|
+
data: Uint8Array | undefined;
|
|
1948
|
+
}
|
|
1949
|
+
/**
|
|
1950
|
+
* <p>The unique wrapper object of the document from the S3 location.</p>
|
|
1951
|
+
* @public
|
|
1952
|
+
*/
|
|
1953
|
+
export interface S3ObjectDoc {
|
|
1954
|
+
/**
|
|
1955
|
+
* <p>The file location of the S3 wrapper object.</p>
|
|
1956
|
+
* @public
|
|
1957
|
+
*/
|
|
1958
|
+
uri: string | undefined;
|
|
1959
|
+
}
|
|
1960
|
+
/**
|
|
1961
|
+
* @public
|
|
1962
|
+
* @enum
|
|
1963
|
+
*/
|
|
1964
|
+
export declare const ExternalSourceType: {
|
|
1965
|
+
readonly BYTE_CONTENT: "BYTE_CONTENT";
|
|
1966
|
+
readonly S3: "S3";
|
|
1967
|
+
};
|
|
1968
|
+
/**
|
|
1969
|
+
* @public
|
|
1970
|
+
*/
|
|
1971
|
+
export type ExternalSourceType = (typeof ExternalSourceType)[keyof typeof ExternalSourceType];
|
|
1972
|
+
/**
|
|
1973
|
+
* <p>The unique external source of the content contained in the wrapper object.</p>
|
|
1974
|
+
* @public
|
|
1975
|
+
*/
|
|
1976
|
+
export interface ExternalSource {
|
|
1977
|
+
/**
|
|
1978
|
+
* <p>The source type of the external source wrapper object.</p>
|
|
1979
|
+
* @public
|
|
1980
|
+
*/
|
|
1981
|
+
sourceType: ExternalSourceType | undefined;
|
|
1982
|
+
/**
|
|
1983
|
+
* <p>The S3 location of the external source wrapper object.</p>
|
|
1984
|
+
* @public
|
|
1985
|
+
*/
|
|
1986
|
+
s3Location?: S3ObjectDoc;
|
|
1987
|
+
/**
|
|
1988
|
+
* <p>The identifier, contentType, and data of the external source wrapper object.</p>
|
|
1989
|
+
* @public
|
|
1990
|
+
*/
|
|
1991
|
+
byteContent?: ByteContentDoc;
|
|
1992
|
+
}
|
|
1993
|
+
/**
|
|
1994
|
+
* <p>The configurations of the external source wrapper object in the retrieveAndGenerate function.</p>
|
|
1995
|
+
* @public
|
|
1996
|
+
*/
|
|
1997
|
+
export interface ExternalSourcesRetrieveAndGenerateConfiguration {
|
|
1998
|
+
/**
|
|
1999
|
+
* <p>The modelArn used with the external source wrapper object in the retrieveAndGenerate function.</p>
|
|
2000
|
+
* @public
|
|
2001
|
+
*/
|
|
2002
|
+
modelArn: string | undefined;
|
|
2003
|
+
/**
|
|
2004
|
+
* <p>The document used with the external source wrapper object in the retrieveAndGenerate function.</p>
|
|
2005
|
+
* @public
|
|
2006
|
+
*/
|
|
2007
|
+
sources: ExternalSource[] | undefined;
|
|
2008
|
+
/**
|
|
2009
|
+
* <p>The prompt used with the external source wrapper object with the retrieveAndGenerate function.</p>
|
|
2010
|
+
* @public
|
|
2011
|
+
*/
|
|
2012
|
+
generationConfiguration?: ExternalSourcesGenerationConfiguration;
|
|
2013
|
+
}
|
|
1917
2014
|
/**
|
|
1918
2015
|
* <p>Contains configurations for response generation based on the knowledge base query results.</p>
|
|
1919
2016
|
* <p>This data type is used in the following API operations:</p>
|
|
@@ -1974,6 +2071,7 @@ export type SearchType = (typeof SearchType)[keyof typeof SearchType];
|
|
|
1974
2071
|
* @enum
|
|
1975
2072
|
*/
|
|
1976
2073
|
export declare const RetrieveAndGenerateType: {
|
|
2074
|
+
readonly EXTERNAL_SOURCES: "EXTERNAL_SOURCES";
|
|
1977
2075
|
readonly KNOWLEDGE_BASE: "KNOWLEDGE_BASE";
|
|
1978
2076
|
};
|
|
1979
2077
|
/**
|
|
@@ -2491,6 +2589,11 @@ export interface RetrieveAndGenerateConfiguration {
|
|
|
2491
2589
|
* @public
|
|
2492
2590
|
*/
|
|
2493
2591
|
knowledgeBaseConfiguration?: KnowledgeBaseRetrieveAndGenerateConfiguration;
|
|
2592
|
+
/**
|
|
2593
|
+
* <p>The configuration used with the external source wrapper object in the retrieveAndGenerate function.</p>
|
|
2594
|
+
* @public
|
|
2595
|
+
*/
|
|
2596
|
+
externalSourcesConfiguration?: ExternalSourcesRetrieveAndGenerateConfiguration;
|
|
2494
2597
|
}
|
|
2495
2598
|
/**
|
|
2496
2599
|
* @public
|
|
@@ -2673,6 +2776,22 @@ export declare const RetrieveAndGenerateInputFilterSensitiveLog: (obj: RetrieveA
|
|
|
2673
2776
|
* @internal
|
|
2674
2777
|
*/
|
|
2675
2778
|
export declare const PromptTemplateFilterSensitiveLog: (obj: PromptTemplate) => any;
|
|
2779
|
+
/**
|
|
2780
|
+
* @internal
|
|
2781
|
+
*/
|
|
2782
|
+
export declare const ExternalSourcesGenerationConfigurationFilterSensitiveLog: (obj: ExternalSourcesGenerationConfiguration) => any;
|
|
2783
|
+
/**
|
|
2784
|
+
* @internal
|
|
2785
|
+
*/
|
|
2786
|
+
export declare const ByteContentDocFilterSensitiveLog: (obj: ByteContentDoc) => any;
|
|
2787
|
+
/**
|
|
2788
|
+
* @internal
|
|
2789
|
+
*/
|
|
2790
|
+
export declare const ExternalSourceFilterSensitiveLog: (obj: ExternalSource) => any;
|
|
2791
|
+
/**
|
|
2792
|
+
* @internal
|
|
2793
|
+
*/
|
|
2794
|
+
export declare const ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog: (obj: ExternalSourcesRetrieveAndGenerateConfiguration) => any;
|
|
2676
2795
|
/**
|
|
2677
2796
|
* @internal
|
|
2678
2797
|
*/
|
|
@@ -749,6 +749,33 @@ export interface RetrieveAndGenerateInput {
|
|
|
749
749
|
export interface PromptTemplate {
|
|
750
750
|
textPromptTemplate?: string;
|
|
751
751
|
}
|
|
752
|
+
export interface ExternalSourcesGenerationConfiguration {
|
|
753
|
+
promptTemplate?: PromptTemplate;
|
|
754
|
+
}
|
|
755
|
+
export interface ByteContentDoc {
|
|
756
|
+
identifier: string | undefined;
|
|
757
|
+
contentType: string | undefined;
|
|
758
|
+
data: Uint8Array | undefined;
|
|
759
|
+
}
|
|
760
|
+
export interface S3ObjectDoc {
|
|
761
|
+
uri: string | undefined;
|
|
762
|
+
}
|
|
763
|
+
export declare const ExternalSourceType: {
|
|
764
|
+
readonly BYTE_CONTENT: "BYTE_CONTENT";
|
|
765
|
+
readonly S3: "S3";
|
|
766
|
+
};
|
|
767
|
+
export type ExternalSourceType =
|
|
768
|
+
(typeof ExternalSourceType)[keyof typeof ExternalSourceType];
|
|
769
|
+
export interface ExternalSource {
|
|
770
|
+
sourceType: ExternalSourceType | undefined;
|
|
771
|
+
s3Location?: S3ObjectDoc;
|
|
772
|
+
byteContent?: ByteContentDoc;
|
|
773
|
+
}
|
|
774
|
+
export interface ExternalSourcesRetrieveAndGenerateConfiguration {
|
|
775
|
+
modelArn: string | undefined;
|
|
776
|
+
sources: ExternalSource[] | undefined;
|
|
777
|
+
generationConfiguration?: ExternalSourcesGenerationConfiguration;
|
|
778
|
+
}
|
|
752
779
|
export interface GenerationConfiguration {
|
|
753
780
|
promptTemplate?: PromptTemplate;
|
|
754
781
|
}
|
|
@@ -762,6 +789,7 @@ export declare const SearchType: {
|
|
|
762
789
|
};
|
|
763
790
|
export type SearchType = (typeof SearchType)[keyof typeof SearchType];
|
|
764
791
|
export declare const RetrieveAndGenerateType: {
|
|
792
|
+
readonly EXTERNAL_SOURCES: "EXTERNAL_SOURCES";
|
|
765
793
|
readonly KNOWLEDGE_BASE: "KNOWLEDGE_BASE";
|
|
766
794
|
};
|
|
767
795
|
export type RetrieveAndGenerateType =
|
|
@@ -1011,6 +1039,7 @@ export interface RetrieveRequest {
|
|
|
1011
1039
|
export interface RetrieveAndGenerateConfiguration {
|
|
1012
1040
|
type: RetrieveAndGenerateType | undefined;
|
|
1013
1041
|
knowledgeBaseConfiguration?: KnowledgeBaseRetrieveAndGenerateConfiguration;
|
|
1042
|
+
externalSourcesConfiguration?: ExternalSourcesRetrieveAndGenerateConfiguration;
|
|
1014
1043
|
}
|
|
1015
1044
|
export interface RetrieveAndGenerateRequest {
|
|
1016
1045
|
sessionId?: string;
|
|
@@ -1115,6 +1144,18 @@ export declare const RetrieveAndGenerateInputFilterSensitiveLog: (
|
|
|
1115
1144
|
export declare const PromptTemplateFilterSensitiveLog: (
|
|
1116
1145
|
obj: PromptTemplate
|
|
1117
1146
|
) => any;
|
|
1147
|
+
export declare const ExternalSourcesGenerationConfigurationFilterSensitiveLog: (
|
|
1148
|
+
obj: ExternalSourcesGenerationConfiguration
|
|
1149
|
+
) => any;
|
|
1150
|
+
export declare const ByteContentDocFilterSensitiveLog: (
|
|
1151
|
+
obj: ByteContentDoc
|
|
1152
|
+
) => any;
|
|
1153
|
+
export declare const ExternalSourceFilterSensitiveLog: (
|
|
1154
|
+
obj: ExternalSource
|
|
1155
|
+
) => any;
|
|
1156
|
+
export declare const ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog: (
|
|
1157
|
+
obj: ExternalSourcesRetrieveAndGenerateConfiguration
|
|
1158
|
+
) => any;
|
|
1118
1159
|
export declare const GenerationConfigurationFilterSensitiveLog: (
|
|
1119
1160
|
obj: GenerationConfiguration
|
|
1120
1161
|
) => any;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-bedrock-agent-runtime",
|
|
3
3
|
"description": "AWS SDK for JavaScript Bedrock Agent Runtime Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.563.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-agent-runtime",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
23
|
"@aws-sdk/client-sts": "3.556.0",
|
|
24
24
|
"@aws-sdk/core": "3.556.0",
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.563.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.535.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.535.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.535.0",
|