Added validation for prompt length in

relayImageHelper function
This commit is contained in:
ckt1031
2023-11-15 20:16:50 +08:00
parent 29fbd12870
commit cb36192c55
2 changed files with 10 additions and 1 deletions

View File

@@ -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