summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/needs_auth/OpenaiAPI.py
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-11-20 02:42:15 +0100
committerGitHub <noreply@github.com>2024-11-20 02:42:15 +0100
commit419264f9665ed50ac0dcbf86327da8bf221ac3e8 (patch)
tree027ebe8efcb413b648101ac6fd4fe744803e8a8a /g4f/Provider/needs_auth/OpenaiAPI.py
parentMerge pull request #2387 from hlohaus/info (diff)
parentFix missing provider_handler in client (diff)
downloadgpt4free-419264f9665ed50ac0dcbf86327da8bf221ac3e8.tar
gpt4free-419264f9665ed50ac0dcbf86327da8bf221ac3e8.tar.gz
gpt4free-419264f9665ed50ac0dcbf86327da8bf221ac3e8.tar.bz2
gpt4free-419264f9665ed50ac0dcbf86327da8bf221ac3e8.tar.lz
gpt4free-419264f9665ed50ac0dcbf86327da8bf221ac3e8.tar.xz
gpt4free-419264f9665ed50ac0dcbf86327da8bf221ac3e8.tar.zst
gpt4free-419264f9665ed50ac0dcbf86327da8bf221ac3e8.zip
Diffstat (limited to 'g4f/Provider/needs_auth/OpenaiAPI.py')
-rw-r--r--g4f/Provider/needs_auth/OpenaiAPI.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/g4f/Provider/needs_auth/OpenaiAPI.py b/g4f/Provider/needs_auth/OpenaiAPI.py
index 116b5f6f..83268b6d 100644
--- a/g4f/Provider/needs_auth/OpenaiAPI.py
+++ b/g4f/Provider/needs_auth/OpenaiAPI.py
@@ -34,6 +34,7 @@ class OpenaiAPI(AsyncGeneratorProvider, ProviderModelMixin):
stop: Union[str, list[str]] = None,
stream: bool = False,
headers: dict = None,
+ impersonate: str = None,
extra_data: dict = {},
**kwargs
) -> AsyncResult:
@@ -55,7 +56,8 @@ class OpenaiAPI(AsyncGeneratorProvider, ProviderModelMixin):
async with StreamSession(
proxies={"all": proxy},
headers=cls.get_headers(stream, api_key, headers),
- timeout=timeout
+ timeout=timeout,
+ impersonate=impersonate,
) as session:
data = filter_none(
messages=messages,