mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 09:06:19 +08:00
feat(server): update gql endpoint & workspace doc match test (#11104)
This commit is contained in:
@@ -104,14 +104,14 @@ test('should insert embedding by doc id', async t => {
|
||||
{
|
||||
index: 0,
|
||||
content: 'content',
|
||||
embedding: Array.from({ length: 512 }, () => 1),
|
||||
embedding: Array.from({ length: 1024 }, () => 1),
|
||||
},
|
||||
]
|
||||
);
|
||||
|
||||
{
|
||||
const ret = await t.context.copilotContext.matchContentEmbedding(
|
||||
Array.from({ length: 512 }, () => 0.9),
|
||||
Array.from({ length: 1024 }, () => 0.9),
|
||||
contextId,
|
||||
1,
|
||||
1
|
||||
@@ -123,7 +123,7 @@ test('should insert embedding by doc id', async t => {
|
||||
{
|
||||
await t.context.copilotContext.deleteEmbedding(contextId, 'file-id');
|
||||
const ret = await t.context.copilotContext.matchContentEmbedding(
|
||||
Array.from({ length: 512 }, () => 0.9),
|
||||
Array.from({ length: 1024 }, () => 0.9),
|
||||
contextId,
|
||||
1,
|
||||
1
|
||||
@@ -151,7 +151,7 @@ test('should insert embedding by doc id', async t => {
|
||||
{
|
||||
index: 0,
|
||||
content: 'content',
|
||||
embedding: Array.from({ length: 512 }, () => 1),
|
||||
embedding: Array.from({ length: 1024 }, () => 1),
|
||||
},
|
||||
]
|
||||
);
|
||||
@@ -166,7 +166,7 @@ test('should insert embedding by doc id', async t => {
|
||||
|
||||
{
|
||||
const ret = await t.context.copilotContext.matchWorkspaceEmbedding(
|
||||
Array.from({ length: 512 }, () => 0.9),
|
||||
Array.from({ length: 1024 }, () => 0.9),
|
||||
workspace.id,
|
||||
1,
|
||||
1
|
||||
|
||||
Reference in New Issue
Block a user