@ductape/sdk 0.0.4-v78 → 0.0.4-v80
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/products/services/products.service.js +23 -15
- package/dist/products/services/products.service.js.map +1 -1
- package/dist/storage/storage.service.js +3 -3
- package/dist/storage/storage.service.js.map +1 -1
- package/dist/vector/index.d.ts +1 -1
- package/dist/vector/index.js.map +1 -1
- package/dist/vector/vector-database.service.js +81 -7
- package/dist/vector/vector-database.service.js.map +1 -1
- package/dist/vector/vector.service.d.ts +38 -0
- package/dist/vector/vector.service.js +165 -5
- package/dist/vector/vector.service.js.map +1 -1
- package/package.json +1 -1
|
@@ -1743,14 +1743,18 @@ class ProductsBuilderService {
|
|
|
1743
1743
|
async fetchVectors(version) {
|
|
1744
1744
|
const components = await this.productApi.fetchProductComponents(this.product_id, 'vector', this.getUserAccess());
|
|
1745
1745
|
// Decrypt sensitive fields in vector envs
|
|
1746
|
-
const decryptedComponents = components.map((vectorComponent) => {
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1746
|
+
/* const decryptedComponents = components.map((vectorComponent: any) => {
|
|
1747
|
+
const decryptedEnvs = vectorComponent.envs?.map((env: any) => {
|
|
1748
|
+
return {
|
|
1749
|
+
...env,
|
|
1750
|
+
apiKey: env.apiKey ? decrypt(env.apiKey, this.product.private_key) : env.apiKey,
|
|
1751
|
+
endpoint: env.endpoint ? decrypt(env.endpoint, this.product.private_key) : env.endpoint,
|
|
1752
|
+
};
|
|
1753
|
+
});
|
|
1754
|
+
return { ...vectorComponent, envs: decryptedEnvs };
|
|
1755
|
+
}); */
|
|
1756
|
+
//return decryptedComponents as unknown as IProductVector[];
|
|
1757
|
+
return components;
|
|
1754
1758
|
}
|
|
1755
1759
|
/**
|
|
1756
1760
|
* Fetch a specific vector database configuration by tag
|
|
@@ -1758,15 +1762,19 @@ class ProductsBuilderService {
|
|
|
1758
1762
|
* @param version Optional version
|
|
1759
1763
|
*/
|
|
1760
1764
|
async fetchVector(tag, version) {
|
|
1761
|
-
var _a;
|
|
1762
1765
|
const component = await this.productApi.fetchProductComponentByTag(this.product_id, 'vector', tag, this.getUserAccess());
|
|
1766
|
+
/*console.log(JSON.stringify(component))
|
|
1763
1767
|
if (component) {
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1768
|
+
// Decrypt sensitive fields in vector envs
|
|
1769
|
+
const decryptedEnvs = component.envs?.map((env: any) => {
|
|
1770
|
+
return {
|
|
1771
|
+
...env,
|
|
1772
|
+
apiKey: env.apiKey ? decrypt(env.apiKey, this.product.private_key) : env.apiKey,
|
|
1773
|
+
endpoint: env.endpoint ? decrypt(env.endpoint, this.product.private_key) : env.endpoint,
|
|
1774
|
+
};
|
|
1775
|
+
});
|
|
1776
|
+
return { ...component, envs: decryptedEnvs } as unknown as IProductVector;
|
|
1777
|
+
}*/
|
|
1770
1778
|
return component;
|
|
1771
1779
|
}
|
|
1772
1780
|
/**
|