From a76725a48e4e30ea0b4057b9cffeb3ff2fea16b9 Mon Sep 17 00:00:00 2001 From: kqlio67 Date: Wed, 27 Nov 2024 20:44:54 +0200 Subject: [PATCH] Update (g4f/models.py) --- g4f/models.py | 266 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 217 insertions(+), 49 deletions(-) diff --git a/g4f/models.py b/g4f/models.py index 655aca9c5df..ccd03e06245 100644 --- a/g4f/models.py +++ b/g4f/models.py @@ -5,14 +5,13 @@ from .Provider import IterListProvider, ProviderType from .Provider import ( AIChatFree, - Airforce, - AIUncensored, - Bing, + AmigoChat, Blackbox, ChatGpt, Chatgpt4Online, ChatGptEs, Cloudflare, + Copilot, DarkAI, DDG, DeepInfraChat, @@ -24,6 +23,7 @@ HuggingChat, HuggingFace, Liaobots, + LLMPlayground, MagickPen, Mhystical, MetaAI, @@ -70,12 +70,12 @@ def __all__() -> list[str]: Free2GPT, MagickPen, DeepInfraChat, - Airforce, + LLMPlayground, ChatGptEs, Cloudflare, - AIUncensored, DarkAI, Mhystical, + AmigoChat, ]) ) @@ -88,32 +88,45 @@ def __all__() -> list[str]: gpt_35_turbo = Model( name = 'gpt-3.5-turbo', base_provider = 'OpenAI', - best_provider = IterListProvider([Airforce]) + best_provider = IterListProvider([LLMPlayground]) ) # gpt-4 gpt_4o = Model( name = 'gpt-4o', base_provider = 'OpenAI', - best_provider = IterListProvider([Blackbox, ChatGptEs, DarkAI, ChatGpt, Airforce, Liaobots, OpenaiChat]) + best_provider = IterListProvider([Blackbox, ChatGptEs, DarkAI, ChatGpt, AmigoChat, LLMPlayground, Liaobots, OpenaiChat]) ) gpt_4o_mini = Model( name = 'gpt-4o-mini', base_provider = 'OpenAI', - best_provider = IterListProvider([DDG, ChatGptEs, FreeNetfly, Pizzagpt, ChatGpt, Airforce, RubiksAI, MagickPen, Liaobots, OpenaiChat]) + best_provider = IterListProvider([DDG, ChatGptEs, FreeNetfly, Pizzagpt, ChatGpt, AmigoChat, LLMPlayground, RubiksAI, MagickPen, Liaobots, OpenaiChat]) ) gpt_4_turbo = Model( name = 'gpt-4-turbo', base_provider = 'OpenAI', - best_provider = IterListProvider([Liaobots, Bing]) + best_provider = IterListProvider([Liaobots, LLMPlayground]) ) gpt_4 = Model( name = 'gpt-4', base_provider = 'OpenAI', - best_provider = IterListProvider([Chatgpt4Online, Bing, OpenaiChat, DDG, Liaobots, Airforce]) + best_provider = IterListProvider([Chatgpt4Online, Copilot, OpenaiChat, DDG, Liaobots, LLMPlayground]) +) + +# o1 +o1_preview = Model( + name = 'o1-preview', + base_provider = 'OpenAI', + best_provider = Liaobots +) + +o1_mini = Model( + name = 'o1-mini', + base_provider = 'OpenAI', + best_provider = Liaobots ) ### GigaChat ### @@ -134,7 +147,7 @@ def __all__() -> list[str]: llama_2_7b = Model( name = "llama-2-7b", base_provider = "Meta Llama", - best_provider = Cloudflare + best_provider = IterListProvider([Cloudflare, LLMPlayground]) ) # llama 3 llama_3_8b = Model( @@ -147,19 +160,19 @@ def __all__() -> list[str]: llama_3_1_8b = Model( name = "llama-3.1-8b", base_provider = "Meta Llama", - best_provider = IterListProvider([Blackbox, DeepInfraChat, Cloudflare, Airforce, PerplexityLabs]) + best_provider = IterListProvider([Blackbox, DeepInfraChat, Cloudflare, LLMPlayground, PerplexityLabs]) ) 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, TeachAnything, DarkAI, LLMPlayground, RubiksAI, HuggingChat, HuggingFace, PerplexityLabs]) ) llama_3_1_405b = Model( name = "llama-3.1-405b", base_provider = "Meta Llama", - best_provider = IterListProvider([Blackbox, DarkAI]) + best_provider = IterListProvider([Blackbox, DarkAI, AmigoChat]) ) # llama 3.2 @@ -175,16 +188,55 @@ def __all__() -> list[str]: best_provider = IterListProvider([HuggingChat, HuggingFace]) ) +llama_3_2_90b = Model( + name = "llama-3.2-90b", + base_provider = "Meta Llama", + best_provider = AmigoChat +) + +# CodeLlama +codellama_34b = Model( + name = "codellama-34b", + base_provider = "Meta Llama", + best_provider = AmigoChat +) + +### Mistral ### +mixtral_7b = Model( + name = "mixtral-7b", + base_provider = "Mistral", + best_provider = AmigoChat +) + mixtral_8x7b = Model( name = "mixtral-8x7b", base_provider = "Mistral", best_provider = DDG ) +mistral_tiny = Model( + name = "mistral-tiny", + base_provider = "Mistral", + best_provider = AmigoChat +) + mistral_nemo = Model( name = "mistral-nemo", base_provider = "Mistral", - best_provider = IterListProvider([HuggingChat, HuggingFace]) + best_provider = IterListProvider([HuggingChat, AmigoChat, HuggingFace]) +) + +### NousResearch ### +hermes_2_dpo = Model( + name = "hermes-2-dpo", + base_provider = "NousResearch", + best_provider = LLMPlayground +) + +hermes_2_pro = Model( + name = "hermes-2-pro", + base_provider = "NousResearch", + best_provider = LLMPlayground ) hermes_3 = Model( @@ -193,11 +245,17 @@ def __all__() -> list[str]: best_provider = IterListProvider([HuggingChat, HuggingFace]) ) +mixtral_8x7b_dpo = Model( + name = "mixtral-8x7b-dpo", + base_provider = "NousResearch", + best_provider = IterListProvider([AmigoChat, LLMPlayground]) +) + ### Microsoft ### phi_2 = Model( name = "phi-2", base_provider = "Microsoft", - best_provider = IterListProvider([Airforce]) + best_provider = IterListProvider([LLMPlayground]) ) phi_3_5_mini = Model( @@ -217,7 +275,7 @@ def __all__() -> list[str]: gemini_flash = Model( name = 'gemini-flash', base_provider = 'Google DeepMind', - best_provider = IterListProvider([Blackbox, Liaobots]) + best_provider = IterListProvider([Blackbox, AmigoChat, Liaobots]) ) gemini = Model( @@ -230,16 +288,10 @@ def __all__() -> list[str]: gemma_2b = Model( name = 'gemma-2b', base_provider = 'Google', - best_provider = ReplicateHome + best_provider = IterListProvider([ReplicateHome, AmigoChat]) ) ### Anthropic ### -claude_2_1 = Model( - name = 'claude-2.1', - base_provider = 'Anthropic', - best_provider = Liaobots -) - # claude 3 claude_3_opus = Model( name = 'claude-3-opus', @@ -263,7 +315,13 @@ def __all__() -> list[str]: claude_3_5_sonnet = Model( name = 'claude-3.5-sonnet', base_provider = 'Anthropic', - best_provider = IterListProvider([Blackbox, Liaobots]) + best_provider = IterListProvider([Blackbox, AmigoChat, Liaobots]) +) + +claude_3_5_haiku = Model( + name = 'claude-3.5-haiku', + base_provider = 'Anthropic', + best_provider = AmigoChat ) ### Reka AI ### @@ -290,7 +348,7 @@ def __all__() -> list[str]: command_r_plus = Model( name = 'command-r-plus', base_provider = 'CohereForAI', - best_provider = HuggingChat + best_provider = IterListProvider([HuggingChat, AmigoChat]) ) ### Qwen ### @@ -309,10 +367,16 @@ def __all__() -> list[str]: ) # qwen 2.5 +qwen_2_5_72b = Model( + name = 'qwen-2.5-72b', + base_provider = 'Qwen', + best_provider = AmigoChat +) + qwen_2_5_coder_32b = Model( name = 'qwen-2.5-coder-32b', base_provider = 'Qwen', - best_provider = IterListProvider([HuggingChat, HuggingFace]) + best_provider = IterListProvider([DeepInfraChat, HuggingChat, HuggingFace]) ) ### Upstage ### @@ -337,10 +401,16 @@ def __all__() -> list[str]: ) ### DeepSeek ### +deepseek_chat = Model( + name = 'deepseek-chat', + base_provider = 'DeepSeek', + best_provider = AmigoChat +) + deepseek_coder = Model( name = 'deepseek-coder', base_provider = 'DeepSeek', - best_provider = Airforce + best_provider = LLMPlayground ) ### WizardLM ### @@ -361,7 +431,7 @@ def __all__() -> list[str]: openchat_3_5 = Model( name = 'openchat-3.5', base_provider = 'OpenChat', - best_provider = Airforce + best_provider = LLMPlayground ) @@ -381,7 +451,7 @@ def __all__() -> list[str]: grok_beta = Model( name = 'grok-beta', base_provider = 'x.ai', - best_provider = Liaobots + best_provider = IterListProvider([AmigoChat, Liaobots]) ) @@ -402,7 +472,7 @@ def __all__() -> list[str]: nemotron_70b = Model( name = 'nemotron-70b', base_provider = 'Nvidia', - best_provider = IterListProvider([HuggingChat, HuggingFace]) + best_provider = IterListProvider([DeepInfraChat, HuggingChat, HuggingFace]) ) @@ -410,14 +480,14 @@ def __all__() -> list[str]: openhermes_2_5 = Model( name = 'openhermes-2.5', base_provider = 'Teknium', - best_provider = Airforce + best_provider = LLMPlayground ) ### Liquid ### lfm_40b = Model( name = 'lfm-40b', base_provider = 'Liquid', - best_provider = IterListProvider([Airforce, PerplexityLabs]) + best_provider = IterListProvider([LLMPlayground, PerplexityLabs]) ) @@ -425,21 +495,56 @@ def __all__() -> list[str]: german_7b = Model( name = 'german-7b', base_provider = 'DiscoResearch', - best_provider = Airforce + best_provider = LLMPlayground ) ### HuggingFaceH4 ### zephyr_7b = Model( name = 'zephyr-7b', base_provider = 'HuggingFaceH4', - best_provider = Airforce + best_provider = LLMPlayground ) ### Inferless ### neural_7b = Model( name = 'neural-7b', base_provider = 'inferless', - best_provider = Airforce + best_provider = LLMPlayground +) + +### Gryphe ### +mythomax_13b = Model( + name = 'mythomax-13b', + base_provider = 'Gryphe', + best_provider = AmigoChat +) + +### databricks ### +dbrx_instruct = Model( + name = 'dbrx-instruct', + base_provider = 'databricks', + best_provider = AmigoChat +) + +### anthracite-org ### +magnum_72b = Model( + name = 'magnum-72b', + base_provider = 'anthracite-org', + best_provider = AmigoChat +) + +### ai21 ### +jamba_mini = Model( + name = 'jamba-mini', + base_provider = 'ai21', + best_provider = AmigoChat +) + +### llmplayground.net ### +any_uncensored = Model( + name = 'any-uncensored', + base_provider = 'llmplayground.net', + best_provider = LLMPlayground ) ############# @@ -450,7 +555,7 @@ def __all__() -> list[str]: sdxl = Model( name = 'sdxl', base_provider = 'Stability AI', - best_provider = ReplicateHome + best_provider = IterListProvider([ReplicateHome, LLMPlayground]) ) @@ -474,56 +579,76 @@ def __all__() -> list[str]: flux = Model( name = 'flux', base_provider = 'Flux AI', - best_provider = IterListProvider([Blackbox, AIUncensored, Airforce]) + best_provider = IterListProvider([Blackbox, LLMPlayground]) ) flux_pro = Model( name = 'flux-pro', base_provider = 'Flux AI', - best_provider = Airforce + best_provider = LLMPlayground +) + +flux_dev = Model( + name = 'flux-dev', + base_provider = 'Flux AI', + best_provider = AmigoChat ) flux_realism = Model( name = 'flux-realism', base_provider = 'Flux AI', - best_provider = Airforce + best_provider = IterListProvider([LLMPlayground, AmigoChat]) ) flux_anime = Model( name = 'flux-anime', base_provider = 'Flux AI', - best_provider = Airforce + best_provider = LLMPlayground ) flux_3d = Model( name = 'flux-3d', base_provider = 'Flux AI', - best_provider = Airforce + best_provider = LLMPlayground ) flux_disney = Model( name = 'flux-disney', base_provider = 'Flux AI', - best_provider = Airforce + best_provider = LLMPlayground ) flux_pixel = Model( name = 'flux-pixel', base_provider = 'Flux AI', - best_provider = Airforce + best_provider = LLMPlayground ) flux_4o = Model( name = 'flux-4o', base_provider = 'Flux AI', - best_provider = Airforce + best_provider = LLMPlayground +) + +### OpenAI ### +dalle_3 = Model( + name = 'dalle-3', + base_provider = 'OpenAI', + best_provider = AmigoChat +) + +### Recraft ### +recraft_v3 = Model( + name = 'recraft-v3', + base_provider = 'Recraft', + best_provider = AmigoChat ) ### Other ### any_dark = Model( name = 'any-dark', - base_provider = '', - best_provider = Airforce + base_provider = 'Other', + best_provider = LLMPlayground ) class ModelUtils: @@ -550,6 +675,10 @@ class ModelUtils: 'gpt-4o-mini': gpt_4o_mini, 'gpt-4': gpt_4, 'gpt-4-turbo': gpt_4_turbo, + + # o1 + 'o1-preview': o1_preview, + 'o1-mini': o1_mini, ### Meta ### "meta-ai": meta, @@ -568,12 +697,21 @@ class ModelUtils: # llama-3.2 'llama-3.2-1b': llama_3_2_1b, 'llama-3.2-11b': llama_3_2_11b, + 'llama-3.2-90b': llama_3_2_90b, + + # CodeLlama + 'codellama-34b': codellama_34b, ### Mistral ### + 'mixtral-7b': mixtral_7b, 'mixtral-8x7b': mixtral_8x7b, + 'mistral-tiny': mistral_tiny, 'mistral-nemo': mistral_nemo, ### NousResearch ### + 'mixtral-8x7b-dpo': mixtral_8x7b_dpo, + 'hermes-2-dpo': hermes_2_dpo, + 'hermes-2-pro': hermes_2_pro, 'hermes-3': hermes_3, ### Microsoft ### @@ -590,8 +728,6 @@ class ModelUtils: 'gemma-2b': gemma_2b, ### Anthropic ### - 'claude-2.1': claude_2_1, - # claude 3 'claude-3-opus': claude_3_opus, 'claude-3-sonnet': claude_3_sonnet, @@ -599,6 +735,7 @@ class ModelUtils: # claude 3.5 'claude-3.5-sonnet': claude_3_5_sonnet, + 'claude-3.5-haiku': claude_3_5_haiku, ### Reka AI ### 'reka-core': reka_core, @@ -613,8 +750,16 @@ class ModelUtils: ### GigaChat ### 'gigachat': gigachat, + ### Qwen ### + # qwen 1_5 'qwen-1.5-7b': qwen_1_5_7b, + + # qwen 2 'qwen-2-72b': qwen_2_72b, + + # qwen 2.5 + 'qwen-2.5-72b': qwen_2_5_72b, + 'qwen-2.5-coder-32b': qwen_2_5_coder_32b, ### Upstage ### 'solar-pro': solar_pro, @@ -639,12 +784,28 @@ class ModelUtils: ### Perplexity AI ### 'sonar-online': sonar_online, 'sonar-chat': sonar_chat, + + ### DeepSeek ### + 'deepseek-chat': deepseek_chat, + 'deepseek-coder': deepseek_coder, ### TheBloke ### 'german-7b': german_7b, ### Nvidia ### 'nemotron-70b': nemotron_70b, + + ### databricks ### + 'dbrx-instruct': dbrx_instruct, + + ### anthracite-org ### + 'magnum-72b': magnum_72b, + + ### anthracite-org ### + 'jamba-mini': jamba_mini, + + ### llmplayground.net ### + 'any-uncensored': any_uncensored, ############# ### Image ### @@ -660,6 +821,7 @@ class ModelUtils: ### Flux AI ### 'flux': flux, 'flux-pro': flux_pro, + 'flux-dev': flux_dev, 'flux-realism': flux_realism, 'flux-anime': flux_anime, 'flux-3d': flux_3d, @@ -667,6 +829,12 @@ class ModelUtils: 'flux-pixel': flux_pixel, 'flux-4o': flux_4o, + ### OpenAI ### + 'dalle-3': dalle_3, + + ### Recraft ### + 'recraft-v3': recraft_v3, + ### Other ### 'any-dark': any_dark, }