fix: remove pgvector dependency from AI knowledge retrieval

This commit is contained in:
2026-07-06 10:36:21 -07:00
parent 0d5093ac6c
commit f74b7f3ca0
9 changed files with 78 additions and 30 deletions

View File

@@ -11,7 +11,6 @@ import {
timestamp,
uniqueIndex,
uuid,
vector,
} from "drizzle-orm/pg-core";
export const accountStatusEnum = pgEnum("account_status", ["active", "disabled", "pending"]);
@@ -555,7 +554,7 @@ export const aiKnowledgeChunks = pgTable("ai_knowledge_chunks", {
scope: aiKnowledgeScopeEnum("scope").notNull(),
chunkIndex: integer("chunk_index").notNull(),
content: text("content").notNull(),
embedding: vector("embedding", { dimensions: AI_KNOWLEDGE_EMBEDDING_DIMENSIONS }).notNull(),
embedding: jsonb("embedding").$type<number[]>().notNull().default(sql`'[]'::jsonb`),
sourceTitle: text("source_title").notNull(),
sourceCategory: text("source_category").notNull().default(""),
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),