diff options
author | Tekky <98614666+xtekky@users.noreply.github.com> | 2023-09-07 19:45:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-07 19:45:04 +0200 |
commit | 7ca1a59d95b52f94f674e8f981eab910b2f03518 (patch) | |
tree | ca506c3c152f3906a5b727a4cc6ebba1fd59d335 /g4f/Provider/base_provider.py | |
parent | ~ | Merge pull request #869 from ahobsonsayers/add-console-script (diff) | |
parent | Fix imports in Bing (diff) | |
download | gpt4free-7ca1a59d95b52f94f674e8f981eab910b2f03518.tar gpt4free-7ca1a59d95b52f94f674e8f981eab910b2f03518.tar.gz gpt4free-7ca1a59d95b52f94f674e8f981eab910b2f03518.tar.bz2 gpt4free-7ca1a59d95b52f94f674e8f981eab910b2f03518.tar.lz gpt4free-7ca1a59d95b52f94f674e8f981eab910b2f03518.tar.xz gpt4free-7ca1a59d95b52f94f674e8f981eab910b2f03518.tar.zst gpt4free-7ca1a59d95b52f94f674e8f981eab910b2f03518.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/Provider/base_provider.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/g4f/Provider/base_provider.py b/g4f/Provider/base_provider.py index e667819a..0f499c8c 100644 --- a/g4f/Provider/base_provider.py +++ b/g4f/Provider/base_provider.py @@ -42,10 +42,11 @@ _cookies = {} def get_cookies(cookie_domain: str) -> dict: if cookie_domain not in _cookies: _cookies[cookie_domain] = {} - - for cookie in browser_cookie3.load(cookie_domain): - _cookies[cookie_domain][cookie.name] = cookie.value - + try: + for cookie in browser_cookie3.load(cookie_domain): + _cookies[cookie_domain][cookie.name] = cookie.value + except: + pass return _cookies[cookie_domain] @@ -79,6 +80,8 @@ class AsyncProvider(BaseProvider): class AsyncGeneratorProvider(AsyncProvider): + supports_stream = True + @classmethod def create_completion( cls, |