From 418214173862c11a57496fdf29932abc175fc3c8 Mon Sep 17 00:00:00 2001 From: kqlio67 Date: Wed, 27 Nov 2024 23:22:50 +0200 Subject: [PATCH] Update (g4f/models.py g4f/Provider/Airforce.py g4f/Provider/__init__.py g4f/Provider/LLMPlayground.py) --- .../{LLMPlayground.py => Airforce.py} | 2 +- g4f/Provider/__init__.py | 2 +- g4f/models.py | 64 +++++++++---------- 3 files changed, 34 insertions(+), 34 deletions(-) rename g4f/Provider/{LLMPlayground.py => Airforce.py} (99%) diff --git a/g4f/Provider/LLMPlayground.py b/g4f/Provider/Airforce.py similarity index 99% rename from g4f/Provider/LLMPlayground.py rename to g4f/Provider/Airforce.py index 4855851bcff..c9f0b6d208a 100644 --- a/g4f/Provider/LLMPlayground.py +++ b/g4f/Provider/Airforce.py @@ -27,7 +27,7 @@ def split_message(message: str, max_length: int = 1000) -> list[str]: chunks.append(message) return chunks -class LLMPlayground(AsyncGeneratorProvider, ProviderModelMixin): +class Airforce(AsyncGeneratorProvider, ProviderModelMixin): label = "LLM Playground" url = "https://llmplayground.net" api_endpoint_completions = "https://api.airforce/chat/completions" diff --git a/g4f/Provider/__init__.py b/g4f/Provider/__init__.py index 9d586bbd4b0..a74bc6d7c76 100644 --- a/g4f/Provider/__init__.py +++ b/g4f/Provider/__init__.py @@ -11,6 +11,7 @@ from .not_working import * from .local import * +from .Airforce import Airforce from .AmigoChat import AmigoChat from .Blackbox import Blackbox from .ChatGpt import ChatGpt @@ -25,7 +26,6 @@ from .GizAI import GizAI from .HuggingChat import HuggingChat from .Liaobots import Liaobots -from .LLMPlayground import LLMPlayground from .MagickPen import MagickPen from .PerplexityLabs import PerplexityLabs from .Pi import Pi diff --git a/g4f/models.py b/g4f/models.py index 3324049fef5..4092858d0f3 100644 --- a/g4f/models.py +++ b/g4f/models.py @@ -21,7 +21,7 @@ HuggingChat, HuggingFace, Liaobots, - LLMPlayground, + Airforce, MagickPen, Mhystical, MetaAI, @@ -67,7 +67,7 @@ def __all__() -> list[str]: Blackbox, Free2GPT, DeepInfraChat, - LLMPlayground, + Airforce, ChatGptEs, Cloudflare, DarkAI, @@ -85,32 +85,32 @@ def __all__() -> list[str]: gpt_35_turbo = Model( name = 'gpt-3.5-turbo', base_provider = 'OpenAI', - best_provider = IterListProvider([LLMPlayground]) + best_provider = IterListProvider([Airforce]) ) # gpt-4 gpt_4o = Model( name = 'gpt-4o', base_provider = 'OpenAI', - best_provider = IterListProvider([Blackbox, ChatGptEs, DarkAI, ChatGpt, AmigoChat, LLMPlayground, Liaobots, OpenaiChat]) + best_provider = IterListProvider([Blackbox, ChatGptEs, DarkAI, ChatGpt, AmigoChat, Airforce, Liaobots, OpenaiChat]) ) gpt_4o_mini = Model( name = 'gpt-4o-mini', base_provider = 'OpenAI', - best_provider = IterListProvider([DDG, ChatGptEs, Pizzagpt, ChatGpt, AmigoChat, LLMPlayground, RubiksAI, MagickPen, Liaobots, OpenaiChat]) + best_provider = IterListProvider([DDG, ChatGptEs, Pizzagpt, ChatGpt, AmigoChat, Airforce, RubiksAI, MagickPen, Liaobots, OpenaiChat]) ) gpt_4_turbo = Model( name = 'gpt-4-turbo', base_provider = 'OpenAI', - best_provider = IterListProvider([Liaobots, LLMPlayground]) + best_provider = IterListProvider([Liaobots, Airforce]) ) gpt_4 = Model( name = 'gpt-4', base_provider = 'OpenAI', - best_provider = IterListProvider([DDG, Copilot, OpenaiChat, Liaobots, LLMPlayground]) + best_provider = IterListProvider([DDG, Copilot, OpenaiChat, Liaobots, Airforce]) ) # o1 @@ -144,7 +144,7 @@ def __all__() -> list[str]: llama_2_7b = Model( name = "llama-2-7b", base_provider = "Meta Llama", - best_provider = IterListProvider([Cloudflare, LLMPlayground]) + best_provider = IterListProvider([Cloudflare, Airforce]) ) # llama 3 llama_3_8b = Model( @@ -157,13 +157,13 @@ def __all__() -> list[str]: llama_3_1_8b = Model( name = "llama-3.1-8b", base_provider = "Meta Llama", - best_provider = IterListProvider([Blackbox, DeepInfraChat, Cloudflare, LLMPlayground, PerplexityLabs]) + best_provider = IterListProvider([Blackbox, DeepInfraChat, Cloudflare, Airforce, PerplexityLabs]) ) llama_3_1_70b = Model( name = "llama-3.1-70b", base_provider = "Meta Llama", - best_provider = IterListProvider([DDG, DeepInfraChat, Blackbox, TeachAnything, DarkAI, LLMPlayground, RubiksAI, HuggingChat, HuggingFace, PerplexityLabs]) + best_provider = IterListProvider([DDG, DeepInfraChat, Blackbox, TeachAnything, DarkAI, Airforce, RubiksAI, HuggingChat, HuggingFace, PerplexityLabs]) ) llama_3_1_405b = Model( @@ -227,13 +227,13 @@ def __all__() -> list[str]: hermes_2_dpo = Model( name = "hermes-2-dpo", base_provider = "NousResearch", - best_provider = LLMPlayground + best_provider = Airforce ) hermes_2_pro = Model( name = "hermes-2-pro", base_provider = "NousResearch", - best_provider = LLMPlayground + best_provider = Airforce ) hermes_3 = Model( @@ -245,14 +245,14 @@ def __all__() -> list[str]: mixtral_8x7b_dpo = Model( name = "mixtral-8x7b-dpo", base_provider = "NousResearch", - best_provider = IterListProvider([AmigoChat, LLMPlayground]) + best_provider = IterListProvider([AmigoChat, Airforce]) ) ### Microsoft ### phi_2 = Model( name = "phi-2", base_provider = "Microsoft", - best_provider = IterListProvider([LLMPlayground]) + best_provider = IterListProvider([Airforce]) ) phi_3_5_mini = Model( @@ -407,7 +407,7 @@ def __all__() -> list[str]: deepseek_coder = Model( name = 'deepseek-coder', base_provider = 'DeepSeek', - best_provider = LLMPlayground + best_provider = Airforce ) ### WizardLM ### @@ -428,7 +428,7 @@ def __all__() -> list[str]: openchat_3_5 = Model( name = 'openchat-3.5', base_provider = 'OpenChat', - best_provider = LLMPlayground + best_provider = Airforce ) @@ -477,14 +477,14 @@ def __all__() -> list[str]: openhermes_2_5 = Model( name = 'openhermes-2.5', base_provider = 'Teknium', - best_provider = LLMPlayground + best_provider = Airforce ) ### Liquid ### lfm_40b = Model( name = 'lfm-40b', base_provider = 'Liquid', - best_provider = IterListProvider([LLMPlayground, PerplexityLabs]) + best_provider = IterListProvider([Airforce, PerplexityLabs]) ) @@ -492,21 +492,21 @@ def __all__() -> list[str]: german_7b = Model( name = 'german-7b', base_provider = 'DiscoResearch', - best_provider = LLMPlayground + best_provider = Airforce ) ### HuggingFaceH4 ### zephyr_7b = Model( name = 'zephyr-7b', base_provider = 'HuggingFaceH4', - best_provider = LLMPlayground + best_provider = Airforce ) ### Inferless ### neural_7b = Model( name = 'neural-7b', base_provider = 'inferless', - best_provider = LLMPlayground + best_provider = Airforce ) ### Gryphe ### @@ -541,7 +541,7 @@ def __all__() -> list[str]: any_uncensored = Model( name = 'any-uncensored', base_provider = 'llmplayground.net', - best_provider = LLMPlayground + best_provider = Airforce ) ############# @@ -552,7 +552,7 @@ def __all__() -> list[str]: sdxl = Model( name = 'sdxl', base_provider = 'Stability AI', - best_provider = IterListProvider([ReplicateHome, LLMPlayground]) + best_provider = IterListProvider([ReplicateHome, Airforce]) ) @@ -576,13 +576,13 @@ def __all__() -> list[str]: flux = Model( name = 'flux', base_provider = 'Flux AI', - best_provider = IterListProvider([Blackbox, LLMPlayground]) + best_provider = IterListProvider([Blackbox, Airforce]) ) flux_pro = Model( name = 'flux-pro', base_provider = 'Flux AI', - best_provider = LLMPlayground + best_provider = Airforce ) flux_dev = Model( @@ -594,37 +594,37 @@ def __all__() -> list[str]: flux_realism = Model( name = 'flux-realism', base_provider = 'Flux AI', - best_provider = IterListProvider([LLMPlayground, AmigoChat]) + best_provider = IterListProvider([Airforce, AmigoChat]) ) flux_anime = Model( name = 'flux-anime', base_provider = 'Flux AI', - best_provider = LLMPlayground + best_provider = Airforce ) flux_3d = Model( name = 'flux-3d', base_provider = 'Flux AI', - best_provider = LLMPlayground + best_provider = Airforce ) flux_disney = Model( name = 'flux-disney', base_provider = 'Flux AI', - best_provider = LLMPlayground + best_provider = Airforce ) flux_pixel = Model( name = 'flux-pixel', base_provider = 'Flux AI', - best_provider = LLMPlayground + best_provider = Airforce ) flux_4o = Model( name = 'flux-4o', base_provider = 'Flux AI', - best_provider = LLMPlayground + best_provider = Airforce ) ### OpenAI ### @@ -645,7 +645,7 @@ def __all__() -> list[str]: any_dark = Model( name = 'any-dark', base_provider = 'Other', - best_provider = LLMPlayground + best_provider = Airforce ) class ModelUtils: