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

@@ -8,6 +8,7 @@
| model name | deployment name |
| --- | --- |
|gpt-35-turbo | gpt-35-turbo |
|gpt-35-turbo-16k | gpt-35-turbo-16k |
| gpt-4 | gpt-4 |
## How to use

View File

@@ -1,6 +1,6 @@
# pandora for team
[pandora](pandora)是一个把ChatGPT(web/App)接口化的项目,可以看做是第三方 OpenAI API 提供方(接口和OpenAI一致)
[pandora](https://github.com/pengzhile/pandora)是一个把ChatGPT(web/App)接口化的项目,可以看做是第三方 OpenAI API 提供方(接口和OpenAI一致)
## 准备
- https://ai.fakeopen.com/auth1 获取accesstoken

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
}