Skip to content

Commit

Permalink
chore: add o1 model settings
Browse files Browse the repository at this point in the history
  • Loading branch information
BertramRay committed Sep 13, 2024
1 parent 7474b2c commit 8838bcd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions service/src/chatgpt/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ let api: ChatGPTAPI | ChatGPTUnofficialProxyAPI
options.maxResponseTokens = 4096
}
}
else if (model.toLowerCase().includes('o1')) {
if (/mini/.test(model.toLowerCase())) {
options.maxModelTokens = 128000
options.maxResponseTokens = 65536
}
options.maxModelTokens = 128000
options.maxResponseTokens = 32768
}

if (isNotEmptyString(OPENAI_API_BASE_URL)) {
// if find /v1 in OPENAI_API_BASE_URL then use it
Expand Down

0 comments on commit 8838bcd

Please sign in to comment.