diff options
author | H Lohaus <hlohaus@users.noreply.github.com> | 2024-04-22 20:05:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-22 20:05:22 +0200 |
commit | 11c071523336d32b60d41c83433614f5c126bd96 (patch) | |
tree | 85994a09dedf7176f524720bed6dd596baa2293c /g4f/Provider/GeminiPro.py | |
parent | Update cookies.py (diff) | |
parent | Fix typo in model list (diff) | |
download | gpt4free-11c071523336d32b60d41c83433614f5c126bd96.tar gpt4free-11c071523336d32b60d41c83433614f5c126bd96.tar.gz gpt4free-11c071523336d32b60d41c83433614f5c126bd96.tar.bz2 gpt4free-11c071523336d32b60d41c83433614f5c126bd96.tar.lz gpt4free-11c071523336d32b60d41c83433614f5c126bd96.tar.xz gpt4free-11c071523336d32b60d41c83433614f5c126bd96.tar.zst gpt4free-11c071523336d32b60d41c83433614f5c126bd96.zip |
Diffstat (limited to 'g4f/Provider/GeminiPro.py')
-rw-r--r-- | g4f/Provider/GeminiPro.py | 9 |
1 files changed, 5 insertions, 4 deletions
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: |