update azure model

This commit is contained in:
Sakurasan
2023-07-01 17:05:45 +08:00
parent bf373c79ae
commit c135d1c022
3 changed files with 5 additions and 6 deletions

View File

@@ -772,11 +772,9 @@ func NumTokensFromStr(messages string, model string) (num_tokens int) {
}
func modelmap(in string) string {
switch in {
case "gpt-3.5-turbo":
return "gpt-35-turbo"
case "gpt-4":
return "gpt-4"
// gpt-3.5-turbo -> gpt-35-turbo
if strings.HasSuffix(in, ".") {
return strings.ReplaceAll(in, ".", "")
}
return in
}