From 156abe51b384fa0003447c2b1fe162fbb421d074 Mon Sep 17 00:00:00 2001 From: kqlio67 <> Date: Tue, 3 Dec 2024 12:32:11 +0200 Subject: [PATCH] feat(g4f/Provider/HuggingChat.py): update HuggingChat model list and aliases Request by @TheFirstNoob - Add 'Qwen/Qwen2.5-72B-Instruct' as the first model in the list - Update model aliases to include 'qwen-2.5-72b' - Reorder existing models in the list for consistency - Remove duplicate entry for 'Qwen/Qwen2.5-72B-Instruct' in models list --- g4f/Provider/HuggingChat.py | 4 +++- g4f/models.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/g4f/Provider/HuggingChat.py b/g4f/Provider/HuggingChat.py index f8e6a8dd7d4..255b5453132 100644 --- a/g4f/Provider/HuggingChat.py +++ b/g4f/Provider/HuggingChat.py @@ -21,6 +21,7 @@ class HuggingChat(AbstractProvider, ProviderModelMixin): default_model = "meta-llama/Meta-Llama-3.1-70B-Instruct" models = [ + 'Qwen/Qwen2.5-72B-Instruct', 'meta-llama/Meta-Llama-3.1-70B-Instruct', 'CohereForAI/c4ai-command-r-plus-08-2024', 'Qwen/Qwen2.5-72B-Instruct', @@ -33,6 +34,7 @@ class HuggingChat(AbstractProvider, ProviderModelMixin): ] model_aliases = { + "qwen-2.5-72b": "Qwen/Qwen2.5-72B-Instruct", "llama-3.1-70b": "meta-llama/Meta-Llama-3.1-70B-Instruct", "command-r-plus": "CohereForAI/c4ai-command-r-plus-08-2024", "qwen-2-72b": "Qwen/Qwen2.5-72B-Instruct", @@ -173,4 +175,4 @@ def create_completion( full_response = full_response.replace('<|im_end|', '').replace('\u0000', '').strip() if not stream: - yield full_response \ No newline at end of file + yield full_response diff --git a/g4f/models.py b/g4f/models.py index fbc54c84de0..c253559ac21 100644 --- a/g4f/models.py +++ b/g4f/models.py @@ -181,7 +181,7 @@ def __all__() -> list[str]: llama_3_2_1b = Model( name = "llama-3.2-1b", base_provider = "Meta Llama", - best_provider = IterListProvider([Cloudflare]) + best_provider = Cloudflare ) llama_3_2_11b = Model( @@ -257,7 +257,7 @@ def __all__() -> list[str]: phi_2 = Model( name = "phi-2", base_provider = "Microsoft", - best_provider = IterListProvider([Airforce]) + best_provider = Airforce ) phi_3_5_mini = Model(