@soulcraft/brainy 0.9.23 → 0.9.25
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 +2 -2
- package/dist/brainy.js +133 -26
- package/dist/brainy.min.js +1 -1
- package/dist/storage/fileSystemStorage.d.ts.map +1 -1
- package/dist/types/tensorflowTypes.d.ts +25 -5
- package/dist/types/tensorflowTypes.d.ts.map +1 -1
- package/dist/unified.js +133 -26
- package/dist/unified.min.js +1 -1
- package/dist/utils/embedding.d.ts +5 -0
- package/dist/utils/embedding.d.ts.map +1 -1
- package/dist/utils/tensorflowUtils.d.ts +18 -0
- package/dist/utils/tensorflowUtils.d.ts.map +1 -0
- package/dist/utils/version.d.ts +1 -1
- package/package.json +4 -4
|
@@ -16,6 +16,11 @@ export declare class UniversalSentenceEncoder implements EmbeddingModel {
|
|
|
16
16
|
private tf;
|
|
17
17
|
private use;
|
|
18
18
|
private backend;
|
|
19
|
+
/**
|
|
20
|
+
* Add polyfills and patches for TensorFlow.js compatibility
|
|
21
|
+
* This addresses issues with TensorFlow.js in Node.js environments
|
|
22
|
+
*/
|
|
23
|
+
private addNodeCompatibilityPolyfills;
|
|
19
24
|
/**
|
|
20
25
|
* Initialize the embedding model
|
|
21
26
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedding.d.ts","sourceRoot":"","sources":["../../src/utils/embedding.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAG3E;;;;;;;GAOG;AACH,qBAAa,wBAAyB,YAAW,cAAc;IAC7D,OAAO,CAAC,KAAK,CAAY;IACzB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,EAAE,CAAY;IACtB,OAAO,CAAC,GAAG,CAAY;IACvB,OAAO,CAAC,OAAO,CAAgB;IAE/B;;OAEG;IACU,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"embedding.d.ts","sourceRoot":"","sources":["../../src/utils/embedding.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAG3E;;;;;;;GAOG;AACH,qBAAa,wBAAyB,YAAW,cAAc;IAC7D,OAAO,CAAC,KAAK,CAAY;IACzB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,EAAE,CAAY;IACtB,OAAO,CAAC,GAAG,CAAY;IACvB,OAAO,CAAC,OAAO,CAAgB;IAE/B;;;OAGG;IACH,OAAO,CAAC,6BAA6B;IAarC;;OAEG;IACU,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA6FlC;;;OAGG;IACU,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAuD5D;;;;;OAKG;IACU,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IA0D/D;;OAEG;IACU,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAatC;AA6GD;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,cAAc,GACpB,iBAAiB,CAInB;AAWD,wBAAgB,iCAAiC,IAAI,iBAAiB,CAiBrE;AAED;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,iBACF,CAAA;AAarC,eAAO,MAAM,6BAA6B,EAAE,CAC1C,SAAS,EAAE,MAAM,EAAE,KAChB,OAAO,CAAC,MAAM,EAAE,CAepB,CAAA;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,cAAc,GACpB,iBAAiB,CAUnB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for TensorFlow.js compatibility
|
|
3
|
+
* This module provides utility functions that TensorFlow.js might need
|
|
4
|
+
* and avoids the need to use globalThis.util
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Check if an array is a Float32Array
|
|
8
|
+
* @param arr - The array to check
|
|
9
|
+
* @returns True if the array is a Float32Array
|
|
10
|
+
*/
|
|
11
|
+
export declare function isFloat32Array(arr: unknown): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Check if an array is a TypedArray
|
|
14
|
+
* @param arr - The array to check
|
|
15
|
+
* @returns True if the array is a TypedArray
|
|
16
|
+
*/
|
|
17
|
+
export declare function isTypedArray(arr: unknown): boolean;
|
|
18
|
+
//# sourceMappingURL=tensorflowUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tensorflowUtils.d.ts","sourceRoot":"","sources":["../../src/utils/tensorflowUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAwDH;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAKpD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAElD"}
|
package/dist/utils/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soulcraft/brainy",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.25",
|
|
4
4
|
"description": "A vector graph database using HNSW indexing with Origin Private File System storage",
|
|
5
5
|
"main": "dist/unified.js",
|
|
6
6
|
"module": "dist/unified.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"engines": {
|
|
28
|
-
"node": ">=
|
|
28
|
+
"node": ">=23.0.0"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"prebuild": "node scripts/generate-version.js",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"check-format": "prettier --check \"src/**/*.{ts,js}\"",
|
|
44
44
|
"check-style": "node scripts/check-code-style.js",
|
|
45
45
|
"prepare": "npm run build",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
46
|
+
"publish": "npm run build && npm publish",
|
|
47
|
+
"publish:both": "node scripts/publish-cli.js",
|
|
48
48
|
"deploy:cloud:aws": "cd cloud-wrapper && npm run build && npm run deploy:aws",
|
|
49
49
|
"deploy:cloud:gcp": "cd cloud-wrapper && npm run build && npm run deploy:gcp",
|
|
50
50
|
"deploy:cloud:cloudflare": "cd cloud-wrapper && npm run build && npm run deploy:cloudflare",
|