Skip to content

Commit

Permalink
feat: 新增 GPT-3.5-16k 等新模型支持
Browse files Browse the repository at this point in the history
  • Loading branch information
GaiZhenbiao committed Jun 14, 2023
1 parent 85bb598 commit cc35102
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion modules/presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,15 @@

ONLINE_MODELS = [
"gpt-3.5-turbo",
"gpt-3.5-turbo-16k",
"gpt-3.5-turbo-0301",
"gpt-3.5-turbo-0613",
"gpt-4",
"gpt-4-0314",
"gpt-4-0613",
"gpt-4-32k",
"gpt-4-32k-0314",
"gpt-4-32k-0613",
"川虎助理",
"川虎助理 Pro",
"xmchat",
Expand Down Expand Up @@ -105,11 +109,15 @@

MODEL_TOKEN_LIMIT = {
"gpt-3.5-turbo": 4096,
"gpt-3.5-turbo-16k": 16384,
"gpt-3.5-turbo-0301": 4096,
"gpt-3.5-turbo-0613": 4096,
"gpt-4": 8192,
"gpt-4-0314": 8192,
"gpt-4-0613": 8192,
"gpt-4-32k": 32768,
"gpt-4-32k-0314": 32768
"gpt-4-32k-0314": 32768,
"gpt-4-32k-0613": 32768
}

TOKEN_OFFSET = 1000 # 模型的token上限减去这个值,得到软上限。到达软上限之后,自动尝试减少token占用。
Expand Down

0 comments on commit cc35102

Please sign in to comment.