@remit/imap-worker 0.0.27 → 0.0.28
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/package.json
CHANGED
|
@@ -33,13 +33,18 @@ const anchorOnlyFilter = (destinationMailboxId: string): FilterItem =>
|
|
|
33
33
|
updatedAt: 1,
|
|
34
34
|
}) as unknown as FilterItem;
|
|
35
35
|
|
|
36
|
+
const CURRENT_MODEL = "test-model@3";
|
|
37
|
+
|
|
36
38
|
const repos = (filter: FilterItem): FilterConfigDeps => ({
|
|
37
39
|
filterService: {
|
|
38
40
|
listByAccountAndState: async () => [filter],
|
|
39
41
|
refreshExpiry: async (f: FilterItem) => f,
|
|
40
42
|
} as unknown as IFilterRepository,
|
|
41
43
|
filterAnchorService: {
|
|
42
|
-
get: async () => ({
|
|
44
|
+
get: async () => ({
|
|
45
|
+
anchorEmbedding: [1, 0, 0],
|
|
46
|
+
anchorEmbeddingId: CURRENT_MODEL,
|
|
47
|
+
}),
|
|
43
48
|
} as unknown as IFilterAnchorRepository,
|
|
44
49
|
messageLabelService: {} as unknown as IMessageLabelRepository,
|
|
45
50
|
placementMoveService: {} as unknown as PlacementMoveService,
|
|
@@ -75,6 +80,7 @@ describe("buildFilterConfig", () => {
|
|
|
75
80
|
embedCalls += 1;
|
|
76
81
|
return [1, 0, 0];
|
|
77
82
|
},
|
|
83
|
+
embeddingId: CURRENT_MODEL,
|
|
78
84
|
};
|
|
79
85
|
const config = buildFilterConfig(
|
|
80
86
|
repos(anchorOnlyFilter("mbx-archive")),
|
|
@@ -96,6 +102,7 @@ describe("buildFilterConfig", () => {
|
|
|
96
102
|
it("does not match when the message embedding diverges from the anchor", async () => {
|
|
97
103
|
const embedder: MessageEmbedder = {
|
|
98
104
|
embed: async () => [0, 1, 0],
|
|
105
|
+
embeddingId: CURRENT_MODEL,
|
|
99
106
|
};
|
|
100
107
|
const config = buildFilterConfig(
|
|
101
108
|
repos(anchorOnlyFilter("mbx-archive")),
|