diff --git a/crazy_functions/crazy_utils.py b/crazy_functions/crazy_utils.py index 5751956f..5c8776ac 100644 --- a/crazy_functions/crazy_utils.py +++ b/crazy_functions/crazy_utils.py @@ -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 diff --git a/request_llms/bridge_all.py b/request_llms/bridge_all.py index 3eaa96ac..34d05cac 100644 --- a/request_llms/bridge_all.py +++ b/request_llms/bridge_all.py @@ -212,6 +212,16 @@ model_info = { "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, diff --git a/shared_utils/key_pattern_manager.py b/shared_utils/key_pattern_manager.py index 6eef0163..d0d7f6d4 100644 --- a/shared_utils/key_pattern_manager.py +++ b/shared_utils/key_pattern_manager.py @@ -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) diff --git a/version b/version index e0e936dd..af84f9b1 100644 --- a/version +++ b/version @@ -1,5 +1,5 @@ { "version": 3.90, "show_feature": true, - "new_feature": "增加RAG组件 <-> 升级多合一主提交键" + "new_feature": "支持chatgpt-4o-latest <-> 增加RAG组件 <-> 升级多合一主提交键" }