Skip to content

Commit

Permalink
feat(g4f/models.py): update model providers and add new models
Browse files Browse the repository at this point in the history
- Add Blackbox2 to Provider imports
- Update gpt-3.5-turbo best provider to Blackbox
- Add Blackbox2 to llama-3.1-70b best providers
- Rename dalle_3 to dall_e_3 and update its best providers
- Add new models: solar_mini, openhermes_2_5, lfm_40b, zephyr_7b, neural_7b, mythomax_13b
- Update ModelUtils.convert with new models and changes
- Remove duplicate 'dalle-3' entry in ModelUtils.convert
  • Loading branch information
kqlio67 committed Dec 2, 2024
1 parent 7282bda commit f01b61c
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions g4f/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
AIChatFree,
AmigoChat,
Blackbox,
Blackbox2,
BingCreateImages,
ChatGpt,
ChatGptEs,
Expand Down Expand Up @@ -89,7 +90,7 @@ def __all__() -> list[str]:
gpt_35_turbo = Model(
name = 'gpt-3.5-turbo',
base_provider = 'OpenAI',
best_provider = IterListProvider([Airforce])
best_provider = Blackbox
)

# gpt-4
Expand Down Expand Up @@ -167,7 +168,7 @@ def __all__() -> list[str]:
llama_3_1_70b = Model(
name = "llama-3.1-70b",
base_provider = "Meta Llama",
best_provider = IterListProvider([DDG, DeepInfraChat, Blackbox, TeachAnything, DarkAI, Airforce, RubiksAI, HuggingChat, HuggingFace, PerplexityLabs])
best_provider = IterListProvider([DDG, DeepInfraChat, Blackbox, Blackbox2, TeachAnything, DarkAI, Airforce, RubiksAI, HuggingChat, HuggingFace, PerplexityLabs])
)

llama_3_1_405b = Model(
Expand Down Expand Up @@ -632,10 +633,10 @@ def __all__() -> list[str]:
)

### OpenAI ###
dalle_3 = Model(
dall_e_3 = Model(
name = 'dall-e-3',
base_provider = 'OpenAI',
best_provider = IterListProvider([CopilotAccount, OpenaiAccount, MicrosoftDesigner, BingCreateImages])
best_provider = IterListProvider([Airforce, CopilotAccount, OpenaiAccount, MicrosoftDesigner, BingCreateImages])
)

### Recraft ###
Expand Down Expand Up @@ -763,6 +764,7 @@ class ModelUtils:
'qwen-2.5-coder-32b': qwen_2_5_coder_32b,

### Upstage ###
'solar-mini': solar_mini,
'solar-pro': solar_pro,

### Inflection ###
Expand Down Expand Up @@ -796,6 +798,12 @@ class ModelUtils:
### Nvidia ###
'nemotron-70b': nemotron_70b,

### Teknium ###
'openhermes-2.5': openhermes_2_5,

### Liquid ###
'lfm-40b': lfm_40b,

### databricks ###
'dbrx-instruct': dbrx_instruct,

Expand All @@ -805,6 +813,15 @@ class ModelUtils:
### anthracite-org ###
'jamba-mini': jamba_mini,

### HuggingFaceH4 ###
'zephyr-7b': zephyr_7b,

### Inferless ###
'neural-7b': neural_7b,

### Gryphe ###
'mythomax-13b': mythomax_13b,

### llmplayground.net ###
'any-uncensored': any_uncensored,

Expand All @@ -831,8 +848,7 @@ class ModelUtils:
'flux-4o': flux_4o,

### OpenAI ###
'dalle-3': dalle_3,
'dall-e-3': dalle_3,
'dall-e-3': dall_e_3,

### Recraft ###
'recraft-v3': recraft_v3,
Expand Down

0 comments on commit f01b61c

Please sign in to comment.