From 6e064adb094bacd10bd8bbc8c18a405e1cf651cd Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Mon, 22 Apr 2024 18:08:04 +0200 Subject: Add gemini-1.5-pro-latest model --- g4f/Provider/GeminiPro.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'g4f/Provider') diff --git a/g4f/Provider/GeminiPro.py b/g4f/Provider/GeminiPro.py index 214b7383..56c211ef 100644 --- a/g4f/Provider/GeminiPro.py +++ b/g4f/Provider/GeminiPro.py @@ -11,12 +11,14 @@ from ..errors import MissingAuthError from .helper import get_connector class GeminiPro(AsyncGeneratorProvider, ProviderModelMixin): + label = "Gemini API" url = "https://ai.google.dev" working = True supports_message_history = True needs_auth = True - default_model = "gemini-pro" - models = ["gemini-pro", "gemini-pro-vision"] + default_model = "gemini-1.5-pro-latest" + default_vision_model = default_model + models = [default_model, "gemini-pro", "gemini-pro-vision"] @classmethod async def create_async_generator( @@ -32,11 +34,10 @@ class GeminiPro(AsyncGeneratorProvider, ProviderModelMixin): connector: BaseConnector = None, **kwargs ) -> AsyncResult: - model = "gemini-pro-vision" if not model and image is not None else model model = cls.get_model(model) if not api_key: - raise MissingAuthError('Missing "api_key"') + raise MissingAuthError('Add a "api_key"') headers = params = None if use_auth_header: -- cgit v1.2.3