File size: 4,027 Bytes
6a247c1 6856679 6a247c1 6856679 6a247c1 6856679 532a10c 6856679 6a247c1 6856679 6a247c1 6856679 6a247c1 6aa04bb 6a247c1 3b0818d 6aa04bb 3b0818d 6aa04bb 6856679 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
import os
from dotenv import load_dotenv
load_dotenv()
BASE_URL = "https://www.blackbox.ai"
APP_SECRET = os.getenv("APP_SECRET")
# List of allowed models
ALLOWED_MODELS = [
{"id": model_id, "name": model_id}
for model_id in [
"blackboxai",
"blackboxai-pro",
"flux",
"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",
"HTMLAgent",
"GoogleCloudAgent",
"AndroidDeveloper",
"SwiftDeveloper",
"Next.jsAgent",
"MongoDBAgent",
"PyTorchAgent",
"ReactAgent",
"XcodeAgent",
"AngularJSAgent",
"HerokuAgent",
"GodotAgent",
"GoAgent",
"GitlabAgent",
"GitAgent",
"RepoMap",
"gemini-1.5-pro-latest",
"gemini-1.5-pro",
"claude-3-5-sonnet-20240620",
"claude-3-5-sonnet",
"Niansuh",
"o1-preview",
"claude-3-5-sonnet-20241022",
"claude-3-5-sonnet-x",
# Added New Agents
"FlaskAgent",
"FirebaseAgent",
"FastAPIAgent",
"ErlangAgent",
"ElectronAgent",
"DockerAgent",
"DigitalOceanAgent",
"BitbucketAgent",
"AzureAgent",
"FlutterAgent",
"YoutubeAgent",
"builderAgent",
]
]
# Model mapping (identity mapping unless you need to remap specific models)
MODEL_MAPPING = {model["id"]: model["id"] for model in ALLOWED_MODELS}
# Agent modes (ensure models are correctly configured)
AGENT_MODE = {
'flux': {'mode': True, 'id': "ImageGenerationLV45LJp", 'name': "flux"},
'Niansuh': {'mode': True, 'id': "NiansuhAIk1HgESy", 'name': "Niansuh"},
'o1-preview': {'mode': True, 'id': "o1Dst8La8", 'name': "o1-preview"},
'claude-3-5-sonnet-20241022': {'mode': True, 'id': "Claude-Sonnet-3.5zO2HZSF", 'name': "claude-3-5-sonnet-20241022"},
'claude-3-5-sonnet-x': {'mode': True, 'id': "Claude-Sonnet-3.52022JE0UdQ3", 'name': "claude-3-5-sonnet-x"},
# Add other models if necessary
}
TRENDING_AGENT_MODE = {
model["id"]: {'mode': True, 'id': model["name"]} for model in ALLOWED_MODELS if "Agent" in model["id"]
}
# Model prefixes
MODEL_PREFIXES = {
'gpt-4o': '@GPT-4o',
'gemini-pro': '@Gemini-PRO',
'PythonAgent': '@Python Agent',
'JavaAgent': '@Java Agent',
'JavaScriptAgent': '@JavaScript Agent',
'HTMLAgent': '@HTML Agent',
'GoogleCloudAgent': '@Google Cloud Agent',
'AndroidDeveloper': '@Android Developer',
'SwiftDeveloper': '@Swift Developer',
'Next.jsAgent': '@Next.js Agent',
'MongoDBAgent': '@MongoDB Agent',
'PyTorchAgent': '@PyTorch Agent',
'ReactAgent': '@React Agent',
'XcodeAgent': '@Xcode Agent',
'AngularJSAgent': '@AngularJS Agent',
'HerokuAgent': '@Heroku Agent',
'GodotAgent': '@Godot Agent',
'GoAgent': '@Go Agent',
'GitlabAgent': '@Git Agent',
'GitAgent': '@Git Agent',
'blackboxai-pro': '@BLACKBOXAI-PRO',
'flux': '@Image Generation',
# Added New Agents
'FlaskAgent': '@Flask Agent',
'FirebaseAgent': '@Firebase Agent',
'FastAPIAgent': '@FastAPI Agent',
'ErlangAgent': '@Erlang Agent',
'ElectronAgent': '@Electron Agent',
'DockerAgent': '@Docker Agent',
'DigitalOceanAgent': '@DigitalOcean Agent',
'BitbucketAgent': '@Bitbucket Agent',
'AzureAgent': '@Azure Agent',
'FlutterAgent': '@Flutter Agent',
'YoutubeAgent': '@Youtube Agent',
'builderAgent': '@builder Agent',
}
# Default headers
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
"AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/130.0.0.0 Safari/537.36",
"Accept": "*/*",
"Accept-Language": "en-US,en;q=0.9",
"Cache-Control": "no-cache",
"Origin": BASE_URL,
"Pragma": "no-cache",
"Referer": BASE_URL,
} |