summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/GeminiPro.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-02-26 23:41:06 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-02-26 23:41:06 +0100
commit862e5ef16de7e1d4c4dcbd7b270d8fddf9a0e31c (patch)
tree307a5e72dbdaf0a6167fc56f1148a2f393384534 /g4f/Provider/GeminiPro.py
parentFix filter messages in gui (diff)
downloadgpt4free-862e5ef16de7e1d4c4dcbd7b270d8fddf9a0e31c.tar
gpt4free-862e5ef16de7e1d4c4dcbd7b270d8fddf9a0e31c.tar.gz
gpt4free-862e5ef16de7e1d4c4dcbd7b270d8fddf9a0e31c.tar.bz2
gpt4free-862e5ef16de7e1d4c4dcbd7b270d8fddf9a0e31c.tar.lz
gpt4free-862e5ef16de7e1d4c4dcbd7b270d8fddf9a0e31c.tar.xz
gpt4free-862e5ef16de7e1d4c4dcbd7b270d8fddf9a0e31c.tar.zst
gpt4free-862e5ef16de7e1d4c4dcbd7b270d8fddf9a0e31c.zip
Diffstat (limited to 'g4f/Provider/GeminiPro.py')
-rw-r--r--g4f/Provider/GeminiPro.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/g4f/Provider/GeminiPro.py b/g4f/Provider/GeminiPro.py
index a2e3538d..1c5487b1 100644
--- a/g4f/Provider/GeminiPro.py
+++ b/g4f/Provider/GeminiPro.py
@@ -27,6 +27,7 @@ class GeminiPro(AsyncGeneratorProvider, ProviderModelMixin):
proxy: str = None,
api_key: str = None,
api_base: str = None,
+ use_auth_header: bool = True,
image: ImageType = None,
connector: BaseConnector = None,
**kwargs
@@ -38,7 +39,7 @@ class GeminiPro(AsyncGeneratorProvider, ProviderModelMixin):
raise MissingAuthError('Missing "api_key"')
headers = params = None
- if api_base:
+ if api_base and use_auth_header:
headers = {"Authorization": f"Bearer {api_key}"}
else:
params = {"key": api_key}