feat(agent): support gemma-embedding-2-openai provider (#475)

* feat(agent): support gemma-embedding-2-openai provider

Add support for local LiteRT-LM Gemma Embedding 2 provider with 768-dimensional vector embeddings, environment-configured read-only embedding agents, 16-frame uniform sampling for video chunks, and automatic WebP-to-JPEG conversion.

* refactor(agent): remove unused legacy generateEmbeddingActivity

* chore(agent): align sharp version to 0.35.4

* refactor(agent): rename embedding server env to GEMMA_EMBEDDING_OPENAI_BASE_URL

* refactor(agent,transcode): use native Bun.Archive for video chunk frames

* fix(transcode,agent): populate buffer entries in Bun.Archive and validate frame sizes
This commit is contained in:
Yiling-J
2026-10-15 15:49:24 +08:00
committed by GitHub
parent c302c162a0
commit b7271777e0
28 changed files with 1270 additions and 238 deletions
@@ -0,0 +1,8 @@
-- AlterTable
ALTER TABLE "asset_embeddings" ADD COLUMN "embedding_768" vector(768);
-- CreateIndex: HNSW index on asset_embeddings.embedding_768
CREATE INDEX "AssetEmbedding_embedding_768_idx"
ON "asset_embeddings"
USING hnsw (embedding_768 vector_cosine_ops)
WITH (m = 16, ef_construction = 64);
+10 -8
View File
@@ -706,17 +706,19 @@ model AssetCommentReaction {
}
model AssetEmbedding {
id String @id @default(ulid())
embedding Unsupported("vector(1536)")?
startTime Float? @map("start_time")
endTime Float? @map("end_time")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
id String @id @default(ulid())
embedding Unsupported("vector(1536)")?
embedding768 Unsupported("vector(768)")? @map("embedding_768")
startTime Float? @map("start_time")
endTime Float? @map("end_time")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
assetId String @map("asset_id")
asset Asset @relation("AssetToEmbedding", fields: [assetId], references: [id], onDelete: Cascade)
assetId String @map("asset_id")
asset Asset @relation("AssetToEmbedding", fields: [assetId], references: [id], onDelete: Cascade)
@@index([embedding], name: "AssetEmbedding_embedding_idx")
@@index([embedding768], name: "AssetEmbedding_embedding_768_idx")
@@map("asset_embeddings")
}
File diff suppressed because one or more lines are too long