feat: 支持SparkDesk-v3.1-128K以及hunyuan-vision

This commit is contained in:
lihangfu 2024-08-12 11:00:57 +08:00
parent b518292ce8
commit 0525e5b374

View File

@ -272,9 +272,9 @@ func xunfeiMakeRequest(textRequest model.GeneralOpenAIRequest, domain, authUrl,
}
func parseAPIVersionByModelName(modelName string) string {
parts := strings.Split(modelName, "-")
if len(parts) == 2 {
return parts[1]
index := strings.IndexAny(modelName, "-")
if index != -1 {
return modelName[index+1:]
}
return ""
}