From bda2d679275ebd6bc2a3aa84f8fbc93967bead63 Mon Sep 17 00:00:00 2001 From: zukixa <56563509+zukixa@users.noreply.github.com> Date: Wed, 28 Aug 2024 23:03:32 -0700 Subject: fix for 500 Internal Server Error #2199 [Request] Blackbox provider now support Gemini and LLaMa 3.1 models #2198 with some stuff from #2196 --- g4f/Provider/FreeGpt.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'g4f/Provider/FreeGpt.py') diff --git a/g4f/Provider/FreeGpt.py b/g4f/Provider/FreeGpt.py index 7fa3b5ab..82a3824b 100644 --- a/g4f/Provider/FreeGpt.py +++ b/g4f/Provider/FreeGpt.py @@ -6,23 +6,25 @@ import random from typing import AsyncGenerator, Optional, Dict, Any from ..typing import Messages from ..requests import StreamSession, raise_for_status -from .base_provider import AsyncGeneratorProvider +from .base_provider import AsyncGeneratorProvider, ProviderModelMixin from ..errors import RateLimitError # Constants DOMAINS = [ "https://s.aifree.site", - "https://v.aifree.site/" + "https://v.aifree.site/", + "https://al.aifree.site/", + "https://u4.aifree.site/" ] RATE_LIMIT_ERROR_MESSAGE = "当前地区当日额度已消耗完" -class FreeGpt(AsyncGeneratorProvider): - url: str = "https://freegptsnav.aifree.site" - working: bool = True - supports_message_history: bool = True - supports_system_message: bool = True - supports_gpt_35_turbo: bool = True +class FreeGpt(AsyncGeneratorProvider, ProviderModelMixin): + url = "https://freegptsnav.aifree.site" + working = True + supports_message_history = True + supports_system_message = True + default_model = 'llama-3.1-70b' @classmethod async def create_async_generator( -- cgit v1.2.3