diff options
author | zukixa <56563509+zukixa@users.noreply.github.com> | 2024-08-29 08:03:32 +0200 |
---|---|---|
committer | zukixa <56563509+zukixa@users.noreply.github.com> | 2024-08-29 08:03:32 +0200 |
commit | bda2d679275ebd6bc2a3aa84f8fbc93967bead63 (patch) | |
tree | 8a36ace98ab138e1eff134a5ed8891fd3c817b5b /g4f/Provider/FreeGpt.py | |
parent | 8 providers improved (diff) | |
download | gpt4free-bda2d679275ebd6bc2a3aa84f8fbc93967bead63.tar gpt4free-bda2d679275ebd6bc2a3aa84f8fbc93967bead63.tar.gz gpt4free-bda2d679275ebd6bc2a3aa84f8fbc93967bead63.tar.bz2 gpt4free-bda2d679275ebd6bc2a3aa84f8fbc93967bead63.tar.lz gpt4free-bda2d679275ebd6bc2a3aa84f8fbc93967bead63.tar.xz gpt4free-bda2d679275ebd6bc2a3aa84f8fbc93967bead63.tar.zst gpt4free-bda2d679275ebd6bc2a3aa84f8fbc93967bead63.zip |
Diffstat (limited to 'g4f/Provider/FreeGpt.py')
-rw-r--r-- | g4f/Provider/FreeGpt.py | 18 |
1 files changed, 10 insertions, 8 deletions
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( |