Skip to content

Commit

Permalink
chatgpt-4o-latest
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-husky committed Nov 11, 2024
1 parent d152f62 commit 34cc484
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions crazy_functions/crazy_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def can_multi_process(llm) -> bool:
def default_condition(llm) -> bool:
# legacy condition
if llm.startswith('gpt-'): return True
if llm.startswith('chatgpt-'): return True
if llm.startswith('api2d-'): return True
if llm.startswith('azure-'): return True
if llm.startswith('spark'): return True
Expand Down
10 changes: 10 additions & 0 deletions request_llms/bridge_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,16 @@ def decode(self, *args, **kwargs):
"token_cnt": get_token_num_gpt4,
},

"chatgpt-4o-latest": {
"fn_with_ui": chatgpt_ui,
"fn_without_ui": chatgpt_noui,
"endpoint": openai_endpoint,
"has_multimodal_capacity": True,
"max_token": 128000,
"tokenizer": tokenizer_gpt4,
"token_cnt": get_token_num_gpt4,
},

"gpt-4o-2024-05-13": {
"fn_with_ui": chatgpt_ui,
"fn_without_ui": chatgpt_noui,
Expand Down
3 changes: 2 additions & 1 deletion shared_utils/key_pattern_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ def select_api_key(keys, llm_model):
avail_key_list = []
key_list = keys.split(',')

if llm_model.startswith('gpt-') or llm_model.startswith('one-api-') or llm_model.startswith('o1-'):
if llm_model.startswith('gpt-') or llm_model.startswith('chatgpt-') or \
llm_model.startswith('one-api-') or llm_model.startswith('o1-'):
for k in key_list:
if is_openai_api_key(k): avail_key_list.append(k)

Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 3.90,
"show_feature": true,
"new_feature": "增加RAG组件 <-> 升级多合一主提交键"
"new_feature": "支持chatgpt-4o-latest <-> 增加RAG组件 <-> 升级多合一主提交键"
}

0 comments on commit 34cc484

Please sign in to comment.