feat: add sub2api source compatibility
This commit is contained in:
+17
-8
@@ -11,14 +11,23 @@ const (
|
||||
|
||||
// ModelChannel 模型渠道配置。
|
||||
type ModelChannel struct {
|
||||
Protocol string `json:"protocol"`
|
||||
Name string `json:"name"`
|
||||
BaseURL string `json:"baseUrl"`
|
||||
APIKey string `json:"apiKey"`
|
||||
Models []string `json:"models"`
|
||||
Weight int `json:"weight"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Remark string `json:"remark"`
|
||||
Protocol string `json:"protocol"`
|
||||
Compatibility string `json:"compatibility"`
|
||||
Name string `json:"name"`
|
||||
BaseURL string `json:"baseUrl"`
|
||||
APIKey string `json:"apiKey"`
|
||||
Models []string `json:"models"`
|
||||
Weight int `json:"weight"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Remark string `json:"remark"`
|
||||
RequestOptions ModelRequestOptions `json:"requestOptions"`
|
||||
}
|
||||
|
||||
// ModelRequestOptions 控制 OpenAI 兼容接口的可选请求参数。
|
||||
type ModelRequestOptions struct {
|
||||
// ImageResponseFormat 为图片生成/编辑请求设置 response_format。
|
||||
// OpenAI 默认使用 b64_json;Sub2API 推荐使用 url,避免部分上游不返回 b64_json。
|
||||
ImageResponseFormat string `json:"imageResponseFormat"`
|
||||
}
|
||||
|
||||
// ModelCost 模型算力点配置。
|
||||
|
||||
Reference in New Issue
Block a user