mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-20 07:03:42 +08:00
Added validation for prompt length in
relayImageHelper function
This commit is contained in:
@@ -18,12 +18,16 @@ var DalleSizeRatios = map[string]map[string]float64{
|
||||
},
|
||||
}
|
||||
|
||||
// Array in values, of maxmium and minimum
|
||||
var DalleGenerationImageAmounts = map[string][2]int{
|
||||
"dall-e-2": {1, 10},
|
||||
"dall-e-3": {1, 1}, // OpenAI allows n=1 currently.
|
||||
}
|
||||
|
||||
var DalleImagePromptLengthLimitations = map[string]int{
|
||||
"dall-e-2": 1000,
|
||||
"dall-e-3": 4000,
|
||||
}
|
||||
|
||||
// ModelRatio
|
||||
// https://platform.openai.com/docs/models/model-endpoint-compatibility
|
||||
// https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Blfmc9dlf
|
||||
|
||||
Reference in New Issue
Block a user