From a8ab2ad771152e9f53fcb730caac84e5430523ff Mon Sep 17 00:00:00 2001 From: kqlio67 <166700875+kqlio67@users.noreply.github.com> Date: Mon, 8 Jul 2024 20:49:38 +0000 Subject: Add files via upload --- g4f/Provider/GeminiProChat.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'g4f/Provider/GeminiProChat.py') diff --git a/g4f/Provider/GeminiProChat.py b/g4f/Provider/GeminiProChat.py index d88c4ed0..c61e2ff3 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): +class GeminiProChat(AsyncGeneratorProvider, ProviderModelMixin): url = "https://www.chatgot.one/" working = True supports_message_history = True + default_model = '' @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", -- cgit v1.2.3