@soulcraft/brainy 0.9.37 → 0.11.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.demo.md +1 -1
- package/README.md +2 -6
- package/dist/augmentations/huggingfaceActivation.d.ts +57 -0
- package/dist/augmentations/huggingfaceActivation.d.ts.map +1 -0
- package/dist/augmentations/huggingfaceActivationRegistration.d.ts +6 -0
- package/dist/augmentations/huggingfaceActivationRegistration.d.ts.map +1 -0
- package/dist/brainy.js +564 -815
- package/dist/brainy.min.js +748 -749
- package/dist/index.d.ts +3 -2
- package/dist/setup.d.ts +1 -0
- package/dist/storage/fileSystemStorage.d.ts +27 -69
- package/dist/storage/fileSystemStorage.d.ts.map +1 -1
- package/dist/types/tensorflowTypes.d.ts +10 -2
- package/dist/types/tensorflowTypes.d.ts.map +1 -1
- package/dist/unified.js +565 -816
- package/dist/unified.min.js +748 -749
- package/dist/utils/embedding.d.ts.map +1 -1
- package/dist/utils/huggingfaceEmbedding.d.ts +53 -0
- package/dist/utils/huggingfaceEmbedding.d.ts.map +1 -0
- package/dist/utils/tensorflowBridge.d.ts +14 -0
- package/dist/utils/tensorflowBridge.d.ts.map +1 -0
- package/dist/utils/tensorflowUtils.d.ts.map +1 -1
- package/dist/utils/textEncoding.d.ts +6 -51
- package/dist/utils/textEncoding.d.ts.map +1 -1
- package/dist/utils/universalDebug.d.ts +21 -0
- package/dist/utils/universalDebug.d.ts.map +1 -0
- package/dist/utils/universalUuid.d.ts +26 -0
- package/dist/utils/universalUuid.d.ts.map +1 -0
- package/dist/utils/version.d.ts +1 -1
- package/dist/utils/workerUtils.d.ts.map +1 -1
- package/package.json +17 -8
- package/CHANGELOG.md +0 -20
package/README.demo.md
CHANGED
|
@@ -4,7 +4,7 @@ The Brainy interactive demo showcases the library's features in a web browser. F
|
|
|
4
4
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
7
|
-
- Make sure you have Node.js installed (version
|
|
7
|
+
- Make sure you have Node.js installed (version 24.4.0 or higher)
|
|
8
8
|
- Ensure the project is built (run both `npm run build` and `npm run build:browser`)
|
|
9
9
|
|
|
10
10
|
## Running the Demo
|
package/README.md
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
<br/><br/>
|
|
4
4
|
|
|
5
5
|
[](LICENSE)
|
|
6
|
-
[](https://nodejs.org/)
|
|
7
7
|
[](https://www.typescriptlang.org/)
|
|
8
8
|
[](CONTRIBUTING.md)
|
|
9
|
-
[](https://www.npmjs.com/package/@soulcraft/brainy)
|
|
10
10
|
|
|
11
11
|
[//]: # ([](https://github.com/sodal-project/cartographer))
|
|
12
12
|
|
|
@@ -1246,10 +1246,6 @@ terabyte-scale data that can't fit entirely in memory, we provide several approa
|
|
|
1246
1246
|
For detailed information on how to scale Brainy for large datasets, see our
|
|
1247
1247
|
comprehensive [Scaling Strategy](scalingStrategy.md) document.
|
|
1248
1248
|
|
|
1249
|
-
## Requirements
|
|
1250
|
-
|
|
1251
|
-
- Node.js >= 23.0.0
|
|
1252
|
-
|
|
1253
1249
|
## Contributing
|
|
1254
1250
|
|
|
1255
1251
|
For detailed contribution guidelines, please see [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Huggingface Activation Augmentation
|
|
3
|
+
*
|
|
4
|
+
* This augmentation provides embedding and text generation capabilities using Huggingface models.
|
|
5
|
+
* It implements the IActivationAugmentation interface to make it pluggable with other solutions.
|
|
6
|
+
*/
|
|
7
|
+
import { AugmentationResponse, IActivationAugmentation } from '../types/augmentations.js';
|
|
8
|
+
/**
|
|
9
|
+
* Huggingface Activation Augmentation
|
|
10
|
+
*
|
|
11
|
+
* This augmentation uses Huggingface transformers and sentence_transformers (specifically all-MiniLM-L6-v2)
|
|
12
|
+
* for embedding and text generation capabilities.
|
|
13
|
+
*/
|
|
14
|
+
export declare class HuggingfaceActivation implements IActivationAugmentation {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly description: string;
|
|
17
|
+
enabled: boolean;
|
|
18
|
+
private embeddingModel;
|
|
19
|
+
private embeddingFunction;
|
|
20
|
+
private initialized;
|
|
21
|
+
private hfInference;
|
|
22
|
+
constructor();
|
|
23
|
+
/**
|
|
24
|
+
* Initializes the augmentation
|
|
25
|
+
*/
|
|
26
|
+
initialize(): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Shuts down the augmentation
|
|
29
|
+
*/
|
|
30
|
+
shutDown(): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Gets the status of the augmentation
|
|
33
|
+
*/
|
|
34
|
+
getStatus(): Promise<'active' | 'inactive' | 'error'>;
|
|
35
|
+
/**
|
|
36
|
+
* Triggers an action based on a processed command or internal state
|
|
37
|
+
* @param actionName The name of the action to trigger
|
|
38
|
+
* @param parameters Optional parameters for the action
|
|
39
|
+
*/
|
|
40
|
+
triggerAction(actionName: string, parameters?: Record<string, unknown>): Promise<AugmentationResponse<unknown>>;
|
|
41
|
+
/**
|
|
42
|
+
* Generates an expressive output or response from Brainy
|
|
43
|
+
* @param knowledgeId The identifier of the knowledge to express
|
|
44
|
+
* @param format The desired output format (e.g., 'text', 'json')
|
|
45
|
+
*/
|
|
46
|
+
generateOutput(knowledgeId: string, format: string): Promise<AugmentationResponse<string | Record<string, unknown>>>;
|
|
47
|
+
/**
|
|
48
|
+
* Interacts with an external system or API
|
|
49
|
+
* @param systemId The identifier of the external system
|
|
50
|
+
* @param payload The data to send to the external system
|
|
51
|
+
*/
|
|
52
|
+
interactExternal(systemId: string, payload: Record<string, unknown>): Promise<AugmentationResponse<unknown>>;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Creates a new instance of the Huggingface Activation Augmentation
|
|
56
|
+
*/
|
|
57
|
+
export declare function createHuggingfaceActivation(): IActivationAugmentation;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"huggingfaceActivation.d.ts","sourceRoot":"","s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huggingfaceActivationRegistration.d.ts","sourceRoot":"","sources":["../../src/augmentations/huggingfaceActivationRegistration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH,wBAAgB,6BAA6B,IAAI,IAAI,CAEpD"}
|