Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppConfig ¶
type AppConfig struct {
AppID int `toml:"app_id" mapstructure:"app_id"`
AppHash string `toml:"app_hash" mapstructure:"app_hash"`
BotToken string `toml:"bot_token" mapstructure:"bot_token"`
Admins []int64 `toml:"admins" mapstructure:"admins"`
SkipCatchup bool `toml:"skip_catchup" mapstructure:"skip_catchup"`
Plugin struct {
Enable bool `toml:"enable" mapstructure:"enable"`
Prefixes []string `toml:"prefixes" mapstructure:"prefixes"`
} `toml:"plugin" mapstructure:"plugin"`
Engine struct {
Type string `toml:"type" mapstructure:"type"` // "meilisearch" or "bleve"
Url string `toml:"url" mapstructure:"url"`
Index string `toml:"index" mapstructure:"index"` // For meilisearch: index uid
Key string `toml:"key" mapstructure:"key"`
Embedder struct {
Name string `toml:"name" mapstructure:"name"`
Source string `toml:"source" mapstructure:"source"`
Model string `toml:"model" mapstructure:"model"`
ApiKey string `toml:"api_key" mapstructure:"api_key"`
DocumentTemplate string `toml:"document_template" mapstructure:"document_template"`
Dimensions int `toml:"dimensions" mapstructure:"dimensions"`
URL string `toml:"url" mapstructure:"url"`
} `toml:"embedder" mapstructure:"embedder"`
} `toml:"engine" mapstructure:"engine"`
Ocr struct {
Enable bool `toml:"enable" mapstructure:"enable"`
Type string `toml:"type" mapstructure:"type"` // "paddle"
Paddle struct {
Url string `toml:"url" mapstructure:"url"`
Threshold float64 `toml:"threshold" mapstructure:"threshold"`
}
}
Api struct {
Enable bool `toml:"enable" mapstructure:"enable"`
Addr string `toml:"addr" mapstructure:"addr"`
Key string `toml:"key" mapstructure:"key"`
}
FileCache struct {
Disable bool `toml:"disable" mapstructure:"disable"`
Dir string `toml:"dir" mapstructure:"dir"`
TTL string `toml:"ttl" mapstructure:"ttl"`
} `toml:"file_cache" mapstructure:"file_cache"`
}
var C AppConfig
Click to show internal directories.
Click to hide internal directories.