Update api/config.py
Browse files- api/config.py +259 -259
api/config.py
CHANGED
|
@@ -1,259 +1,259 @@
|
|
| 1 |
-
import os
|
| 2 |
-
from dotenv import load_dotenv
|
| 3 |
-
|
| 4 |
-
load_dotenv()
|
| 5 |
-
|
| 6 |
-
# Base URL and Common Headers
|
| 7 |
-
BASE_URL = "https://www.blackbox.ai"
|
| 8 |
-
common_headers = {
|
| 9 |
-
'accept': '*/*',
|
| 10 |
-
'accept-language': 'en-US,en;q=0.9',
|
| 11 |
-
'cache-control': 'no-cache',
|
| 12 |
-
'origin': BASE_URL,
|
| 13 |
-
'pragma': 'no-cache',
|
| 14 |
-
'priority': 'u=1, i',
|
| 15 |
-
'sec-ch-ua': '"Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24"',
|
| 16 |
-
'sec-ch-ua-arch': '"x86"',
|
| 17 |
-
'sec-ch-ua-bitness': '"64"',
|
| 18 |
-
'sec-ch-ua-full-version': '"131.0.6778.69"',
|
| 19 |
-
'sec-ch-ua-full-version-list': '"Google Chrome";v="131.0.6778.69", "Chromium";v="131.0.6778.69", "Not_A Brand";v="24.0.0.0"',
|
| 20 |
-
'sec-ch-ua-mobile': '?0',
|
| 21 |
-
'sec-ch-ua-platform': '"Windows"',
|
| 22 |
-
'sec-ch-ua-platform-version': '"19.0.0"',
|
| 23 |
-
'sec-fetch-dest': 'empty',
|
| 24 |
-
'sec-fetch-mode': 'cors',
|
| 25 |
-
'sec-fetch-site': 'same-origin',
|
| 26 |
-
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36',
|
| 27 |
-
}
|
| 28 |
-
|
| 29 |
-
# Header Configurations for Specific API Calls
|
| 30 |
-
def get_headers_api_chat(referer_url):
|
| 31 |
-
return {**common_headers, 'Content-Type': 'application/json', 'Referer': referer_url}
|
| 32 |
-
|
| 33 |
-
def get_headers_chat(chat_url, next_action, next_router_state_tree):
|
| 34 |
-
return {
|
| 35 |
-
**common_headers,
|
| 36 |
-
'Accept': 'text/x-component',
|
| 37 |
-
'Content-Type': 'text/plain;charset=UTF-8',
|
| 38 |
-
'Referer': chat_url,
|
| 39 |
-
'next-action': next_action,
|
| 40 |
-
'next-router-state-tree': next_router_state_tree,
|
| 41 |
-
'next-url': '/',
|
| 42 |
-
}
|
| 43 |
-
|
| 44 |
-
APP_SECRET = os.getenv("APP_SECRET")
|
| 45 |
-
|
| 46 |
-
ALLOWED_MODELS = [
|
| 47 |
-
{"id": "blackboxai", "name": "blackboxai"},
|
| 48 |
-
{"id": "blackboxai-pro", "name": "blackboxai-pro"},
|
| 49 |
-
{"id": "flux", "name": "flux"},
|
| 50 |
-
{"id": "llama-3.1-8b", "name": "llama-3.1-8b"},
|
| 51 |
-
{"id": "llama-3.1-70b", "name": "llama-3.1-70b"},
|
| 52 |
-
{"id": "llama-3.1-405b", "name": "llama-3.1-405"},
|
| 53 |
-
{"id": "gpt-4o", "name": "gpt-4o"},
|
| 54 |
-
{"id": "gpt-4o-2024-05-13", "name": "gpt-4o"},
|
| 55 |
-
{"id": "gemini-pro", "name": "gemini-pro"},
|
| 56 |
-
{"id": "gemini-1.5-flash", "name": "gemini-1.5-flash"},
|
| 57 |
-
{"id": "claude-sonnet-3.5", "name": "claude-sonnet-3.5"},
|
| 58 |
-
{"id": "PythonAgent", "name": "python"},
|
| 59 |
-
{"id": "JavaAgent", "name": "java"},
|
| 60 |
-
{"id": "JavaScriptAgent", "name": "javascript"},
|
| 61 |
-
{"id": "HTMLAgent", "name": "html"},
|
| 62 |
-
{"id": "GoogleCloudAgent", "name": "googlecloud"},
|
| 63 |
-
{"id": "AndroidDeveloper", "name": "androiddeveloper"},
|
| 64 |
-
{"id": "SwiftDeveloper", "name": "swiftdeveloper"},
|
| 65 |
-
{"id": "Next.jsAgent", "name": "next.js"},
|
| 66 |
-
{"id": "MongoDBAgent", "name": "mongodb"},
|
| 67 |
-
{"id": "PyTorchAgent", "name": "pytorch"},
|
| 68 |
-
{"id": "ReactAgent", "name": "react"},
|
| 69 |
-
{"id": "XcodeAgent", "name": "xcode"},
|
| 70 |
-
{"id": "AngularJSAgent", "name": "angularjs"},
|
| 71 |
-
{"id": "HerokuAgent", "name": "heroku"},
|
| 72 |
-
{"id": "GodotAgent", "name": "godot"},
|
| 73 |
-
{"id": "GoAgent", "name": "go"},
|
| 74 |
-
{"id": "GitlabAgent", "name": "gitlab"},
|
| 75 |
-
{"id": "GitAgent", "name": "git"},
|
| 76 |
-
{"id": "RepoMap", "name": "repomap"},
|
| 77 |
-
{"id": "gemini-1.5-pro-latest", "name": "gemini-pro"},
|
| 78 |
-
{"id": "gemini-1.5-pro", "name": "gemini-1.5-pro"},
|
| 79 |
-
{"id": "claude-3-5-sonnet-20240620", "name": "claude-sonnet-3.5"},
|
| 80 |
-
{"id": "claude-3-5-sonnet", "name": "claude-sonnet-3.5"},
|
| 81 |
-
{"id": "Niansuh", "name": "niansuh"},
|
| 82 |
-
{"id": "o1-preview", "name": "o1-preview"},
|
| 83 |
-
{"id": "claude-3-5-sonnet-20241022", "name": "claude-3-5-sonnet-20241022"},
|
| 84 |
-
{"id": "claude-3-5-sonnet-x", "name": "claude-3-5-sonnet-x"},
|
| 85 |
-
{"id": "gpt-3.5-turbo", "name": "gpt-3.5-turbo"},
|
| 86 |
-
|
| 87 |
-
# Added New Agents
|
| 88 |
-
{"id": "FlaskAgent", "name": "flask"},
|
| 89 |
-
{"id": "FirebaseAgent", "name": "firebase"},
|
| 90 |
-
{"id": "FastAPIAgent", "name": "fastapi"},
|
| 91 |
-
{"id": "ErlangAgent", "name": "erlang"},
|
| 92 |
-
{"id": "ElectronAgent", "name": "electron"},
|
| 93 |
-
{"id": "DockerAgent", "name": "docker"},
|
| 94 |
-
{"id": "DigitalOceanAgent", "name": "digitalocean"},
|
| 95 |
-
{"id": "BitbucketAgent", "name": "bitbucket"},
|
| 96 |
-
{"id": "AzureAgent", "name": "azure"},
|
| 97 |
-
{"id": "FlutterAgent", "name": "flutter"},
|
| 98 |
-
{"id": "YoutubeAgent", "name": "youtube"},
|
| 99 |
-
{"id": "builderAgent", "name": "builder"},
|
| 100 |
-
]
|
| 101 |
-
|
| 102 |
-
MODEL_MAPPING = {
|
| 103 |
-
"blackboxai": "blackboxai",
|
| 104 |
-
"blackboxai-pro": "blackboxai-pro",
|
| 105 |
-
"flux": "flux",
|
| 106 |
-
"ImageGeneration": "flux",
|
| 107 |
-
"llama-3.1-8b": "llama-3.1-8b",
|
| 108 |
-
"llama-3.1-70b": "llama-3.1-70b",
|
| 109 |
-
"llama-3.1-405b": "llama-3.1-405",
|
| 110 |
-
"gpt-4o": "gpt-4o",
|
| 111 |
-
"gpt-4o-2024-05-13": "gpt-4o",
|
| 112 |
-
"gemini-pro": "gemini-pro",
|
| 113 |
-
"gemini-1.5-flash": "gemini-1.5-flash",
|
| 114 |
-
"claude-sonnet-3.5": "claude-sonnet-3.5",
|
| 115 |
-
"PythonAgent": "python",
|
| 116 |
-
"JavaAgent": "java",
|
| 117 |
-
"JavaScriptAgent": "javascript",
|
| 118 |
-
"HTMLAgent": "html",
|
| 119 |
-
"GoogleCloudAgent": "googlecloud",
|
| 120 |
-
"AndroidDeveloper": "androiddeveloper",
|
| 121 |
-
"SwiftDeveloper": "swiftdeveloper",
|
| 122 |
-
"Next.jsAgent": "next.js",
|
| 123 |
-
"MongoDBAgent": "mongodb",
|
| 124 |
-
"PyTorchAgent": "pytorch",
|
| 125 |
-
"ReactAgent": "react",
|
| 126 |
-
"XcodeAgent": "xcode",
|
| 127 |
-
"AngularJSAgent": "angularjs",
|
| 128 |
-
"HerokuAgent": "heroku",
|
| 129 |
-
"GodotAgent": "godot",
|
| 130 |
-
"GoAgent": "go",
|
| 131 |
-
"GitlabAgent": "gitlab",
|
| 132 |
-
"GitAgent": "git",
|
| 133 |
-
"RepoMap": "repomap",
|
| 134 |
-
# Additional mappings
|
| 135 |
-
"gemini-flash": "gemini-1.5-flash",
|
| 136 |
-
"claude-3.5-sonnet": "claude-sonnet-3.5",
|
| 137 |
-
"gemini-1.5-pro-latest": "gemini-pro",
|
| 138 |
-
"gemini-1.5-pro": "gemini-1.5-pro",
|
| 139 |
-
"claude-3-5-sonnet-20240620": "claude-sonnet-3.5",
|
| 140 |
-
"claude-3-5-sonnet": "claude-sonnet-3.5",
|
| 141 |
-
"Niansuh": "niansuh",
|
| 142 |
-
"o1-preview": "o1-preview",
|
| 143 |
-
"claude-3-5-sonnet-20241022": "claude-3-5-sonnet-20241022",
|
| 144 |
-
"claude-3-5-sonnet-x": "claude-3-5-sonnet-x",
|
| 145 |
-
"gpt-3.5-turbo": "gpt-3.5-turbo",
|
| 146 |
-
|
| 147 |
-
# Added New Agents
|
| 148 |
-
"FlaskAgent": "flask",
|
| 149 |
-
"FirebaseAgent": "firebase",
|
| 150 |
-
"FastAPIAgent": "fastapi",
|
| 151 |
-
"ErlangAgent": "erlang",
|
| 152 |
-
"ElectronAgent": "electron",
|
| 153 |
-
"DockerAgent": "docker",
|
| 154 |
-
"DigitalOceanAgent": "digitalocean",
|
| 155 |
-
"BitbucketAgent": "bitbucket",
|
| 156 |
-
"AzureAgent": "azure",
|
| 157 |
-
"FlutterAgent": "flutter",
|
| 158 |
-
"YoutubeAgent": "youtube",
|
| 159 |
-
"builderAgent": "builder",
|
| 160 |
-
}
|
| 161 |
-
|
| 162 |
-
# Agent modes
|
| 163 |
-
AGENT_MODE = {
|
| 164 |
-
'flux': {'mode': True, 'id': "ImageGenerationLV45LJp", 'name': "flux"},
|
| 165 |
-
'Niansuh': {'mode': True, 'id': "NiansuhAIk1HgESy", 'name': "niansuh"},
|
| 166 |
-
'o1-preview': {'mode': True, 'id': "o1Dst8La8", 'name': "o1-preview"},
|
| 167 |
-
'claude-3-5-sonnet-20241022': {'mode': True, 'id': "Claude-Sonnet-3.5zO2HZSF", 'name': "claude-3-5-sonnet-20241022"},
|
| 168 |
-
'claude-3-5-sonnet-x': {'mode': True, 'id': "Claude-Sonnet-3.52022JE0UdQ3", 'name': "claude-3-5-sonnet-x"},
|
| 169 |
-
'gpt-3.5-turbo': {'mode': True, 'id': "GPT-3.5-TurboYxtGz0H", 'name': "gpt-3.5-turbo"},
|
| 170 |
-
}
|
| 171 |
-
|
| 172 |
-
TRENDING_AGENT_MODE = {
|
| 173 |
-
"blackboxai": {},
|
| 174 |
-
"gemini-1.5-flash": {'mode': True, 'id': 'gemini'},
|
| 175 |
-
"llama-3.1-8b": {'mode': True, 'id': "llama-3.1-8b"},
|
| 176 |
-
'llama-3.1-70b': {'mode': True, 'id': "llama-3.1-70b"},
|
| 177 |
-
'llama-3.1-405b': {'mode': True, 'id': "llama-3.1-405"},
|
| 178 |
-
'blackboxai-pro': {'mode': True, 'id': "blackboxai-pro"},
|
| 179 |
-
'PythonAgent': {'mode': True, 'id': "python"},
|
| 180 |
-
'JavaAgent': {'mode': True, 'id': "java"},
|
| 181 |
-
'JavaScriptAgent': {'mode': True, 'id': "javascript"},
|
| 182 |
-
'HTMLAgent': {'mode': True, 'id': "html"},
|
| 183 |
-
'GoogleCloudAgent': {'mode': True, 'id': "googlecloud"},
|
| 184 |
-
'AndroidDeveloper': {'mode': True, 'id': "android"},
|
| 185 |
-
'SwiftDeveloper': {'mode': True, 'id': "swift"},
|
| 186 |
-
'Next.jsAgent': {'mode': True, 'id': "next.js"},
|
| 187 |
-
'MongoDBAgent': {'mode': True, 'id': "mongodb"},
|
| 188 |
-
'PyTorchAgent': {'mode': True, 'id': "pytorch"},
|
| 189 |
-
'ReactAgent': {'mode': True, 'id': "react"},
|
| 190 |
-
'XcodeAgent': {'mode': True, 'id': "xcode"},
|
| 191 |
-
'AngularJSAgent': {'mode': True, 'id': "angularjs"},
|
| 192 |
-
'HerokuAgent': {'mode': True, 'id': "heroku"},
|
| 193 |
-
'GodotAgent': {'mode': True, 'id': "godot"},
|
| 194 |
-
'GoAgent': {'mode': True, 'id': "go"},
|
| 195 |
-
'GitlabAgent': {'mode': True, 'id': "gitlab"},
|
| 196 |
-
'GitAgent': {'mode': True, 'id': "git"},
|
| 197 |
-
'RepoMap': {'mode': True, 'id': "repomap"},
|
| 198 |
-
'FlaskAgent': {'mode': True, 'id': "flask"},
|
| 199 |
-
'FirebaseAgent': {'mode': True, 'id': "firebase"},
|
| 200 |
-
'FastAPIAgent': {'mode': True, 'id': "fastapi"},
|
| 201 |
-
'ErlangAgent': {'mode': True, 'id': "erlang"},
|
| 202 |
-
'ElectronAgent': {'mode': True, 'id': "electron"},
|
| 203 |
-
'DockerAgent': {'mode': True, 'id': "docker"},
|
| 204 |
-
'DigitalOceanAgent': {'mode': True, 'id': "digitalocean"},
|
| 205 |
-
'BitbucketAgent': {'mode': True, 'id': "bitbucket"},
|
| 206 |
-
'AzureAgent': {'mode': True, 'id': "azure"},
|
| 207 |
-
'FlutterAgent': {'mode': True, 'id': "flutter"},
|
| 208 |
-
'YoutubeAgent': {'mode': True, 'id': "youtube"},
|
| 209 |
-
'builderAgent': {'mode': True, 'id': "builder"},
|
| 210 |
-
}
|
| 211 |
-
|
| 212 |
-
# Model prefixes
|
| 213 |
-
MODEL_PREFIXES = {
|
| 214 |
-
'gpt-4o': '@
|
| 215 |
-
'gemini-pro': '@
|
| 216 |
-
'claude-sonnet-3.5': '@
|
| 217 |
-
'PythonAgent': '@python',
|
| 218 |
-
'JavaAgent': '@java',
|
| 219 |
-
'JavaScriptAgent': '@javascript',
|
| 220 |
-
'HTMLAgent': '@html',
|
| 221 |
-
'GoogleCloudAgent': '@googlecloud',
|
| 222 |
-
'AndroidDeveloper': '@android',
|
| 223 |
-
'SwiftDeveloper': '@swift',
|
| 224 |
-
'Next.jsAgent': '@next.js',
|
| 225 |
-
'MongoDBAgent': '@mongodb',
|
| 226 |
-
'PyTorchAgent': '@pytorch',
|
| 227 |
-
'ReactAgent': '@react',
|
| 228 |
-
'XcodeAgent': '@xcode',
|
| 229 |
-
'AngularJSAgent': '@angularjs',
|
| 230 |
-
'HerokuAgent': '@heroku',
|
| 231 |
-
'GodotAgent': '@godot',
|
| 232 |
-
'GoAgent': '@go',
|
| 233 |
-
'GitlabAgent': '@gitlab',
|
| 234 |
-
'GitAgent': '@git',
|
| 235 |
-
'blackboxai-pro': '@blackboxai-pro',
|
| 236 |
-
'flux': '@Image Generation',
|
| 237 |
-
'FlaskAgent': '@flask',
|
| 238 |
-
'FirebaseAgent': '@firebase',
|
| 239 |
-
'FastAPIAgent': '@fastapi',
|
| 240 |
-
'ErlangAgent': '@erlang',
|
| 241 |
-
'ElectronAgent': '@electron',
|
| 242 |
-
'DockerAgent': '@docker',
|
| 243 |
-
'DigitalOceanAgent': '@digitalocean',
|
| 244 |
-
'BitbucketAgent': '@bitbucket',
|
| 245 |
-
'AzureAgent': '@azure',
|
| 246 |
-
'FlutterAgent': '@flutter',
|
| 247 |
-
'YoutubeAgent': '@youtube',
|
| 248 |
-
'builderAgent': '@builder',
|
| 249 |
-
}
|
| 250 |
-
|
| 251 |
-
# Model referers
|
| 252 |
-
MODEL_REFERERS = {
|
| 253 |
-
"blackboxai": "/?model=blackboxai",
|
| 254 |
-
"gpt-4o": "/?model=gpt-4o",
|
| 255 |
-
"gemini-pro": "/?model=gemini-pro",
|
| 256 |
-
"claude-sonnet-3.5": "/?model=claude-sonnet-3.5",
|
| 257 |
-
"blackboxai-pro": "/?model=blackboxai-pro",
|
| 258 |
-
}
|
| 259 |
-
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
from dotenv import load_dotenv
|
| 3 |
+
|
| 4 |
+
load_dotenv()
|
| 5 |
+
|
| 6 |
+
# Base URL and Common Headers
|
| 7 |
+
BASE_URL = "https://www.blackbox.ai"
|
| 8 |
+
common_headers = {
|
| 9 |
+
'accept': '*/*',
|
| 10 |
+
'accept-language': 'en-US,en;q=0.9',
|
| 11 |
+
'cache-control': 'no-cache',
|
| 12 |
+
'origin': BASE_URL,
|
| 13 |
+
'pragma': 'no-cache',
|
| 14 |
+
'priority': 'u=1, i',
|
| 15 |
+
'sec-ch-ua': '"Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24"',
|
| 16 |
+
'sec-ch-ua-arch': '"x86"',
|
| 17 |
+
'sec-ch-ua-bitness': '"64"',
|
| 18 |
+
'sec-ch-ua-full-version': '"131.0.6778.69"',
|
| 19 |
+
'sec-ch-ua-full-version-list': '"Google Chrome";v="131.0.6778.69", "Chromium";v="131.0.6778.69", "Not_A Brand";v="24.0.0.0"',
|
| 20 |
+
'sec-ch-ua-mobile': '?0',
|
| 21 |
+
'sec-ch-ua-platform': '"Windows"',
|
| 22 |
+
'sec-ch-ua-platform-version': '"19.0.0"',
|
| 23 |
+
'sec-fetch-dest': 'empty',
|
| 24 |
+
'sec-fetch-mode': 'cors',
|
| 25 |
+
'sec-fetch-site': 'same-origin',
|
| 26 |
+
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36',
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
# Header Configurations for Specific API Calls
|
| 30 |
+
def get_headers_api_chat(referer_url):
|
| 31 |
+
return {**common_headers, 'Content-Type': 'application/json', 'Referer': referer_url}
|
| 32 |
+
|
| 33 |
+
def get_headers_chat(chat_url, next_action, next_router_state_tree):
|
| 34 |
+
return {
|
| 35 |
+
**common_headers,
|
| 36 |
+
'Accept': 'text/x-component',
|
| 37 |
+
'Content-Type': 'text/plain;charset=UTF-8',
|
| 38 |
+
'Referer': chat_url,
|
| 39 |
+
'next-action': next_action,
|
| 40 |
+
'next-router-state-tree': next_router_state_tree,
|
| 41 |
+
'next-url': '/',
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
APP_SECRET = os.getenv("APP_SECRET")
|
| 45 |
+
|
| 46 |
+
ALLOWED_MODELS = [
|
| 47 |
+
{"id": "blackboxai", "name": "blackboxai"},
|
| 48 |
+
{"id": "blackboxai-pro", "name": "blackboxai-pro"},
|
| 49 |
+
{"id": "flux", "name": "flux"},
|
| 50 |
+
{"id": "llama-3.1-8b", "name": "llama-3.1-8b"},
|
| 51 |
+
{"id": "llama-3.1-70b", "name": "llama-3.1-70b"},
|
| 52 |
+
{"id": "llama-3.1-405b", "name": "llama-3.1-405"},
|
| 53 |
+
{"id": "gpt-4o", "name": "gpt-4o"},
|
| 54 |
+
{"id": "gpt-4o-2024-05-13", "name": "gpt-4o"},
|
| 55 |
+
{"id": "gemini-pro", "name": "gemini-pro"},
|
| 56 |
+
{"id": "gemini-1.5-flash", "name": "gemini-1.5-flash"},
|
| 57 |
+
{"id": "claude-sonnet-3.5", "name": "claude-sonnet-3.5"},
|
| 58 |
+
{"id": "PythonAgent", "name": "python"},
|
| 59 |
+
{"id": "JavaAgent", "name": "java"},
|
| 60 |
+
{"id": "JavaScriptAgent", "name": "javascript"},
|
| 61 |
+
{"id": "HTMLAgent", "name": "html"},
|
| 62 |
+
{"id": "GoogleCloudAgent", "name": "googlecloud"},
|
| 63 |
+
{"id": "AndroidDeveloper", "name": "androiddeveloper"},
|
| 64 |
+
{"id": "SwiftDeveloper", "name": "swiftdeveloper"},
|
| 65 |
+
{"id": "Next.jsAgent", "name": "next.js"},
|
| 66 |
+
{"id": "MongoDBAgent", "name": "mongodb"},
|
| 67 |
+
{"id": "PyTorchAgent", "name": "pytorch"},
|
| 68 |
+
{"id": "ReactAgent", "name": "react"},
|
| 69 |
+
{"id": "XcodeAgent", "name": "xcode"},
|
| 70 |
+
{"id": "AngularJSAgent", "name": "angularjs"},
|
| 71 |
+
{"id": "HerokuAgent", "name": "heroku"},
|
| 72 |
+
{"id": "GodotAgent", "name": "godot"},
|
| 73 |
+
{"id": "GoAgent", "name": "go"},
|
| 74 |
+
{"id": "GitlabAgent", "name": "gitlab"},
|
| 75 |
+
{"id": "GitAgent", "name": "git"},
|
| 76 |
+
{"id": "RepoMap", "name": "repomap"},
|
| 77 |
+
{"id": "gemini-1.5-pro-latest", "name": "gemini-pro"},
|
| 78 |
+
{"id": "gemini-1.5-pro", "name": "gemini-1.5-pro"},
|
| 79 |
+
{"id": "claude-3-5-sonnet-20240620", "name": "claude-sonnet-3.5"},
|
| 80 |
+
{"id": "claude-3-5-sonnet", "name": "claude-sonnet-3.5"},
|
| 81 |
+
{"id": "Niansuh", "name": "niansuh"},
|
| 82 |
+
{"id": "o1-preview", "name": "o1-preview"},
|
| 83 |
+
{"id": "claude-3-5-sonnet-20241022", "name": "claude-3-5-sonnet-20241022"},
|
| 84 |
+
{"id": "claude-3-5-sonnet-x", "name": "claude-3-5-sonnet-x"},
|
| 85 |
+
{"id": "gpt-3.5-turbo", "name": "gpt-3.5-turbo"},
|
| 86 |
+
|
| 87 |
+
# Added New Agents
|
| 88 |
+
{"id": "FlaskAgent", "name": "flask"},
|
| 89 |
+
{"id": "FirebaseAgent", "name": "firebase"},
|
| 90 |
+
{"id": "FastAPIAgent", "name": "fastapi"},
|
| 91 |
+
{"id": "ErlangAgent", "name": "erlang"},
|
| 92 |
+
{"id": "ElectronAgent", "name": "electron"},
|
| 93 |
+
{"id": "DockerAgent", "name": "docker"},
|
| 94 |
+
{"id": "DigitalOceanAgent", "name": "digitalocean"},
|
| 95 |
+
{"id": "BitbucketAgent", "name": "bitbucket"},
|
| 96 |
+
{"id": "AzureAgent", "name": "azure"},
|
| 97 |
+
{"id": "FlutterAgent", "name": "flutter"},
|
| 98 |
+
{"id": "YoutubeAgent", "name": "youtube"},
|
| 99 |
+
{"id": "builderAgent", "name": "builder"},
|
| 100 |
+
]
|
| 101 |
+
|
| 102 |
+
MODEL_MAPPING = {
|
| 103 |
+
"blackboxai": "blackboxai",
|
| 104 |
+
"blackboxai-pro": "blackboxai-pro",
|
| 105 |
+
"flux": "flux",
|
| 106 |
+
"ImageGeneration": "flux",
|
| 107 |
+
"llama-3.1-8b": "llama-3.1-8b",
|
| 108 |
+
"llama-3.1-70b": "llama-3.1-70b",
|
| 109 |
+
"llama-3.1-405b": "llama-3.1-405",
|
| 110 |
+
"gpt-4o": "gpt-4o",
|
| 111 |
+
"gpt-4o-2024-05-13": "gpt-4o",
|
| 112 |
+
"gemini-pro": "gemini-pro",
|
| 113 |
+
"gemini-1.5-flash": "gemini-1.5-flash",
|
| 114 |
+
"claude-sonnet-3.5": "claude-sonnet-3.5",
|
| 115 |
+
"PythonAgent": "python",
|
| 116 |
+
"JavaAgent": "java",
|
| 117 |
+
"JavaScriptAgent": "javascript",
|
| 118 |
+
"HTMLAgent": "html",
|
| 119 |
+
"GoogleCloudAgent": "googlecloud",
|
| 120 |
+
"AndroidDeveloper": "androiddeveloper",
|
| 121 |
+
"SwiftDeveloper": "swiftdeveloper",
|
| 122 |
+
"Next.jsAgent": "next.js",
|
| 123 |
+
"MongoDBAgent": "mongodb",
|
| 124 |
+
"PyTorchAgent": "pytorch",
|
| 125 |
+
"ReactAgent": "react",
|
| 126 |
+
"XcodeAgent": "xcode",
|
| 127 |
+
"AngularJSAgent": "angularjs",
|
| 128 |
+
"HerokuAgent": "heroku",
|
| 129 |
+
"GodotAgent": "godot",
|
| 130 |
+
"GoAgent": "go",
|
| 131 |
+
"GitlabAgent": "gitlab",
|
| 132 |
+
"GitAgent": "git",
|
| 133 |
+
"RepoMap": "repomap",
|
| 134 |
+
# Additional mappings
|
| 135 |
+
"gemini-flash": "gemini-1.5-flash",
|
| 136 |
+
"claude-3.5-sonnet": "claude-sonnet-3.5",
|
| 137 |
+
"gemini-1.5-pro-latest": "gemini-pro",
|
| 138 |
+
"gemini-1.5-pro": "gemini-1.5-pro",
|
| 139 |
+
"claude-3-5-sonnet-20240620": "claude-sonnet-3.5",
|
| 140 |
+
"claude-3-5-sonnet": "claude-sonnet-3.5",
|
| 141 |
+
"Niansuh": "niansuh",
|
| 142 |
+
"o1-preview": "o1-preview",
|
| 143 |
+
"claude-3-5-sonnet-20241022": "claude-3-5-sonnet-20241022",
|
| 144 |
+
"claude-3-5-sonnet-x": "claude-3-5-sonnet-x",
|
| 145 |
+
"gpt-3.5-turbo": "gpt-3.5-turbo",
|
| 146 |
+
|
| 147 |
+
# Added New Agents
|
| 148 |
+
"FlaskAgent": "flask",
|
| 149 |
+
"FirebaseAgent": "firebase",
|
| 150 |
+
"FastAPIAgent": "fastapi",
|
| 151 |
+
"ErlangAgent": "erlang",
|
| 152 |
+
"ElectronAgent": "electron",
|
| 153 |
+
"DockerAgent": "docker",
|
| 154 |
+
"DigitalOceanAgent": "digitalocean",
|
| 155 |
+
"BitbucketAgent": "bitbucket",
|
| 156 |
+
"AzureAgent": "azure",
|
| 157 |
+
"FlutterAgent": "flutter",
|
| 158 |
+
"YoutubeAgent": "youtube",
|
| 159 |
+
"builderAgent": "builder",
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
# Agent modes
|
| 163 |
+
AGENT_MODE = {
|
| 164 |
+
'flux': {'mode': True, 'id': "ImageGenerationLV45LJp", 'name': "flux"},
|
| 165 |
+
'Niansuh': {'mode': True, 'id': "NiansuhAIk1HgESy", 'name': "niansuh"},
|
| 166 |
+
'o1-preview': {'mode': True, 'id': "o1Dst8La8", 'name': "o1-preview"},
|
| 167 |
+
'claude-3-5-sonnet-20241022': {'mode': True, 'id': "Claude-Sonnet-3.5zO2HZSF", 'name': "claude-3-5-sonnet-20241022"},
|
| 168 |
+
'claude-3-5-sonnet-x': {'mode': True, 'id': "Claude-Sonnet-3.52022JE0UdQ3", 'name': "claude-3-5-sonnet-x"},
|
| 169 |
+
'gpt-3.5-turbo': {'mode': True, 'id': "GPT-3.5-TurboYxtGz0H", 'name': "gpt-3.5-turbo"},
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
TRENDING_AGENT_MODE = {
|
| 173 |
+
"blackboxai": {},
|
| 174 |
+
"gemini-1.5-flash": {'mode': True, 'id': 'gemini'},
|
| 175 |
+
"llama-3.1-8b": {'mode': True, 'id': "llama-3.1-8b"},
|
| 176 |
+
'llama-3.1-70b': {'mode': True, 'id': "llama-3.1-70b"},
|
| 177 |
+
'llama-3.1-405b': {'mode': True, 'id': "llama-3.1-405"},
|
| 178 |
+
'blackboxai-pro': {'mode': True, 'id': "blackboxai-pro"},
|
| 179 |
+
'PythonAgent': {'mode': True, 'id': "python"},
|
| 180 |
+
'JavaAgent': {'mode': True, 'id': "java"},
|
| 181 |
+
'JavaScriptAgent': {'mode': True, 'id': "javascript"},
|
| 182 |
+
'HTMLAgent': {'mode': True, 'id': "html"},
|
| 183 |
+
'GoogleCloudAgent': {'mode': True, 'id': "googlecloud"},
|
| 184 |
+
'AndroidDeveloper': {'mode': True, 'id': "android"},
|
| 185 |
+
'SwiftDeveloper': {'mode': True, 'id': "swift"},
|
| 186 |
+
'Next.jsAgent': {'mode': True, 'id': "next.js"},
|
| 187 |
+
'MongoDBAgent': {'mode': True, 'id': "mongodb"},
|
| 188 |
+
'PyTorchAgent': {'mode': True, 'id': "pytorch"},
|
| 189 |
+
'ReactAgent': {'mode': True, 'id': "react"},
|
| 190 |
+
'XcodeAgent': {'mode': True, 'id': "xcode"},
|
| 191 |
+
'AngularJSAgent': {'mode': True, 'id': "angularjs"},
|
| 192 |
+
'HerokuAgent': {'mode': True, 'id': "heroku"},
|
| 193 |
+
'GodotAgent': {'mode': True, 'id': "godot"},
|
| 194 |
+
'GoAgent': {'mode': True, 'id': "go"},
|
| 195 |
+
'GitlabAgent': {'mode': True, 'id': "gitlab"},
|
| 196 |
+
'GitAgent': {'mode': True, 'id': "git"},
|
| 197 |
+
'RepoMap': {'mode': True, 'id': "repomap"},
|
| 198 |
+
'FlaskAgent': {'mode': True, 'id': "flask"},
|
| 199 |
+
'FirebaseAgent': {'mode': True, 'id': "firebase"},
|
| 200 |
+
'FastAPIAgent': {'mode': True, 'id': "fastapi"},
|
| 201 |
+
'ErlangAgent': {'mode': True, 'id': "erlang"},
|
| 202 |
+
'ElectronAgent': {'mode': True, 'id': "electron"},
|
| 203 |
+
'DockerAgent': {'mode': True, 'id': "docker"},
|
| 204 |
+
'DigitalOceanAgent': {'mode': True, 'id': "digitalocean"},
|
| 205 |
+
'BitbucketAgent': {'mode': True, 'id': "bitbucket"},
|
| 206 |
+
'AzureAgent': {'mode': True, 'id': "azure"},
|
| 207 |
+
'FlutterAgent': {'mode': True, 'id': "flutter"},
|
| 208 |
+
'YoutubeAgent': {'mode': True, 'id': "youtube"},
|
| 209 |
+
'builderAgent': {'mode': True, 'id': "builder"},
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
# Model prefixes
|
| 213 |
+
MODEL_PREFIXES = {
|
| 214 |
+
'gpt-4o': '@GPT-4o ',
|
| 215 |
+
'gemini-pro': '@Gemini-PRO ',
|
| 216 |
+
'claude-sonnet-3.5': '@Claude-Sonnet-3.5 ',
|
| 217 |
+
'PythonAgent': '@python',
|
| 218 |
+
'JavaAgent': '@java',
|
| 219 |
+
'JavaScriptAgent': '@javascript',
|
| 220 |
+
'HTMLAgent': '@html',
|
| 221 |
+
'GoogleCloudAgent': '@googlecloud',
|
| 222 |
+
'AndroidDeveloper': '@android',
|
| 223 |
+
'SwiftDeveloper': '@swift',
|
| 224 |
+
'Next.jsAgent': '@next.js',
|
| 225 |
+
'MongoDBAgent': '@mongodb',
|
| 226 |
+
'PyTorchAgent': '@pytorch',
|
| 227 |
+
'ReactAgent': '@react',
|
| 228 |
+
'XcodeAgent': '@xcode',
|
| 229 |
+
'AngularJSAgent': '@angularjs',
|
| 230 |
+
'HerokuAgent': '@heroku',
|
| 231 |
+
'GodotAgent': '@godot',
|
| 232 |
+
'GoAgent': '@go',
|
| 233 |
+
'GitlabAgent': '@gitlab',
|
| 234 |
+
'GitAgent': '@git',
|
| 235 |
+
'blackboxai-pro': '@blackboxai-pro',
|
| 236 |
+
'flux': '@Image Generation',
|
| 237 |
+
'FlaskAgent': '@flask',
|
| 238 |
+
'FirebaseAgent': '@firebase',
|
| 239 |
+
'FastAPIAgent': '@fastapi',
|
| 240 |
+
'ErlangAgent': '@erlang',
|
| 241 |
+
'ElectronAgent': '@electron',
|
| 242 |
+
'DockerAgent': '@docker',
|
| 243 |
+
'DigitalOceanAgent': '@digitalocean',
|
| 244 |
+
'BitbucketAgent': '@bitbucket',
|
| 245 |
+
'AzureAgent': '@azure',
|
| 246 |
+
'FlutterAgent': '@flutter',
|
| 247 |
+
'YoutubeAgent': '@youtube',
|
| 248 |
+
'builderAgent': '@builder',
|
| 249 |
+
}
|
| 250 |
+
|
| 251 |
+
# Model referers
|
| 252 |
+
MODEL_REFERERS = {
|
| 253 |
+
"blackboxai": "/?model=blackboxai",
|
| 254 |
+
"gpt-4o": "/?model=gpt-4o",
|
| 255 |
+
"gemini-pro": "/?model=gemini-pro",
|
| 256 |
+
"claude-sonnet-3.5": "/?model=claude-sonnet-3.5",
|
| 257 |
+
"blackboxai-pro": "/?model=blackboxai-pro",
|
| 258 |
+
}
|
| 259 |
+
|