diff options
author | kqlio67 <kqlio67@users.noreply.github.com> | 2024-10-15 14:19:43 +0200 |
---|---|---|
committer | kqlio67 <kqlio67@users.noreply.github.com> | 2024-10-15 14:19:43 +0200 |
commit | 0a73aca3e30584023864beb5a31f8f6402f12218 (patch) | |
tree | 8fe09c4ca0be37cea6a18c30b839ea2dd71f5893 | |
parent | docs/interference.md (diff) | |
download | gpt4free-0a73aca3e30584023864beb5a31f8f6402f12218.tar gpt4free-0a73aca3e30584023864beb5a31f8f6402f12218.tar.gz gpt4free-0a73aca3e30584023864beb5a31f8f6402f12218.tar.bz2 gpt4free-0a73aca3e30584023864beb5a31f8f6402f12218.tar.lz gpt4free-0a73aca3e30584023864beb5a31f8f6402f12218.tar.xz gpt4free-0a73aca3e30584023864beb5a31f8f6402f12218.tar.zst gpt4free-0a73aca3e30584023864beb5a31f8f6402f12218.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/Provider/Blackbox.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/g4f/Provider/Blackbox.py b/g4f/Provider/Blackbox.py index 250ffe48..a550c3b6 100644 --- a/g4f/Provider/Blackbox.py +++ b/g4f/Provider/Blackbox.py @@ -23,18 +23,13 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin): models = [ default_model, 'blackboxai-pro', - "llama-3.1-8b", 'llama-3.1-70b', 'llama-3.1-405b', - 'gpt-4o', - 'gemini-pro', 'gemini-1.5-flash', - 'claude-sonnet-3.5', - 'PythonAgent', 'JavaAgent', 'JavaScriptAgent', @@ -87,7 +82,6 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin): 'gpt-4o': '@GPT-4o', 'gemini-pro': '@Gemini-PRO', 'claude-sonnet-3.5': '@Claude-Sonnet-3.5', - 'PythonAgent': '@Python Agent', 'JavaAgent': '@Java Agent', 'JavaScriptAgent': '@JavaScript Agent', @@ -149,14 +143,15 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin): "content-type": "application/json", "origin": cls.url, "pragma": "no-cache", + "priority": "u=1, i", "referer": cls.model_referers.get(model, cls.url), - "sec-ch-ua": '"Not;A=Brand";v="24", "Chromium";v="128"', + "sec-ch-ua": '"Chromium";v="129", "Not=A?Brand";v="8"', "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": '"Linux"', "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", - "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" + "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36", } if model in cls.model_prefixes: @@ -221,7 +216,7 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin): else: full_response = "" search_results_json = "" - async for chunk in response.content.iter_any(): + async for chunk, _ in response.content.iter_chunks(): if chunk: decoded_chunk = chunk.decode() decoded_chunk = re.sub(r'\$@\$v=[^$]+\$@\$', '', decoded_chunk) |