fix: switch embedding dimension from 1536 to 2560 for qwen-embedding-4b
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 5s

This commit is contained in:
Antigravity
2026-05-12 09:07:55 +00:00
parent feaeb075ce
commit e09ea3a145
10 changed files with 105 additions and 27 deletions

View File

@@ -35,7 +35,7 @@ export async function GET() {
const invalidResult: Array<{ count: bigint }> = await prisma.$queryRawUnsafe(
`SELECT COUNT(*)::bigint as count FROM "NoteEmbedding" e
WHERE e."embedding" IS NULL
OR array_length(string_to_array(replace(replace(e."embedding"::text, '[', ''), ']', ''), ','), 1) != 1536`
OR array_length(string_to_array(replace(replace(e."embedding"::text, '[', ''), ']', ''), ','), 1) != 2560`
)
const invalidCount = Number(invalidResult[0]?.count ?? 0)