@forbocai/browser 0.6.1 → 0.6.2
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/index.d.mts +30 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +4 -1
- package/dist/index.mjs +4 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -208,6 +208,12 @@ declare const createBrowserStore: () => _reduxjs_toolkit.EnhancedStore<{
|
|
|
208
208
|
apiUrl: string;
|
|
209
209
|
apiKey?: string;
|
|
210
210
|
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.CortexInitResponse, "forbocApi", unknown>;
|
|
211
|
+
postNpcProcess: _reduxjs_toolkit_query.MutationDefinition<{
|
|
212
|
+
npcId: string;
|
|
213
|
+
request: _forbocai_core.NPCProcessRequest;
|
|
214
|
+
apiUrl: string;
|
|
215
|
+
apiKey?: string;
|
|
216
|
+
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.NPCProcessResponse, "forbocApi", unknown>;
|
|
211
217
|
postDirective: _reduxjs_toolkit_query.MutationDefinition<{
|
|
212
218
|
npcId: string;
|
|
213
219
|
request: _forbocai_core.DirectiveRequest;
|
|
@@ -399,6 +405,12 @@ declare const createBrowserStore: () => _reduxjs_toolkit.EnhancedStore<{
|
|
|
399
405
|
apiUrl: string;
|
|
400
406
|
apiKey?: string;
|
|
401
407
|
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.CortexInitResponse, "forbocApi", unknown>;
|
|
408
|
+
postNpcProcess: _reduxjs_toolkit_query.MutationDefinition<{
|
|
409
|
+
npcId: string;
|
|
410
|
+
request: _forbocai_core.NPCProcessRequest;
|
|
411
|
+
apiUrl: string;
|
|
412
|
+
apiKey?: string;
|
|
413
|
+
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.NPCProcessResponse, "forbocApi", unknown>;
|
|
402
414
|
postDirective: _reduxjs_toolkit_query.MutationDefinition<{
|
|
403
415
|
npcId: string;
|
|
404
416
|
request: _forbocai_core.DirectiveRequest;
|
|
@@ -591,6 +603,12 @@ declare const store: _reduxjs_toolkit.EnhancedStore<{
|
|
|
591
603
|
apiUrl: string;
|
|
592
604
|
apiKey?: string;
|
|
593
605
|
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.CortexInitResponse, "forbocApi", unknown>;
|
|
606
|
+
postNpcProcess: _reduxjs_toolkit_query.MutationDefinition<{
|
|
607
|
+
npcId: string;
|
|
608
|
+
request: _forbocai_core.NPCProcessRequest;
|
|
609
|
+
apiUrl: string;
|
|
610
|
+
apiKey?: string;
|
|
611
|
+
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.NPCProcessResponse, "forbocApi", unknown>;
|
|
594
612
|
postDirective: _reduxjs_toolkit_query.MutationDefinition<{
|
|
595
613
|
npcId: string;
|
|
596
614
|
request: _forbocai_core.DirectiveRequest;
|
|
@@ -782,6 +800,12 @@ declare const store: _reduxjs_toolkit.EnhancedStore<{
|
|
|
782
800
|
apiUrl: string;
|
|
783
801
|
apiKey?: string;
|
|
784
802
|
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.CortexInitResponse, "forbocApi", unknown>;
|
|
803
|
+
postNpcProcess: _reduxjs_toolkit_query.MutationDefinition<{
|
|
804
|
+
npcId: string;
|
|
805
|
+
request: _forbocai_core.NPCProcessRequest;
|
|
806
|
+
apiUrl: string;
|
|
807
|
+
apiKey?: string;
|
|
808
|
+
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.NPCProcessResponse, "forbocApi", unknown>;
|
|
785
809
|
postDirective: _reduxjs_toolkit_query.MutationDefinition<{
|
|
786
810
|
npcId: string;
|
|
787
811
|
request: _forbocai_core.DirectiveRequest;
|
|
@@ -974,6 +998,12 @@ declare const dispatch: ((action: redux.Action<"listenerMiddleware/add">) => _re
|
|
|
974
998
|
apiUrl: string;
|
|
975
999
|
apiKey?: string;
|
|
976
1000
|
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.CortexInitResponse, "forbocApi", unknown>;
|
|
1001
|
+
postNpcProcess: _reduxjs_toolkit_query.MutationDefinition<{
|
|
1002
|
+
npcId: string;
|
|
1003
|
+
request: _forbocai_core.NPCProcessRequest;
|
|
1004
|
+
apiUrl: string;
|
|
1005
|
+
apiKey?: string;
|
|
1006
|
+
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.NPCProcessResponse, "forbocApi", unknown>;
|
|
977
1007
|
postDirective: _reduxjs_toolkit_query.MutationDefinition<{
|
|
978
1008
|
npcId: string;
|
|
979
1009
|
request: _forbocai_core.DirectiveRequest;
|
package/dist/index.d.ts
CHANGED
|
@@ -208,6 +208,12 @@ declare const createBrowserStore: () => _reduxjs_toolkit.EnhancedStore<{
|
|
|
208
208
|
apiUrl: string;
|
|
209
209
|
apiKey?: string;
|
|
210
210
|
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.CortexInitResponse, "forbocApi", unknown>;
|
|
211
|
+
postNpcProcess: _reduxjs_toolkit_query.MutationDefinition<{
|
|
212
|
+
npcId: string;
|
|
213
|
+
request: _forbocai_core.NPCProcessRequest;
|
|
214
|
+
apiUrl: string;
|
|
215
|
+
apiKey?: string;
|
|
216
|
+
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.NPCProcessResponse, "forbocApi", unknown>;
|
|
211
217
|
postDirective: _reduxjs_toolkit_query.MutationDefinition<{
|
|
212
218
|
npcId: string;
|
|
213
219
|
request: _forbocai_core.DirectiveRequest;
|
|
@@ -399,6 +405,12 @@ declare const createBrowserStore: () => _reduxjs_toolkit.EnhancedStore<{
|
|
|
399
405
|
apiUrl: string;
|
|
400
406
|
apiKey?: string;
|
|
401
407
|
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.CortexInitResponse, "forbocApi", unknown>;
|
|
408
|
+
postNpcProcess: _reduxjs_toolkit_query.MutationDefinition<{
|
|
409
|
+
npcId: string;
|
|
410
|
+
request: _forbocai_core.NPCProcessRequest;
|
|
411
|
+
apiUrl: string;
|
|
412
|
+
apiKey?: string;
|
|
413
|
+
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.NPCProcessResponse, "forbocApi", unknown>;
|
|
402
414
|
postDirective: _reduxjs_toolkit_query.MutationDefinition<{
|
|
403
415
|
npcId: string;
|
|
404
416
|
request: _forbocai_core.DirectiveRequest;
|
|
@@ -591,6 +603,12 @@ declare const store: _reduxjs_toolkit.EnhancedStore<{
|
|
|
591
603
|
apiUrl: string;
|
|
592
604
|
apiKey?: string;
|
|
593
605
|
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.CortexInitResponse, "forbocApi", unknown>;
|
|
606
|
+
postNpcProcess: _reduxjs_toolkit_query.MutationDefinition<{
|
|
607
|
+
npcId: string;
|
|
608
|
+
request: _forbocai_core.NPCProcessRequest;
|
|
609
|
+
apiUrl: string;
|
|
610
|
+
apiKey?: string;
|
|
611
|
+
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.NPCProcessResponse, "forbocApi", unknown>;
|
|
594
612
|
postDirective: _reduxjs_toolkit_query.MutationDefinition<{
|
|
595
613
|
npcId: string;
|
|
596
614
|
request: _forbocai_core.DirectiveRequest;
|
|
@@ -782,6 +800,12 @@ declare const store: _reduxjs_toolkit.EnhancedStore<{
|
|
|
782
800
|
apiUrl: string;
|
|
783
801
|
apiKey?: string;
|
|
784
802
|
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.CortexInitResponse, "forbocApi", unknown>;
|
|
803
|
+
postNpcProcess: _reduxjs_toolkit_query.MutationDefinition<{
|
|
804
|
+
npcId: string;
|
|
805
|
+
request: _forbocai_core.NPCProcessRequest;
|
|
806
|
+
apiUrl: string;
|
|
807
|
+
apiKey?: string;
|
|
808
|
+
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.NPCProcessResponse, "forbocApi", unknown>;
|
|
785
809
|
postDirective: _reduxjs_toolkit_query.MutationDefinition<{
|
|
786
810
|
npcId: string;
|
|
787
811
|
request: _forbocai_core.DirectiveRequest;
|
|
@@ -974,6 +998,12 @@ declare const dispatch: ((action: redux.Action<"listenerMiddleware/add">) => _re
|
|
|
974
998
|
apiUrl: string;
|
|
975
999
|
apiKey?: string;
|
|
976
1000
|
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.CortexInitResponse, "forbocApi", unknown>;
|
|
1001
|
+
postNpcProcess: _reduxjs_toolkit_query.MutationDefinition<{
|
|
1002
|
+
npcId: string;
|
|
1003
|
+
request: _forbocai_core.NPCProcessRequest;
|
|
1004
|
+
apiUrl: string;
|
|
1005
|
+
apiKey?: string;
|
|
1006
|
+
}, _reduxjs_toolkit_query.BaseQueryFn<string | _reduxjs_toolkit_query.FetchArgs, unknown, _reduxjs_toolkit_query.FetchBaseQueryError, {}, _reduxjs_toolkit_query.FetchBaseQueryMeta>, "NPC" | "Memory" | "Cortex" | "Ghost" | "Soul" | "Bridge" | "Rule", _forbocai_core.NPCProcessResponse, "forbocApi", unknown>;
|
|
977
1007
|
postDirective: _reduxjs_toolkit_query.MutationDefinition<{
|
|
978
1008
|
npcId: string;
|
|
979
1009
|
request: _forbocai_core.DirectiveRequest;
|
package/dist/index.js
CHANGED
|
@@ -305,7 +305,10 @@ var recallBrowserMemoryThunk = (0, import_toolkit3.createAsyncThunk)(
|
|
|
305
305
|
similarity: threshold,
|
|
306
306
|
limit
|
|
307
307
|
});
|
|
308
|
-
const items = results.hits.map((hit) =>
|
|
308
|
+
const items = results.hits.map((hit) => ({
|
|
309
|
+
...hit.document,
|
|
310
|
+
similarity: hit.score
|
|
311
|
+
}));
|
|
309
312
|
dispatch2((0, import_core2.memoryRecallSuccess)(items));
|
|
310
313
|
return items;
|
|
311
314
|
} catch (e) {
|
package/dist/index.mjs
CHANGED
|
@@ -247,7 +247,10 @@ var recallBrowserMemoryThunk = createAsyncThunk3(
|
|
|
247
247
|
similarity: threshold,
|
|
248
248
|
limit
|
|
249
249
|
});
|
|
250
|
-
const items = results.hits.map((hit) =>
|
|
250
|
+
const items = results.hits.map((hit) => ({
|
|
251
|
+
...hit.document,
|
|
252
|
+
similarity: hit.score
|
|
253
|
+
}));
|
|
251
254
|
dispatch2(memoryRecallSuccess(items));
|
|
252
255
|
return items;
|
|
253
256
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forbocai/browser",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "Web Browser implementation for ForbocAI SDK",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"test": "vitest"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@forbocai/core": "^0.6.
|
|
15
|
+
"@forbocai/core": "^0.6.2",
|
|
16
16
|
"@huggingface/transformers": "^3.0.0",
|
|
17
17
|
"@mlc-ai/web-llm": "^0.2.46",
|
|
18
18
|
"@orama/orama": "^2.0.26",
|