@aws-sdk/client-bedrock 3.699.0 → 3.703.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 +667 -33
- package/dist-es/models/models_0.js +214 -24
- package/dist-es/protocols/Aws_restJson1.js +407 -3
- package/dist-types/commands/BatchDeleteEvaluationJobCommand.d.ts +3 -1
- package/dist-types/commands/CreateEvaluationJobCommand.d.ts +156 -2
- package/dist-types/commands/GetEvaluationJobCommand.d.ts +156 -3
- package/dist-types/commands/ListEvaluationJobsCommand.d.ts +10 -2
- package/dist-types/commands/StopEvaluationJobCommand.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +1171 -146
- package/dist-types/ts3.4/models/models_0.d.ts +549 -52
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { requestBuilder as rb } from "@smithy/core";
|
|
|
3
3
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeDateTime as __serializeDateTime, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
5
|
import { BedrockServiceException as __BaseException } from "../models/BedrockServiceException";
|
|
6
|
-
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, TooManyTagsException, ValidationException, } from "../models/models_0";
|
|
6
|
+
import { AccessDeniedException, ConflictException, EvaluationInferenceConfig, InternalServerException, KnowledgeBaseConfig, RAGConfig, ResourceNotFoundException, RetrievalFilter, ServiceQuotaExceededException, ThrottlingException, TooManyTagsException, ValidationException, } from "../models/models_0";
|
|
7
7
|
export const se_BatchDeleteEvaluationJobCommand = async (input, context) => {
|
|
8
8
|
const b = rb(input, context);
|
|
9
9
|
const headers = {
|
|
@@ -25,10 +25,11 @@ export const se_CreateEvaluationJobCommand = async (input, context) => {
|
|
|
25
25
|
b.bp("/evaluation-jobs");
|
|
26
26
|
let body;
|
|
27
27
|
body = JSON.stringify(take(input, {
|
|
28
|
+
applicationType: [],
|
|
28
29
|
clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
29
30
|
customerEncryptionKeyId: [],
|
|
30
31
|
evaluationConfig: (_) => _json(_),
|
|
31
|
-
inferenceConfig: (_) =>
|
|
32
|
+
inferenceConfig: (_) => se_EvaluationInferenceConfig(_, context),
|
|
32
33
|
jobDescription: [],
|
|
33
34
|
jobName: [],
|
|
34
35
|
jobTags: (_) => _json(_),
|
|
@@ -391,6 +392,7 @@ export const se_ListEvaluationJobsCommand = async (input, context) => {
|
|
|
391
392
|
[_cTA]: [() => input.creationTimeAfter !== void 0, () => __serializeDateTime(input[_cTA]).toString()],
|
|
392
393
|
[_cTB]: [() => input.creationTimeBefore !== void 0, () => __serializeDateTime(input[_cTB]).toString()],
|
|
393
394
|
[_sE]: [, input[_sE]],
|
|
395
|
+
[_aTE]: [, input[_aTE]],
|
|
394
396
|
[_nC]: [, input[_nC]],
|
|
395
397
|
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
396
398
|
[_nT]: [, input[_nT]],
|
|
@@ -912,11 +914,12 @@ export const de_GetEvaluationJobCommand = async (output, context) => {
|
|
|
912
914
|
});
|
|
913
915
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
914
916
|
const doc = take(data, {
|
|
917
|
+
applicationType: __expectString,
|
|
915
918
|
creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
916
919
|
customerEncryptionKeyId: __expectString,
|
|
917
920
|
evaluationConfig: (_) => _json(__expectUnion(_)),
|
|
918
921
|
failureMessages: _json,
|
|
919
|
-
inferenceConfig: (_) =>
|
|
922
|
+
inferenceConfig: (_) => de_EvaluationInferenceConfig(__expectUnion(_), context),
|
|
920
923
|
jobArn: __expectString,
|
|
921
924
|
jobDescription: __expectString,
|
|
922
925
|
jobName: __expectString,
|
|
@@ -1581,6 +1584,78 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
1581
1584
|
});
|
|
1582
1585
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
1583
1586
|
};
|
|
1587
|
+
const se_AdditionalModelRequestFields = (input, context) => {
|
|
1588
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1589
|
+
if (value === null) {
|
|
1590
|
+
return acc;
|
|
1591
|
+
}
|
|
1592
|
+
acc[key] = se_AdditionalModelRequestFieldsValue(value, context);
|
|
1593
|
+
return acc;
|
|
1594
|
+
}, {});
|
|
1595
|
+
};
|
|
1596
|
+
const se_AdditionalModelRequestFieldsValue = (input, context) => {
|
|
1597
|
+
return input;
|
|
1598
|
+
};
|
|
1599
|
+
const se_ByteContentDoc = (input, context) => {
|
|
1600
|
+
return take(input, {
|
|
1601
|
+
contentType: [],
|
|
1602
|
+
data: context.base64Encoder,
|
|
1603
|
+
identifier: [],
|
|
1604
|
+
});
|
|
1605
|
+
};
|
|
1606
|
+
const se_EvaluationInferenceConfig = (input, context) => {
|
|
1607
|
+
return EvaluationInferenceConfig.visit(input, {
|
|
1608
|
+
models: (value) => ({ models: _json(value) }),
|
|
1609
|
+
ragConfigs: (value) => ({ ragConfigs: se_RagConfigs(value, context) }),
|
|
1610
|
+
_: (name, value) => ({ name: value }),
|
|
1611
|
+
});
|
|
1612
|
+
};
|
|
1613
|
+
const se_ExternalSource = (input, context) => {
|
|
1614
|
+
return take(input, {
|
|
1615
|
+
byteContent: (_) => se_ByteContentDoc(_, context),
|
|
1616
|
+
s3Location: _json,
|
|
1617
|
+
sourceType: [],
|
|
1618
|
+
});
|
|
1619
|
+
};
|
|
1620
|
+
const se_ExternalSources = (input, context) => {
|
|
1621
|
+
return input
|
|
1622
|
+
.filter((e) => e != null)
|
|
1623
|
+
.map((entry) => {
|
|
1624
|
+
return se_ExternalSource(entry, context);
|
|
1625
|
+
});
|
|
1626
|
+
};
|
|
1627
|
+
const se_ExternalSourcesGenerationConfiguration = (input, context) => {
|
|
1628
|
+
return take(input, {
|
|
1629
|
+
additionalModelRequestFields: (_) => se_AdditionalModelRequestFields(_, context),
|
|
1630
|
+
guardrailConfiguration: _json,
|
|
1631
|
+
kbInferenceConfig: (_) => se_KbInferenceConfig(_, context),
|
|
1632
|
+
promptTemplate: _json,
|
|
1633
|
+
});
|
|
1634
|
+
};
|
|
1635
|
+
const se_ExternalSourcesRetrieveAndGenerateConfiguration = (input, context) => {
|
|
1636
|
+
return take(input, {
|
|
1637
|
+
generationConfiguration: (_) => se_ExternalSourcesGenerationConfiguration(_, context),
|
|
1638
|
+
modelArn: [],
|
|
1639
|
+
sources: (_) => se_ExternalSources(_, context),
|
|
1640
|
+
});
|
|
1641
|
+
};
|
|
1642
|
+
const se_FilterAttribute = (input, context) => {
|
|
1643
|
+
return take(input, {
|
|
1644
|
+
key: [],
|
|
1645
|
+
value: (_) => se_FilterValue(_, context),
|
|
1646
|
+
});
|
|
1647
|
+
};
|
|
1648
|
+
const se_FilterValue = (input, context) => {
|
|
1649
|
+
return input;
|
|
1650
|
+
};
|
|
1651
|
+
const se_GenerationConfiguration = (input, context) => {
|
|
1652
|
+
return take(input, {
|
|
1653
|
+
additionalModelRequestFields: (_) => se_AdditionalModelRequestFields(_, context),
|
|
1654
|
+
guardrailConfiguration: _json,
|
|
1655
|
+
kbInferenceConfig: (_) => se_KbInferenceConfig(_, context),
|
|
1656
|
+
promptTemplate: _json,
|
|
1657
|
+
});
|
|
1658
|
+
};
|
|
1584
1659
|
const se_GuardrailContextualGroundingFilterConfig = (input, context) => {
|
|
1585
1660
|
return take(input, {
|
|
1586
1661
|
threshold: __serializeFloat,
|
|
@@ -1599,6 +1674,119 @@ const se_GuardrailContextualGroundingPolicyConfig = (input, context) => {
|
|
|
1599
1674
|
filtersConfig: (_) => se_GuardrailContextualGroundingFiltersConfig(_, context),
|
|
1600
1675
|
});
|
|
1601
1676
|
};
|
|
1677
|
+
const se_KbInferenceConfig = (input, context) => {
|
|
1678
|
+
return take(input, {
|
|
1679
|
+
textInferenceConfig: (_) => se_TextInferenceConfig(_, context),
|
|
1680
|
+
});
|
|
1681
|
+
};
|
|
1682
|
+
const se_KnowledgeBaseConfig = (input, context) => {
|
|
1683
|
+
return KnowledgeBaseConfig.visit(input, {
|
|
1684
|
+
retrieveAndGenerateConfig: (value) => ({
|
|
1685
|
+
retrieveAndGenerateConfig: se_RetrieveAndGenerateConfiguration(value, context),
|
|
1686
|
+
}),
|
|
1687
|
+
retrieveConfig: (value) => ({ retrieveConfig: se_RetrieveConfig(value, context) }),
|
|
1688
|
+
_: (name, value) => ({ name: value }),
|
|
1689
|
+
});
|
|
1690
|
+
};
|
|
1691
|
+
const se_KnowledgeBaseRetrievalConfiguration = (input, context) => {
|
|
1692
|
+
return take(input, {
|
|
1693
|
+
vectorSearchConfiguration: (_) => se_KnowledgeBaseVectorSearchConfiguration(_, context),
|
|
1694
|
+
});
|
|
1695
|
+
};
|
|
1696
|
+
const se_KnowledgeBaseRetrieveAndGenerateConfiguration = (input, context) => {
|
|
1697
|
+
return take(input, {
|
|
1698
|
+
generationConfiguration: (_) => se_GenerationConfiguration(_, context),
|
|
1699
|
+
knowledgeBaseId: [],
|
|
1700
|
+
modelArn: [],
|
|
1701
|
+
orchestrationConfiguration: _json,
|
|
1702
|
+
retrievalConfiguration: (_) => se_KnowledgeBaseRetrievalConfiguration(_, context),
|
|
1703
|
+
});
|
|
1704
|
+
};
|
|
1705
|
+
const se_KnowledgeBaseVectorSearchConfiguration = (input, context) => {
|
|
1706
|
+
return take(input, {
|
|
1707
|
+
filter: (_) => se_RetrievalFilter(_, context),
|
|
1708
|
+
numberOfResults: [],
|
|
1709
|
+
overrideSearchType: [],
|
|
1710
|
+
});
|
|
1711
|
+
};
|
|
1712
|
+
const se_RAGConfig = (input, context) => {
|
|
1713
|
+
return RAGConfig.visit(input, {
|
|
1714
|
+
knowledgeBaseConfig: (value) => ({ knowledgeBaseConfig: se_KnowledgeBaseConfig(value, context) }),
|
|
1715
|
+
_: (name, value) => ({ name: value }),
|
|
1716
|
+
});
|
|
1717
|
+
};
|
|
1718
|
+
const se_RagConfigs = (input, context) => {
|
|
1719
|
+
return input
|
|
1720
|
+
.filter((e) => e != null)
|
|
1721
|
+
.map((entry) => {
|
|
1722
|
+
return se_RAGConfig(entry, context);
|
|
1723
|
+
});
|
|
1724
|
+
};
|
|
1725
|
+
const se_RetrievalFilter = (input, context) => {
|
|
1726
|
+
return RetrievalFilter.visit(input, {
|
|
1727
|
+
andAll: (value) => ({ andAll: se_RetrievalFilterList(value, context) }),
|
|
1728
|
+
equals: (value) => ({ equals: se_FilterAttribute(value, context) }),
|
|
1729
|
+
greaterThan: (value) => ({ greaterThan: se_FilterAttribute(value, context) }),
|
|
1730
|
+
greaterThanOrEquals: (value) => ({ greaterThanOrEquals: se_FilterAttribute(value, context) }),
|
|
1731
|
+
in: (value) => ({ in: se_FilterAttribute(value, context) }),
|
|
1732
|
+
lessThan: (value) => ({ lessThan: se_FilterAttribute(value, context) }),
|
|
1733
|
+
lessThanOrEquals: (value) => ({ lessThanOrEquals: se_FilterAttribute(value, context) }),
|
|
1734
|
+
listContains: (value) => ({ listContains: se_FilterAttribute(value, context) }),
|
|
1735
|
+
notEquals: (value) => ({ notEquals: se_FilterAttribute(value, context) }),
|
|
1736
|
+
notIn: (value) => ({ notIn: se_FilterAttribute(value, context) }),
|
|
1737
|
+
orAll: (value) => ({ orAll: se_RetrievalFilterList(value, context) }),
|
|
1738
|
+
startsWith: (value) => ({ startsWith: se_FilterAttribute(value, context) }),
|
|
1739
|
+
stringContains: (value) => ({ stringContains: se_FilterAttribute(value, context) }),
|
|
1740
|
+
_: (name, value) => ({ name: value }),
|
|
1741
|
+
});
|
|
1742
|
+
};
|
|
1743
|
+
const se_RetrievalFilterList = (input, context) => {
|
|
1744
|
+
return input
|
|
1745
|
+
.filter((e) => e != null)
|
|
1746
|
+
.map((entry) => {
|
|
1747
|
+
return se_RetrievalFilter(entry, context);
|
|
1748
|
+
});
|
|
1749
|
+
};
|
|
1750
|
+
const se_RetrieveAndGenerateConfiguration = (input, context) => {
|
|
1751
|
+
return take(input, {
|
|
1752
|
+
externalSourcesConfiguration: (_) => se_ExternalSourcesRetrieveAndGenerateConfiguration(_, context),
|
|
1753
|
+
knowledgeBaseConfiguration: (_) => se_KnowledgeBaseRetrieveAndGenerateConfiguration(_, context),
|
|
1754
|
+
type: [],
|
|
1755
|
+
});
|
|
1756
|
+
};
|
|
1757
|
+
const se_RetrieveConfig = (input, context) => {
|
|
1758
|
+
return take(input, {
|
|
1759
|
+
knowledgeBaseId: [],
|
|
1760
|
+
knowledgeBaseRetrievalConfiguration: (_) => se_KnowledgeBaseRetrievalConfiguration(_, context),
|
|
1761
|
+
});
|
|
1762
|
+
};
|
|
1763
|
+
const se_TextInferenceConfig = (input, context) => {
|
|
1764
|
+
return take(input, {
|
|
1765
|
+
maxTokens: [],
|
|
1766
|
+
stopSequences: _json,
|
|
1767
|
+
temperature: __serializeFloat,
|
|
1768
|
+
topP: __serializeFloat,
|
|
1769
|
+
});
|
|
1770
|
+
};
|
|
1771
|
+
const de_AdditionalModelRequestFields = (output, context) => {
|
|
1772
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1773
|
+
if (value === null) {
|
|
1774
|
+
return acc;
|
|
1775
|
+
}
|
|
1776
|
+
acc[key] = de_AdditionalModelRequestFieldsValue(value, context);
|
|
1777
|
+
return acc;
|
|
1778
|
+
}, {});
|
|
1779
|
+
};
|
|
1780
|
+
const de_AdditionalModelRequestFieldsValue = (output, context) => {
|
|
1781
|
+
return output;
|
|
1782
|
+
};
|
|
1783
|
+
const de_ByteContentDoc = (output, context) => {
|
|
1784
|
+
return take(output, {
|
|
1785
|
+
contentType: __expectString,
|
|
1786
|
+
data: context.base64Decoder,
|
|
1787
|
+
identifier: __expectString,
|
|
1788
|
+
});
|
|
1789
|
+
};
|
|
1602
1790
|
const de_CustomModelSummary = (output, context) => {
|
|
1603
1791
|
return take(output, {
|
|
1604
1792
|
baseModelArn: __expectString,
|
|
@@ -1618,6 +1806,19 @@ const de_CustomModelSummaryList = (output, context) => {
|
|
|
1618
1806
|
});
|
|
1619
1807
|
return retVal;
|
|
1620
1808
|
};
|
|
1809
|
+
const de_EvaluationInferenceConfig = (output, context) => {
|
|
1810
|
+
if (output.models != null) {
|
|
1811
|
+
return {
|
|
1812
|
+
models: _json(output.models),
|
|
1813
|
+
};
|
|
1814
|
+
}
|
|
1815
|
+
if (output.ragConfigs != null) {
|
|
1816
|
+
return {
|
|
1817
|
+
ragConfigs: de_RagConfigs(output.ragConfigs, context),
|
|
1818
|
+
};
|
|
1819
|
+
}
|
|
1820
|
+
return { $unknown: Object.entries(output)[0] };
|
|
1821
|
+
};
|
|
1621
1822
|
const de_EvaluationSummaries = (output, context) => {
|
|
1622
1823
|
const retVal = (output || [])
|
|
1623
1824
|
.filter((e) => e != null)
|
|
@@ -1628,15 +1829,65 @@ const de_EvaluationSummaries = (output, context) => {
|
|
|
1628
1829
|
};
|
|
1629
1830
|
const de_EvaluationSummary = (output, context) => {
|
|
1630
1831
|
return take(output, {
|
|
1832
|
+
applicationType: __expectString,
|
|
1631
1833
|
creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1632
1834
|
evaluationTaskTypes: _json,
|
|
1835
|
+
evaluatorModelIdentifiers: _json,
|
|
1633
1836
|
jobArn: __expectString,
|
|
1634
1837
|
jobName: __expectString,
|
|
1635
1838
|
jobType: __expectString,
|
|
1636
1839
|
modelIdentifiers: _json,
|
|
1840
|
+
ragIdentifiers: _json,
|
|
1637
1841
|
status: __expectString,
|
|
1638
1842
|
});
|
|
1639
1843
|
};
|
|
1844
|
+
const de_ExternalSource = (output, context) => {
|
|
1845
|
+
return take(output, {
|
|
1846
|
+
byteContent: (_) => de_ByteContentDoc(_, context),
|
|
1847
|
+
s3Location: _json,
|
|
1848
|
+
sourceType: __expectString,
|
|
1849
|
+
});
|
|
1850
|
+
};
|
|
1851
|
+
const de_ExternalSources = (output, context) => {
|
|
1852
|
+
const retVal = (output || [])
|
|
1853
|
+
.filter((e) => e != null)
|
|
1854
|
+
.map((entry) => {
|
|
1855
|
+
return de_ExternalSource(entry, context);
|
|
1856
|
+
});
|
|
1857
|
+
return retVal;
|
|
1858
|
+
};
|
|
1859
|
+
const de_ExternalSourcesGenerationConfiguration = (output, context) => {
|
|
1860
|
+
return take(output, {
|
|
1861
|
+
additionalModelRequestFields: (_) => de_AdditionalModelRequestFields(_, context),
|
|
1862
|
+
guardrailConfiguration: _json,
|
|
1863
|
+
kbInferenceConfig: (_) => de_KbInferenceConfig(_, context),
|
|
1864
|
+
promptTemplate: _json,
|
|
1865
|
+
});
|
|
1866
|
+
};
|
|
1867
|
+
const de_ExternalSourcesRetrieveAndGenerateConfiguration = (output, context) => {
|
|
1868
|
+
return take(output, {
|
|
1869
|
+
generationConfiguration: (_) => de_ExternalSourcesGenerationConfiguration(_, context),
|
|
1870
|
+
modelArn: __expectString,
|
|
1871
|
+
sources: (_) => de_ExternalSources(_, context),
|
|
1872
|
+
});
|
|
1873
|
+
};
|
|
1874
|
+
const de_FilterAttribute = (output, context) => {
|
|
1875
|
+
return take(output, {
|
|
1876
|
+
key: __expectString,
|
|
1877
|
+
value: (_) => de_FilterValue(_, context),
|
|
1878
|
+
});
|
|
1879
|
+
};
|
|
1880
|
+
const de_FilterValue = (output, context) => {
|
|
1881
|
+
return output;
|
|
1882
|
+
};
|
|
1883
|
+
const de_GenerationConfiguration = (output, context) => {
|
|
1884
|
+
return take(output, {
|
|
1885
|
+
additionalModelRequestFields: (_) => de_AdditionalModelRequestFields(_, context),
|
|
1886
|
+
guardrailConfiguration: _json,
|
|
1887
|
+
kbInferenceConfig: (_) => de_KbInferenceConfig(_, context),
|
|
1888
|
+
promptTemplate: _json,
|
|
1889
|
+
});
|
|
1890
|
+
};
|
|
1640
1891
|
const de_GuardrailContextualGroundingFilter = (output, context) => {
|
|
1641
1892
|
return take(output, {
|
|
1642
1893
|
threshold: __limitedParseDouble,
|
|
@@ -1714,6 +1965,45 @@ const de_InferenceProfileSummary = (output, context) => {
|
|
|
1714
1965
|
updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1715
1966
|
});
|
|
1716
1967
|
};
|
|
1968
|
+
const de_KbInferenceConfig = (output, context) => {
|
|
1969
|
+
return take(output, {
|
|
1970
|
+
textInferenceConfig: (_) => de_TextInferenceConfig(_, context),
|
|
1971
|
+
});
|
|
1972
|
+
};
|
|
1973
|
+
const de_KnowledgeBaseConfig = (output, context) => {
|
|
1974
|
+
if (output.retrieveAndGenerateConfig != null) {
|
|
1975
|
+
return {
|
|
1976
|
+
retrieveAndGenerateConfig: de_RetrieveAndGenerateConfiguration(output.retrieveAndGenerateConfig, context),
|
|
1977
|
+
};
|
|
1978
|
+
}
|
|
1979
|
+
if (output.retrieveConfig != null) {
|
|
1980
|
+
return {
|
|
1981
|
+
retrieveConfig: de_RetrieveConfig(output.retrieveConfig, context),
|
|
1982
|
+
};
|
|
1983
|
+
}
|
|
1984
|
+
return { $unknown: Object.entries(output)[0] };
|
|
1985
|
+
};
|
|
1986
|
+
const de_KnowledgeBaseRetrievalConfiguration = (output, context) => {
|
|
1987
|
+
return take(output, {
|
|
1988
|
+
vectorSearchConfiguration: (_) => de_KnowledgeBaseVectorSearchConfiguration(_, context),
|
|
1989
|
+
});
|
|
1990
|
+
};
|
|
1991
|
+
const de_KnowledgeBaseRetrieveAndGenerateConfiguration = (output, context) => {
|
|
1992
|
+
return take(output, {
|
|
1993
|
+
generationConfiguration: (_) => de_GenerationConfiguration(_, context),
|
|
1994
|
+
knowledgeBaseId: __expectString,
|
|
1995
|
+
modelArn: __expectString,
|
|
1996
|
+
orchestrationConfiguration: _json,
|
|
1997
|
+
retrievalConfiguration: (_) => de_KnowledgeBaseRetrievalConfiguration(_, context),
|
|
1998
|
+
});
|
|
1999
|
+
};
|
|
2000
|
+
const de_KnowledgeBaseVectorSearchConfiguration = (output, context) => {
|
|
2001
|
+
return take(output, {
|
|
2002
|
+
filter: (_) => de_RetrievalFilter(__expectUnion(_), context),
|
|
2003
|
+
numberOfResults: __expectInt32,
|
|
2004
|
+
overrideSearchType: __expectString,
|
|
2005
|
+
});
|
|
2006
|
+
};
|
|
1717
2007
|
const de_ModelCopyJobSummaries = (output, context) => {
|
|
1718
2008
|
const retVal = (output || [])
|
|
1719
2009
|
.filter((e) => e != null)
|
|
@@ -1830,6 +2120,119 @@ const de_ProvisionedModelSummary = (output, context) => {
|
|
|
1830
2120
|
status: __expectString,
|
|
1831
2121
|
});
|
|
1832
2122
|
};
|
|
2123
|
+
const de_RAGConfig = (output, context) => {
|
|
2124
|
+
if (output.knowledgeBaseConfig != null) {
|
|
2125
|
+
return {
|
|
2126
|
+
knowledgeBaseConfig: de_KnowledgeBaseConfig(__expectUnion(output.knowledgeBaseConfig), context),
|
|
2127
|
+
};
|
|
2128
|
+
}
|
|
2129
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2130
|
+
};
|
|
2131
|
+
const de_RagConfigs = (output, context) => {
|
|
2132
|
+
const retVal = (output || [])
|
|
2133
|
+
.filter((e) => e != null)
|
|
2134
|
+
.map((entry) => {
|
|
2135
|
+
return de_RAGConfig(__expectUnion(entry), context);
|
|
2136
|
+
});
|
|
2137
|
+
return retVal;
|
|
2138
|
+
};
|
|
2139
|
+
const de_RetrievalFilter = (output, context) => {
|
|
2140
|
+
if (output.andAll != null) {
|
|
2141
|
+
return {
|
|
2142
|
+
andAll: de_RetrievalFilterList(output.andAll, context),
|
|
2143
|
+
};
|
|
2144
|
+
}
|
|
2145
|
+
if (output.equals != null) {
|
|
2146
|
+
return {
|
|
2147
|
+
equals: de_FilterAttribute(output.equals, context),
|
|
2148
|
+
};
|
|
2149
|
+
}
|
|
2150
|
+
if (output.greaterThan != null) {
|
|
2151
|
+
return {
|
|
2152
|
+
greaterThan: de_FilterAttribute(output.greaterThan, context),
|
|
2153
|
+
};
|
|
2154
|
+
}
|
|
2155
|
+
if (output.greaterThanOrEquals != null) {
|
|
2156
|
+
return {
|
|
2157
|
+
greaterThanOrEquals: de_FilterAttribute(output.greaterThanOrEquals, context),
|
|
2158
|
+
};
|
|
2159
|
+
}
|
|
2160
|
+
if (output.in != null) {
|
|
2161
|
+
return {
|
|
2162
|
+
in: de_FilterAttribute(output.in, context),
|
|
2163
|
+
};
|
|
2164
|
+
}
|
|
2165
|
+
if (output.lessThan != null) {
|
|
2166
|
+
return {
|
|
2167
|
+
lessThan: de_FilterAttribute(output.lessThan, context),
|
|
2168
|
+
};
|
|
2169
|
+
}
|
|
2170
|
+
if (output.lessThanOrEquals != null) {
|
|
2171
|
+
return {
|
|
2172
|
+
lessThanOrEquals: de_FilterAttribute(output.lessThanOrEquals, context),
|
|
2173
|
+
};
|
|
2174
|
+
}
|
|
2175
|
+
if (output.listContains != null) {
|
|
2176
|
+
return {
|
|
2177
|
+
listContains: de_FilterAttribute(output.listContains, context),
|
|
2178
|
+
};
|
|
2179
|
+
}
|
|
2180
|
+
if (output.notEquals != null) {
|
|
2181
|
+
return {
|
|
2182
|
+
notEquals: de_FilterAttribute(output.notEquals, context),
|
|
2183
|
+
};
|
|
2184
|
+
}
|
|
2185
|
+
if (output.notIn != null) {
|
|
2186
|
+
return {
|
|
2187
|
+
notIn: de_FilterAttribute(output.notIn, context),
|
|
2188
|
+
};
|
|
2189
|
+
}
|
|
2190
|
+
if (output.orAll != null) {
|
|
2191
|
+
return {
|
|
2192
|
+
orAll: de_RetrievalFilterList(output.orAll, context),
|
|
2193
|
+
};
|
|
2194
|
+
}
|
|
2195
|
+
if (output.startsWith != null) {
|
|
2196
|
+
return {
|
|
2197
|
+
startsWith: de_FilterAttribute(output.startsWith, context),
|
|
2198
|
+
};
|
|
2199
|
+
}
|
|
2200
|
+
if (output.stringContains != null) {
|
|
2201
|
+
return {
|
|
2202
|
+
stringContains: de_FilterAttribute(output.stringContains, context),
|
|
2203
|
+
};
|
|
2204
|
+
}
|
|
2205
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2206
|
+
};
|
|
2207
|
+
const de_RetrievalFilterList = (output, context) => {
|
|
2208
|
+
const retVal = (output || [])
|
|
2209
|
+
.filter((e) => e != null)
|
|
2210
|
+
.map((entry) => {
|
|
2211
|
+
return de_RetrievalFilter(__expectUnion(entry), context);
|
|
2212
|
+
});
|
|
2213
|
+
return retVal;
|
|
2214
|
+
};
|
|
2215
|
+
const de_RetrieveAndGenerateConfiguration = (output, context) => {
|
|
2216
|
+
return take(output, {
|
|
2217
|
+
externalSourcesConfiguration: (_) => de_ExternalSourcesRetrieveAndGenerateConfiguration(_, context),
|
|
2218
|
+
knowledgeBaseConfiguration: (_) => de_KnowledgeBaseRetrieveAndGenerateConfiguration(_, context),
|
|
2219
|
+
type: __expectString,
|
|
2220
|
+
});
|
|
2221
|
+
};
|
|
2222
|
+
const de_RetrieveConfig = (output, context) => {
|
|
2223
|
+
return take(output, {
|
|
2224
|
+
knowledgeBaseId: __expectString,
|
|
2225
|
+
knowledgeBaseRetrievalConfiguration: (_) => de_KnowledgeBaseRetrievalConfiguration(_, context),
|
|
2226
|
+
});
|
|
2227
|
+
};
|
|
2228
|
+
const de_TextInferenceConfig = (output, context) => {
|
|
2229
|
+
return take(output, {
|
|
2230
|
+
maxTokens: __expectInt32,
|
|
2231
|
+
stopSequences: _json,
|
|
2232
|
+
temperature: __limitedParseFloat32,
|
|
2233
|
+
topP: __limitedParseFloat32,
|
|
2234
|
+
});
|
|
2235
|
+
};
|
|
1833
2236
|
const de_TrainingMetrics = (output, context) => {
|
|
1834
2237
|
return take(output, {
|
|
1835
2238
|
trainingLoss: __limitedParseFloat32,
|
|
@@ -1855,6 +2258,7 @@ const deserializeMetadata = (output) => ({
|
|
|
1855
2258
|
cfId: output.headers["x-amz-cf-id"],
|
|
1856
2259
|
});
|
|
1857
2260
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
2261
|
+
const _aTE = "applicationTypeEquals";
|
|
1858
2262
|
const _bCT = "byCustomizationType";
|
|
1859
2263
|
const _bIT = "byInferenceType";
|
|
1860
2264
|
const _bMAE = "baseModelArnEquals";
|
|
@@ -27,7 +27,9 @@ declare const BatchDeleteEvaluationJobCommand_base: {
|
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* <p>
|
|
30
|
+
* <p>Deletes a batch of evaluation jobs. An evaluation job can only be deleted if it has
|
|
31
|
+
* following status <code>FAILED</code>, <code>COMPLETED</code>, and <code>STOPPED</code>.
|
|
32
|
+
* You can request up to 25 model evaluation jobs be deleted in a single request.</p>
|
|
31
33
|
* @example
|
|
32
34
|
* Use a bare-bones client and the command you need to make an API call.
|
|
33
35
|
* ```javascript
|