Changeset 0.17.0 (#75)
This commit is contained in:
@@ -216,6 +216,9 @@ type Persona struct {
|
||||
|
||||
// Loaded from persona_grants, not stored in personas table
|
||||
Grants []Grant `json:"grants,omitempty" db:"-"`
|
||||
|
||||
// Loaded from persona_knowledge_bases, not stored in personas table
|
||||
KBIDs []string `json:"kb_ids,omitempty" db:"-"`
|
||||
}
|
||||
|
||||
type PersonaPatch struct {
|
||||
@@ -691,11 +694,25 @@ type KnowledgeBase struct {
|
||||
DocumentCount int `json:"document_count" db:"document_count"`
|
||||
ChunkCount int `json:"chunk_count" db:"chunk_count"`
|
||||
TotalBytes int64 `json:"total_bytes" db:"total_bytes"`
|
||||
Discoverable bool `json:"discoverable" db:"discoverable"`
|
||||
Status string `json:"status" db:"status"` // active, processing, error
|
||||
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
|
||||
}
|
||||
|
||||
// PersonaKB binds a knowledge base to a persona.
|
||||
type PersonaKB struct {
|
||||
PersonaID string `json:"persona_id" db:"persona_id"`
|
||||
KBID string `json:"kb_id" db:"kb_id"`
|
||||
AutoSearch bool `json:"auto_search" db:"auto_search"`
|
||||
AddedAt time.Time `json:"added_at" db:"added_at"`
|
||||
|
||||
// Joined fields (not in persona_knowledge_bases table)
|
||||
KBName string `json:"kb_name,omitempty" db:"kb_name"`
|
||||
DocumentCount int `json:"document_count,omitempty" db:"document_count"`
|
||||
ChunkCount int `json:"chunk_count,omitempty" db:"chunk_count"`
|
||||
}
|
||||
|
||||
// KBDocument is a single uploaded file within a knowledge base.
|
||||
type KBDocument struct {
|
||||
ID string `json:"id" db:"id"`
|
||||
|
||||
Reference in New Issue
Block a user