feat(*): 图片模型渠道 - 新增 Grok JSON 生图与单图编辑协议
This commit is contained in:
1 parent
84f13fffa8
commit
abec135d26
15 files changed
+207
-10
No files matched your search
@@ -106,6 +106,15 @@ func DefaultImageCapabilityConfig(protocol string, modelName string) *ImageCapab
|
||||
MaxOutputs: 15,
|
||||
}
|
||||
switch model.ChannelInterfaceType(protocol) {
|
||||
case model.ChannelInterfaceGrokImage:
|
||||
image.References.MaxImages = 1
|
||||
image.References.MaskSupported = false
|
||||
image.Size = ImageSizeConfig{Parameter: "none", Values: []string{}, Default: "auto", AllowCustom: false}
|
||||
image.Quality = ImageQualityConfig{Supported: false, Values: []string{}, Default: "auto"}
|
||||
image.TransparentBackground = VideoBooleanConfig{Supported: false, Default: false}
|
||||
image.ResponseFormat = ParameterSupport{Supported: true}
|
||||
image.OutputFormat = ParameterSupport{Supported: false}
|
||||
image.MaxOutputs = 1
|
||||
case model.ChannelInterfaceVolcengineArkImage:
|
||||
image.References.MaskSupported = false
|
||||
image.Quality.Supported = false
|
||||
@@ -120,7 +129,7 @@ func DefaultImageCapabilityConfig(protocol string, modelName string) *ImageCapab
|
||||
image.ResponseFormat.Supported = false
|
||||
image.OutputFormat.Supported = false
|
||||
}
|
||||
if strings.HasPrefix(strings.ToLower(strings.TrimSpace(modelName)), "grok-imagine-image") {
|
||||
if model.ChannelInterfaceType(protocol) != model.ChannelInterfaceGrokImage && strings.HasPrefix(strings.ToLower(strings.TrimSpace(modelName)), "grok-imagine-image") {
|
||||
image.References.MaxImages = 0
|
||||
image.References.MaskSupported = false
|
||||
image.Size = ImageSizeConfig{Parameter: "none", Values: []string{}, Default: "auto", AllowCustom: false}
|
||||
|
||||
Reference in new issue
Block a user