knowledge

package
v0.0.0-...-4821133 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	TenantID   string
	Source     string // "jira", "youtrack", "confluence", ...
	ProjectKey string
	DocKey     string // PROJ-123, page-id, etc.
	Title      string
	Status     string
	Author     string
	Content    string
	Embedding  []float32
	UpdatedAt  time.Time
}

Document — единица знания для индексации. Tracker-agnostic.

type Filter

type Filter struct {
	TenantID   string
	ProjectKey string
	Source     string // опционально: "jira", "confluence", "" = все
}

Filter ограничивает поиск.

type Hit

type Hit struct {
	DocKey  string  `json:"doc_key"`
	Title   string  `json:"title"`
	Status  string  `json:"status"`
	Score   float32 `json:"score"`
	Excerpt string  `json:"excerpt"`
}

Hit — результат поиска.

type Reader

type Reader interface {
	Search(ctx context.Context, queryEmbedding []float32, f Filter, topK int) ([]Hit, error)
}

Reader — read path: поиск по базе знаний.

type Store

type Store interface {
	Writer
	Reader
	Stats(ctx context.Context, tenantID, projectKey string) (int, error)
	Close() error
}

Store — полный интерфейс хранилища знаний.

type Writer

type Writer interface {
	Upsert(ctx context.Context, docs []Document) error
	ReplaceProject(ctx context.Context, tenantID, projectKey string, docs []Document) error
}

Writer — write path: индексация документов.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL