Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ words:
- elysiajs
- eslintcache
- Eventa
- Firecrawl
- formkit
- gramsearch
- guiiai
Expand Down
21 changes: 21 additions & 0 deletions drizzle/0015_huge_layla_miller.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
CREATE TABLE "documents" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"chat_messages_id" uuid NOT NULL,
"tags" jsonb DEFAULT '[]'::jsonb NOT NULL,
"raw_content" text DEFAULT '' NOT NULL,
"processed_content" text DEFAULT '' NOT NULL,
"processed_content_jieba_tokens" jsonb DEFAULT '[]'::jsonb NOT NULL,
"summary" text DEFAULT '' NOT NULL,
"summary_vector_1536" vector(1536),
"summary_vector_1024" vector(1024),
"summary_vector_768" vector(768),
"created_at" bigint DEFAULT 0 NOT NULL,
"updated_at" bigint DEFAULT 0 NOT NULL,
"deleted_at" bigint DEFAULT 0 NOT NULL
);
--> statement-breakpoint
ALTER TABLE "documents" ADD CONSTRAINT "documents_chat_messages_id_chat_messages_id_fk" FOREIGN KEY ("chat_messages_id") REFERENCES "public"."chat_messages"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
CREATE INDEX "documents_summary_vector_1536_index" ON "documents" USING hnsw ("summary_vector_1536" vector_cosine_ops);--> statement-breakpoint
CREATE INDEX "documents_summary_vector_1024_index" ON "documents" USING hnsw ("summary_vector_1024" vector_cosine_ops);--> statement-breakpoint
CREATE INDEX "documents_summary_vector_768_index" ON "documents" USING hnsw ("summary_vector_768" vector_cosine_ops);--> statement-breakpoint
CREATE INDEX "documents_processed_content_jieba_tokens_index" ON "documents" USING gin ("processed_content_jieba_tokens" jsonb_path_ops);
Loading