Documentation
¶
Index ¶
- func FormatModelMapping(mapping map[string]string) string
- func MapModel(model string) string
- func ModelAliases() map[string]string
- func ParseModelMapping(value string) (map[string]string, error)
- func SetModelMapping(mapping map[string]string)
- func SplitList(value string) []string
- func WriteEnv(path string, values map[string]string) error
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatModelMapping ¶ added in v0.1.3
FormatModelMapping 按别名排序输出 MODEL_MAPPING 格式的映射
func ModelAliases ¶ added in v0.1.3
ModelAliases 返回当前模型别名映射的副本
func ParseModelMapping ¶ added in v0.1.3
ParseModelMapping 解析逗号分隔的“别名:模型 ID”映射
Types ¶
type Config ¶
type Config struct {
ListenAddress string
AuthStatePaths []string
ProxyAPIKey string
ProxyURL string
AccountCooldown time.Duration
SessionTTL time.Duration
InitTimeout time.Duration
ModelMapping map[string]string
SaveHistory bool
LogLevel string
LogFormat string
RequestBodyLog bool
// PerAccountConcurrency 是每个账号同时进行的上游请求数
PerAccountConcurrency int
// RoutingStrategy 为 round-robin 或 fill-first
RoutingStrategy string
// AdminAuthEnabled 为 true 时管理端要求登录并接受远程访问
AdminAuthEnabled bool
AdminUsername string
AdminPassword string
}
Config 保存服务启动所需的全部配置
Click to show internal directories.
Click to hide internal directories.