feat(copilot): finish configuration center

This commit is contained in:
2026-07-13 14:57:28 +08:00
parent 0a69d80f7c
commit 8b9eedc0e2
60 changed files with 3040 additions and 1042 deletions
+3 -3
View File
@@ -11,11 +11,11 @@ import (
type ArticleEmbedding struct {
Base
ArticleID uint `gorm:"not null;index" json:"article_id"`
Embedding json.RawMessage `gorm:"type:jsonb" json:"embedding"` // original JSONB storage (backward compat)
VectorEmbedding pgvector.Vector `gorm:"type:vector(1536)" json:"-"` // pgvector column for cosine similarity search
Embedding json.RawMessage `gorm:"type:jsonb" json:"embedding"` // original JSONB storage (backward compat)
VectorEmbedding pgvector.Vector `gorm:"type:vector" json:"-"` // dimension follows the configured embedding model
Term string `gorm:"type:text;not null" json:"term"` // searchable text content
Article Article `gorm:"foreignKey:ArticleID" json:"article,omitempty"`
}
func (ArticleEmbedding) TableName() string { return "article_embeddings" }
func (ArticleEmbedding) TableName() string { return "article_embeddings" }