From 8cc6000ffbf4e12bf6c1d5e5878d376e36857ec0 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Fri, 15 Mar 2024 11:46:06 +0100 Subject: Add Pyinstaller support, Use curl_cffi in You provider --- g4f/Provider/needs_auth/OpenaiChat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'g4f/Provider/needs_auth') diff --git a/g4f/Provider/needs_auth/OpenaiChat.py b/g4f/Provider/needs_auth/OpenaiChat.py index b501d655..6601f500 100644 --- a/g4f/Provider/needs_auth/OpenaiChat.py +++ b/g4f/Provider/needs_auth/OpenaiChat.py @@ -572,7 +572,7 @@ this.fetch = async (url, options) => { while headers is None: headers = window.evaluate_js("this._headers") await asyncio.sleep(1) - headers["User-Agent"] = window.evaluate_js("window.navigator.userAgent") + headers["User-Agent"] = window.evaluate_js("this.navigator.userAgent") cookies = [list(*cookie.items()) for cookie in window.get_cookies()] window.destroy() cls._cookies = dict([(name, cookie.value) for name, cookie in cookies]) -- cgit v1.2.3