diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-04-22 18:08:04 +0200 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-04-22 18:08:04 +0200 |
commit | 6e064adb094bacd10bd8bbc8c18a405e1cf651cd (patch) | |
tree | 19b3a3e9bdd7ce2afed8070dac7b5f0f2a7f7308 /g4f/Provider/GeminiPro.py | |
parent | Fix "domain" KeyError with Firefox .har (diff) | |
download | gpt4free-6e064adb094bacd10bd8bbc8c18a405e1cf651cd.tar gpt4free-6e064adb094bacd10bd8bbc8c18a405e1cf651cd.tar.gz gpt4free-6e064adb094bacd10bd8bbc8c18a405e1cf651cd.tar.bz2 gpt4free-6e064adb094bacd10bd8bbc8c18a405e1cf651cd.tar.lz gpt4free-6e064adb094bacd10bd8bbc8c18a405e1cf651cd.tar.xz gpt4free-6e064adb094bacd10bd8bbc8c18a405e1cf651cd.tar.zst gpt4free-6e064adb094bacd10bd8bbc8c18a405e1cf651cd.zip |
Diffstat (limited to '')
-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: |