feat: add GPT-4o support (#2082)

Reference:
- https://platform.openai.com/docs/models/gpt-4o
- https://openai.com/index/hello-gpt-4o/
This commit is contained in:
Peter Dave Hello
2024-05-16 09:39:49 +08:00
committed by GitHub
parent fa8874b6dd
commit f257a54604
3 changed files with 4 additions and 4 deletions

View File

@@ -53,8 +53,8 @@ let api: ChatGPTAPI | ChatGPTUnofficialProxyAPI
options.maxModelTokens = 32768
options.maxResponseTokens = 8192
}
// if use GPT-4 Turbo
else if (/-preview|-turbo/.test(model.toLowerCase())) {
// if use GPT-4 Turbo or GPT-4o
else if (/-preview|-turbo|-o/.test(model.toLowerCase())) {
options.maxModelTokens = 128000
options.maxResponseTokens = 4096
}