Documentation
¶
Index ¶
- Variables
- type ChromaConfig
- type Config
- func (cfg *Config) ConfigForEmbedder() (modelPath, tokenizerPath, libPath string)
- func (cfg *Config) GetChromaURL() string
- func (cfg *Config) GetDatabase() string
- func (cfg *Config) GetEmbedderLib() string
- func (cfg *Config) GetEmbedderModel() string
- func (cfg *Config) GetEmbedderTokenizer() string
- func (cfg *Config) GetTenant() string
- func (cfg *Config) IsVerbose() bool
- type ConfigFile
- type ConfigFileChroma
- type ConfigFileCreateCollection
- type ConfigFileFeatures
- type ConfigFileLogging
- type ConfigFileModel
- type LoggingConfig
- type ModelConfig
Constants ¶
This section is empty.
Variables ¶
var ErrNoConfigFile = errors.New("no config file found")
ErrNoConfigFile is returned when no config file is found in any of the search locations.
Functions ¶
This section is empty.
Types ¶
type ChromaConfig ¶
type ChromaConfig struct {
URL string
Host string
Port string
Tenant string
Database string
Timeout time.Duration
}
ChromaConfig holds ChromaDB connection settings.
type Config ¶
type Config struct {
Chroma ChromaConfig
Model ModelConfig
Logging LoggingConfig
}
Config holds all configuration for cmdChroma.
func LoadConfig ¶
LoadConfig loads configuration from all sources with proper precedence: CLI flags > Environment variables > Local config > Global config > Defaults
func (*Config) ConfigForEmbedder ¶
ConfigForEmbedder returns paths needed by the embedder.
func (*Config) GetChromaURL ¶
GetChromaURL returns the full ChromaDB URL.
func (*Config) GetDatabase ¶
GetDatabase returns the database name.
func (*Config) GetEmbedderLib ¶
GetEmbedderLib returns the path to the ONNX runtime library.
func (*Config) GetEmbedderModel ¶
GetEmbedderModel returns the path to the ONNX model.
func (*Config) GetEmbedderTokenizer ¶
GetEmbedderTokenizer returns the path to the tokenizer JSON.
type ConfigFile ¶
type ConfigFile struct {
Version string `yaml:"version"`
Chroma ConfigFileChroma `yaml:"chroma"`
Model ConfigFileModel `yaml:"model"`
Logging ConfigFileLogging `yaml:"logging"`
Features ConfigFileFeatures `yaml:"features"`
}
ConfigFile represents the structure of a YAML configuration file on disk.
type ConfigFileChroma ¶
type ConfigFileChroma struct {
Host string `yaml:"host"`
Port string `yaml:"port"`
Tenant string `yaml:"tenant"`
Database string `yaml:"database"`
Timeout int `yaml:"timeout"`
}
ConfigFileChroma represents the chroma section in the YAML config file.
type ConfigFileCreateCollection ¶
type ConfigFileCreateCollection struct {
AutoCreateDatabase bool `yaml:"auto_create_database"`
}
ConfigFileCreateCollection represents feature flags for create_collection.
type ConfigFileFeatures ¶
type ConfigFileFeatures struct {
CreateCollection ConfigFileCreateCollection `yaml:"create_collection"`
}
ConfigFileFeatures represents the features section in the YAML config file.
type ConfigFileLogging ¶
type ConfigFileLogging struct {
Level string `yaml:"level"`
Format string `yaml:"format"`
Verbose bool `yaml:"verbose"`
}
ConfigFileLogging represents the logging section in the YAML config file.
type ConfigFileModel ¶
type ConfigFileModel struct {
ONNXModel string `yaml:"onnx_model"`
Tokenizer string `yaml:"tokenizer"`
ONNXLib string `yaml:"onnx_lib"`
}
ConfigFileModel represents the model section in the YAML config file.
type LoggingConfig ¶
LoggingConfig controls logging behavior.
type ModelConfig ¶
ModelConfig holds paths to embedding model and tokenizer.