Skip to content

Commit

Permalink
feat(g4f/Provider/HuggingChat.py): update HuggingChat model list and …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
kqlio67 committed Dec 3, 2024
1 parent 569ee15 commit 156abe5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion g4f/Provider/HuggingChat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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",
Expand Down Expand Up @@ -173,4 +175,4 @@ def create_completion(
full_response = full_response.replace('<|im_end|', '').replace('\u0000', '').strip()

if not stream:
yield full_response
yield full_response
4 changes: 2 additions & 2 deletions g4f/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 156abe5

Please sign in to comment.