mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-11-10 19:11:01 +00:00
Updated g4f/Provider/Blackbox.py
This commit is contained in:
parent
a15578e229
commit
786a75b9f3
@ -2,6 +2,8 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
import json
|
import json
|
||||||
|
import random
|
||||||
|
import string
|
||||||
from aiohttp import ClientSession
|
from aiohttp import ClientSession
|
||||||
|
|
||||||
from ..typing import AsyncResult, Messages, ImageType
|
from ..typing import AsyncResult, Messages, ImageType
|
||||||
@ -80,16 +82,18 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin):
|
|||||||
"imageBase64": to_data_uri(image)
|
"imageBase64": to_data_uri(image)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
random_id = ''.join(random.choices(string.ascii_letters + string.digits, k=7))
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
"messages": messages,
|
"messages": messages,
|
||||||
"id": "MRtAuMi",
|
"id": random_id,
|
||||||
"previewToken": None,
|
"previewToken": None,
|
||||||
"userId": None,
|
"userId": None,
|
||||||
"codeModelMode": True,
|
"codeModelMode": True,
|
||||||
"agentMode": {},
|
"agentMode": {},
|
||||||
"trendingAgentMode": {},
|
"trendingAgentMode": {},
|
||||||
"isMicMode": False,
|
"isMicMode": False,
|
||||||
"maxTokens": 1024,
|
"maxTokens": None,
|
||||||
"isChromeExt": False,
|
"isChromeExt": False,
|
||||||
"githubToken": None,
|
"githubToken": None,
|
||||||
"clickedAnswer2": False,
|
"clickedAnswer2": False,
|
||||||
|
Loading…
Reference in New Issue
Block a user