@convex-dev/rag 0.3.3 → 0.3.4-alpha.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/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"email": "support@convex.dev",
|
|
8
8
|
"url": "https://github.com/get-convex/rag/issues"
|
|
9
9
|
},
|
|
10
|
-
"version": "0.3.
|
|
10
|
+
"version": "0.3.4-alpha.0",
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"keywords": [
|
|
13
13
|
"convex",
|
|
@@ -57,10 +57,11 @@
|
|
|
57
57
|
"default": "./dist/component/convex.config.js"
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"ai": "^4.3.19"
|
|
62
|
+
},
|
|
60
63
|
"peerDependencies": {
|
|
61
|
-
"@ai-sdk/provider": "^1.1.3",
|
|
62
64
|
"@convex-dev/workpool": "^0.2.14",
|
|
63
|
-
"ai": "^4.3.16",
|
|
64
65
|
"convex": "^1.24.8",
|
|
65
66
|
"convex-helpers": "^0.1.94"
|
|
66
67
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="vite/client" />
|
|
2
2
|
|
|
3
3
|
import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
|
|
4
|
-
import {
|
|
4
|
+
import { type TestConvex } from "convex-test";
|
|
5
5
|
import schema from "./schema.js";
|
|
6
6
|
import { api, internal } from "./_generated/api.js";
|
|
7
7
|
import { initConvexTest } from "./setup.test.js";
|
|
@@ -500,6 +500,7 @@ describe("entries", () => {
|
|
|
500
500
|
},
|
|
501
501
|
],
|
|
502
502
|
});
|
|
503
|
+
expect(result1.status).toBe("ready");
|
|
503
504
|
|
|
504
505
|
const result2 = await t.mutation(api.entries.add, {
|
|
505
506
|
entry: entry2,
|
|
@@ -510,6 +511,7 @@ describe("entries", () => {
|
|
|
510
511
|
},
|
|
511
512
|
],
|
|
512
513
|
});
|
|
514
|
+
expect(result2.status).toBe("pending");
|
|
513
515
|
|
|
514
516
|
const result3 = await t.mutation(api.entries.add, {
|
|
515
517
|
entry: entry3,
|
|
@@ -520,6 +522,7 @@ describe("entries", () => {
|
|
|
520
522
|
},
|
|
521
523
|
],
|
|
522
524
|
});
|
|
525
|
+
expect(result3.status).toBe("ready");
|
|
523
526
|
|
|
524
527
|
// Verify all entries exist
|
|
525
528
|
const entriesBefore = await t.run(async (ctx) => {
|
|
@@ -592,6 +595,7 @@ describe("entries", () => {
|
|
|
592
595
|
},
|
|
593
596
|
],
|
|
594
597
|
});
|
|
598
|
+
expect(result1.status).toBe("ready");
|
|
595
599
|
|
|
596
600
|
const result2 = await t.mutation(api.entries.add, {
|
|
597
601
|
entry: entry2,
|
|
@@ -602,6 +606,7 @@ describe("entries", () => {
|
|
|
602
606
|
},
|
|
603
607
|
],
|
|
604
608
|
});
|
|
609
|
+
expect(result2.status).toBe("pending");
|
|
605
610
|
|
|
606
611
|
const result3 = await t.mutation(api.entries.add, {
|
|
607
612
|
entry: entry3,
|
|
@@ -612,6 +617,7 @@ describe("entries", () => {
|
|
|
612
617
|
},
|
|
613
618
|
],
|
|
614
619
|
});
|
|
620
|
+
expect(result3.status).toBe("ready");
|
|
615
621
|
|
|
616
622
|
// Verify all entries exist
|
|
617
623
|
const entriesBefore = await t.run(async (ctx) => {
|
|
@@ -658,6 +664,7 @@ describe("entries", () => {
|
|
|
658
664
|
entry: entryWithKey,
|
|
659
665
|
allChunks: [],
|
|
660
666
|
});
|
|
667
|
+
expect(result1.status).toBe("ready");
|
|
661
668
|
|
|
662
669
|
const result2 = await t.mutation(api.entries.add, {
|
|
663
670
|
entry: entryWithoutKey,
|
|
@@ -695,11 +702,13 @@ describe("entries", () => {
|
|
|
695
702
|
entry,
|
|
696
703
|
allChunks: [],
|
|
697
704
|
});
|
|
705
|
+
expect(result1.status).toBe("ready");
|
|
698
706
|
|
|
699
707
|
const result2 = await t.mutation(api.entries.add, {
|
|
700
708
|
entry: { ...entry, contentHash: "hash456" },
|
|
701
709
|
allChunks: [],
|
|
702
710
|
});
|
|
711
|
+
expect(result2.status).toBe("pending");
|
|
703
712
|
|
|
704
713
|
const result3 = await t.mutation(api.entries.add, {
|
|
705
714
|
entry: { ...entry, contentHash: "hash789" },
|