@memstack/core 0.7.0 → 0.7.1
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 +27 -10
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -15
- package/dist/index.d.ts +19 -15
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +14 -5
package/dist/index.d.cts
CHANGED
|
@@ -733,21 +733,10 @@ type LanceDBTable = {
|
|
|
733
733
|
search(vector: number[]): {
|
|
734
734
|
limit(n: number): {
|
|
735
735
|
where(predicate: string): {
|
|
736
|
-
execute(): Promise<
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
actor_id: string;
|
|
741
|
-
memory_type: string;
|
|
742
|
-
content: string;
|
|
743
|
-
importance: number;
|
|
744
|
-
emotional_valence: number;
|
|
745
|
-
tags: string;
|
|
746
|
-
source_id: string;
|
|
747
|
-
metadata: string;
|
|
748
|
-
expires_at: string;
|
|
749
|
-
created_at: string;
|
|
750
|
-
}[]>;
|
|
736
|
+
execute(): Promise<LanceDBMemoryRow[]>;
|
|
737
|
+
prefilter(value: boolean): {
|
|
738
|
+
execute(): Promise<LanceDBMemoryRow[]>;
|
|
739
|
+
};
|
|
751
740
|
};
|
|
752
741
|
};
|
|
753
742
|
};
|
|
@@ -758,6 +747,21 @@ interface LanceDBStorageConfig {
|
|
|
758
747
|
connection: LanceDBConnection;
|
|
759
748
|
tableName?: string;
|
|
760
749
|
}
|
|
750
|
+
interface LanceDBMemoryRow {
|
|
751
|
+
id: string;
|
|
752
|
+
vector: number[];
|
|
753
|
+
actor_id: string;
|
|
754
|
+
memory_type: string;
|
|
755
|
+
content: string;
|
|
756
|
+
importance: number;
|
|
757
|
+
emotional_valence: number;
|
|
758
|
+
tags: string;
|
|
759
|
+
source_id: string;
|
|
760
|
+
metadata: string;
|
|
761
|
+
expires_at: string;
|
|
762
|
+
created_at: string;
|
|
763
|
+
_distance?: number;
|
|
764
|
+
}
|
|
761
765
|
declare class LanceDBStorageAdapter implements StorageProvider {
|
|
762
766
|
private connection;
|
|
763
767
|
private table;
|
package/dist/index.d.ts
CHANGED
|
@@ -733,21 +733,10 @@ type LanceDBTable = {
|
|
|
733
733
|
search(vector: number[]): {
|
|
734
734
|
limit(n: number): {
|
|
735
735
|
where(predicate: string): {
|
|
736
|
-
execute(): Promise<
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
actor_id: string;
|
|
741
|
-
memory_type: string;
|
|
742
|
-
content: string;
|
|
743
|
-
importance: number;
|
|
744
|
-
emotional_valence: number;
|
|
745
|
-
tags: string;
|
|
746
|
-
source_id: string;
|
|
747
|
-
metadata: string;
|
|
748
|
-
expires_at: string;
|
|
749
|
-
created_at: string;
|
|
750
|
-
}[]>;
|
|
736
|
+
execute(): Promise<LanceDBMemoryRow[]>;
|
|
737
|
+
prefilter(value: boolean): {
|
|
738
|
+
execute(): Promise<LanceDBMemoryRow[]>;
|
|
739
|
+
};
|
|
751
740
|
};
|
|
752
741
|
};
|
|
753
742
|
};
|
|
@@ -758,6 +747,21 @@ interface LanceDBStorageConfig {
|
|
|
758
747
|
connection: LanceDBConnection;
|
|
759
748
|
tableName?: string;
|
|
760
749
|
}
|
|
750
|
+
interface LanceDBMemoryRow {
|
|
751
|
+
id: string;
|
|
752
|
+
vector: number[];
|
|
753
|
+
actor_id: string;
|
|
754
|
+
memory_type: string;
|
|
755
|
+
content: string;
|
|
756
|
+
importance: number;
|
|
757
|
+
emotional_valence: number;
|
|
758
|
+
tags: string;
|
|
759
|
+
source_id: string;
|
|
760
|
+
metadata: string;
|
|
761
|
+
expires_at: string;
|
|
762
|
+
created_at: string;
|
|
763
|
+
_distance?: number;
|
|
764
|
+
}
|
|
761
765
|
declare class LanceDBStorageAdapter implements StorageProvider {
|
|
762
766
|
private connection;
|
|
763
767
|
private table;
|
package/dist/index.js
CHANGED
|
@@ -3219,7 +3219,7 @@ var LanceDBStorageAdapter = class {
|
|
|
3219
3219
|
return results;
|
|
3220
3220
|
}
|
|
3221
3221
|
async get(id) {
|
|
3222
|
-
const results = await this.table.search(this._zeroVector).limit(1).where(`id = "${id}"`).execute();
|
|
3222
|
+
const results = await this.table.search(this._zeroVector).limit(1).where(`id = "${id}"`).prefilter(true).execute();
|
|
3223
3223
|
if (results.length === 0) return null;
|
|
3224
3224
|
const row = results[0];
|
|
3225
3225
|
if (row.expires_at) {
|