25 lines
1.0 KiB
Go
25 lines
1.0 KiB
Go
|
|
package config
|
||
|
|
|
||
|
|
// GorseConfig Gorse 推荐系统配置
|
||
|
|
type GorseConfig struct {
|
||
|
|
Address string `mapstructure:"address"`
|
||
|
|
APIKey string `mapstructure:"api_key"`
|
||
|
|
Enabled bool `mapstructure:"enabled"`
|
||
|
|
Dashboard string `mapstructure:"dashboard"`
|
||
|
|
ImportPassword string `mapstructure:"import_password"`
|
||
|
|
EmbeddingAPIKey string `mapstructure:"embedding_api_key"`
|
||
|
|
EmbeddingURL string `mapstructure:"embedding_url"`
|
||
|
|
EmbeddingModel string `mapstructure:"embedding_model"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// OpenAIConfig OpenAI 配置
|
||
|
|
type OpenAIConfig struct {
|
||
|
|
Enabled bool `mapstructure:"enabled"`
|
||
|
|
BaseURL string `mapstructure:"base_url"`
|
||
|
|
APIKey string `mapstructure:"api_key"`
|
||
|
|
ModerationModel string `mapstructure:"moderation_model"`
|
||
|
|
ModerationMaxImagesPerRequest int `mapstructure:"moderation_max_images_per_request"`
|
||
|
|
RequestTimeout int `mapstructure:"request_timeout"`
|
||
|
|
StrictModeration bool `mapstructure:"strict_moderation"`
|
||
|
|
}
|