You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
653 B
40 lines
653 B
package config
|
|
|
|
import "github.com/zeromicro/go-zero/rest"
|
|
|
|
type Config struct {
|
|
rest.RestConf
|
|
Auth AuthConfig
|
|
Database DatabaseConfig
|
|
AI AIConfig
|
|
}
|
|
|
|
type AuthConfig struct {
|
|
AccessSecret string
|
|
AccessExpire int64
|
|
}
|
|
|
|
type DatabaseConfig struct {
|
|
Driver string
|
|
DataSource string
|
|
}
|
|
|
|
type AIConfig struct {
|
|
Provider string
|
|
MaxHistoryMessages int
|
|
MaxTokens int
|
|
Aliyun AliyunConfig
|
|
OpenAI OpenAIConfig
|
|
}
|
|
|
|
type AliyunConfig struct {
|
|
ApiKey string
|
|
Model string
|
|
AppID string // 百炼应用 ID(可选)
|
|
}
|
|
|
|
type OpenAIConfig struct {
|
|
ApiKey string
|
|
BaseUrl string
|
|
Model string
|
|
}
|
|
|