Documentation
¶
Index ¶
- Variables
- func AddCollection(configPath string, col Collection) error
- func DefaultConfigPath() string
- func DefaultDBPath() string
- func ExpandHome(path string) string
- func RemoveCollection(configPath string, name string) error
- func RenameCollection(configPath, oldName, newName string) error
- func SlugFromPath(path string) string
- type Collection
- type Config
- type EmbeddingProviderConfig
- type GenerationProviderConfig
- type Providers
- type RerankProviderConfig
- type SearchConfig
Constants ¶
This section is empty.
Variables ¶
var DefaultConfigTemplate = `` /* 1104-byte string literal not displayed */
Functions ¶
func AddCollection ¶ added in v0.4.0
func AddCollection(configPath string, col Collection) error
AddCollection adds or updates a named collection in the config file at configPath. Existing YAML comments and structure are preserved via yaml.Node round-trip.
func DefaultConfigPath ¶
func DefaultConfigPath() string
func DefaultDBPath ¶
func DefaultDBPath() string
func ExpandHome ¶
ExpandHome expands a leading ~ to the user home directory.
func RemoveCollection ¶ added in v0.4.0
RemoveCollection removes a named collection from the config file at configPath. Existing YAML comments and structure are preserved via yaml.Node round-trip. Returns an error if the collection name is not found.
func RenameCollection ¶ added in v0.5.0
RenameCollection changes the name of an existing collection in the config file at configPath. It performs a single read-modify-write so there is no window where the old entry has been deleted but the new entry has not yet been written.
func SlugFromPath ¶ added in v0.5.0
SlugFromPath returns a URL-safe slug derived from the last component of path.
Types ¶
type Collection ¶
type Config ¶
type Config struct {
DatabasePath string `yaml:"database_path"`
Collections []Collection `yaml:"collections"`
Providers Providers `yaml:"providers"`
Search SearchConfig `yaml:"search"`
}
func DefaultConfig ¶
func DefaultConfig() *Config
type EmbeddingProviderConfig ¶
type Providers ¶
type Providers struct {
Embedding *EmbeddingProviderConfig `yaml:"embedding,omitempty"`
Rerank *RerankProviderConfig `yaml:"rerank,omitempty"`
Generation *GenerationProviderConfig `yaml:"generation,omitempty"`
}