diff options
Diffstat (limited to 'g4f/Provider/GeminiProChat.py')
-rw-r--r-- | g4f/Provider/GeminiProChat.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/g4f/Provider/GeminiProChat.py b/g4f/Provider/GeminiProChat.py index b2bf0ff6..208ca773 100644 --- a/g4f/Provider/GeminiProChat.py +++ b/g4f/Provider/GeminiProChat.py @@ -9,13 +9,14 @@ from ..errors import RateLimitError from ..requests import raise_for_status from ..requests.aiohttp import get_connector from ..typing import AsyncResult, Messages -from .base_provider import AsyncGeneratorProvider +from .base_provider import AsyncGeneratorProvider, ProviderModelMixin -class GeminiProChat(AsyncGeneratorProvider): - url = "https://www.chatgemini.net/" +class GeminiProChat(AsyncGeneratorProvider, ProviderModelMixin): + url = "https://gemini-pro.chat/" working = True supports_message_history = True + default_model = 'gemini-pro' @classmethod async def create_async_generator( @@ -32,8 +33,8 @@ class GeminiProChat(AsyncGeneratorProvider): "Accept-Language": "en-US,en;q=0.5", "Accept-Encoding": "gzip, deflate, br", "Content-Type": "text/plain;charset=UTF-8", - "Referer": "https://gemini-chatbot-sigma.vercel.app/", - "Origin": "https://gemini-chatbot-sigma.vercel.app", + "Referer": f"{cls.url}/", + "Origin": cls.url, "Sec-Fetch-Dest": "empty", "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "same-origin", |