From 786a75b9f3fc0a4a64415bcb97eb7c31d98b2f14 Mon Sep 17 00:00:00 2001 From: kqlio67 Date: Fri, 13 Sep 2024 00:00:44 +0300 Subject: Updated g4f/Provider/Blackbox.py --- g4f/Provider/Blackbox.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/g4f/Provider/Blackbox.py b/g4f/Provider/Blackbox.py index 014ffc55..d3d68ade 100644 --- a/g4f/Provider/Blackbox.py +++ b/g4f/Provider/Blackbox.py @@ -2,6 +2,8 @@ from __future__ import annotations import re import json +import random +import string from aiohttp import ClientSession from ..typing import AsyncResult, Messages, ImageType @@ -80,16 +82,18 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin): "imageBase64": to_data_uri(image) } + random_id = ''.join(random.choices(string.ascii_letters + string.digits, k=7)) + data = { "messages": messages, - "id": "MRtAuMi", + "id": random_id, "previewToken": None, "userId": None, "codeModelMode": True, "agentMode": {}, "trendingAgentMode": {}, "isMicMode": False, - "maxTokens": 1024, + "maxTokens": None, "isChromeExt": False, "githubToken": None, "clickedAnswer2": False, -- cgit v1.2.3