Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PluginFlags ¶
PluginFlags returns CLI flags contributed by all registered vector store plugins.
Types ¶
type Loader ¶
type Loader func(ctx context.Context) (VectorStore, error)
Loader creates a VectorStore from config.
type Plugin ¶
type Plugin struct {
Name string
Loader Loader
Flags func(cfg *config.Config) []cli.Flag
Apply func(cfg *config.Config, cmd *cli.Command)
}
Plugin represents a vector store plugin.
type UpsertRequest ¶
type UpsertRequest struct {
ConversationGroupID uuid.UUID
ConversationID uuid.UUID
EntryID uuid.UUID
Embedding []float32
ModelName string
}
UpsertRequest holds the data for a single vector upsert operation.
type VectorSearchResult ¶
type VectorSearchResult struct {
EntryID uuid.UUID `json:"entryId"`
ConversationID uuid.UUID `json:"conversationId"`
Score float64 `json:"score"`
}
VectorSearchResult represents a single vector search result.
type VectorStore ¶
type VectorStore interface {
// Search performs a semantic vector search.
Search(ctx context.Context, embedding []float32, conversationGroupIDs []uuid.UUID, limit int) ([]VectorSearchResult, error)
// Upsert stores or updates vector embeddings for a batch of entries.
Upsert(ctx context.Context, entries []UpsertRequest) error
// DeleteByConversationGroupID removes all embeddings for a conversation group.
DeleteByConversationGroupID(ctx context.Context, conversationGroupID uuid.UUID) error
// IsEnabled returns true if the vector store is configured and operational.
IsEnabled() bool
// Name returns the plugin name (e.g. "qdrant", "pgvector").
Name() string
}
VectorStore defines the interface for vector search backends.
Click to show internal directories.
Click to hide internal directories.