Skip to content

Commit c49c10d

Browse files
authored
feat: OpenAI模型表单增加对GPT-4o的支持(#447) (#447)
1 parent c8980b1 commit c49c10d

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

apps/setting/models_provider/impl/openai_model_provider/openai_model_provider.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,17 @@ def encryption_dict(self, model: Dict[str, object]):
6060
'gpt-3.5-turbo': ModelInfo('gpt-3.5-turbo', '最新的gpt-3.5-turbo,随OpenAI调整而更新', ModelTypeConst.LLM,
6161
openai_llm_model_credential,
6262
),
63+
'gpt-4': ModelInfo('gpt-4', '最新的gpt-4,随OpenAI调整而更新', ModelTypeConst.LLM, openai_llm_model_credential,
64+
),
65+
'gpt-4o': ModelInfo('gpt-4o', '最新的GPT-4o,比gpt-4-turbo更便宜、更快,随OpenAI调整而更新',
66+
ModelTypeConst.LLM, openai_llm_model_credential,
67+
),
68+
'gpt-4-turbo': ModelInfo('gpt-4-turbo', '最新的gpt-4-turbo,随OpenAI调整而更新', ModelTypeConst.LLM,
69+
openai_llm_model_credential,
70+
),
71+
'gpt-4-turbo-preview': ModelInfo('gpt-4-turbo-preview', '最新的gpt-4-turbo-preview,随OpenAI调整而更新',
72+
ModelTypeConst.LLM, openai_llm_model_credential,
73+
),
6374
'gpt-3.5-turbo-0125': ModelInfo('gpt-3.5-turbo-0125',
6475
'2024年1月25日的gpt-3.5-turbo快照,支持上下文长度16,385 tokens', ModelTypeConst.LLM,
6576
openai_llm_model_credential,
@@ -72,14 +83,10 @@ def encryption_dict(self, model: Dict[str, object]):
7283
'[Legacy] 2023年6月13日的gpt-3.5-turbo快照,将于2024年6月13日弃用',
7384
ModelTypeConst.LLM, openai_llm_model_credential,
7485
),
75-
'gpt-4': ModelInfo('gpt-4', '最新的gpt-4,随OpenAI调整而更新', ModelTypeConst.LLM, openai_llm_model_credential,
76-
),
77-
'gpt-4-turbo': ModelInfo('gpt-4-turbo', '最新的gpt-4-turbo,随OpenAI调整而更新', ModelTypeConst.LLM,
78-
openai_llm_model_credential,
79-
),
80-
'gpt-4-turbo-preview': ModelInfo('gpt-4-turbo-preview', '最新的gpt-4-turbo-preview,随OpenAI调整而更新',
81-
ModelTypeConst.LLM, openai_llm_model_credential,
82-
),
86+
'gpt-4o-2024-05-13': ModelInfo('gpt-4o-2024-05-13',
87+
'2024年5月13日的gpt-4o快照,支持上下文长度128,000 tokens',
88+
ModelTypeConst.LLM, openai_llm_model_credential,
89+
),
8390
'gpt-4-turbo-2024-04-09': ModelInfo('gpt-4-turbo-2024-04-09',
8491
'2024年4月9日的gpt-4-turbo快照,支持上下文长度128,000 tokens',
8592
ModelTypeConst.LLM, openai_llm_model_credential,

0 commit comments

Comments
 (0)