Niansuh commited on
Commit
6aa04bb
·
verified ·
1 Parent(s): 3e0f1a7

Update api/config.py

Browse files
Files changed (1) hide show
  1. api/config.py +12 -12
api/config.py CHANGED
@@ -3,13 +3,10 @@ from dotenv import load_dotenv
3
 
4
  load_dotenv()
5
 
6
- # Base URL
7
  BASE_URL = "https://www.blackbox.ai"
8
 
9
- # APP_SECRET from environment variables
10
  APP_SECRET = os.getenv("APP_SECRET")
11
 
12
- # Allowed models
13
  ALLOWED_MODELS = [
14
  {"id": "blackboxai", "name": "blackboxai"},
15
  {"id": "blackboxai-pro", "name": "blackboxai-pro"},
@@ -63,7 +60,6 @@ ALLOWED_MODELS = [
63
  {"id": "builderAgent", "name": "builderAgent"},
64
  ]
65
 
66
- # Model mapping
67
  MODEL_MAPPING = {
68
  "blackboxai": "blackboxai",
69
  "blackboxai-pro": "blackboxai-pro",
@@ -130,7 +126,6 @@ AGENT_MODE = {
130
  'claude-3-5-sonnet-x': {'mode': True, 'id': "Claude-Sonnet-3.52022JE0UdQ3", 'name': "claude-3-5-sonnet-x"},
131
  }
132
 
133
- # Trending agent modes
134
  TRENDING_AGENT_MODE = {
135
  "blackboxai": {},
136
  "gemini-1.5-flash": {'mode': True, 'id': 'Gemini'},
@@ -192,8 +187,8 @@ MODEL_PREFIXES = {
192
  'HerokuAgent': '@Heroku Agent',
193
  'GodotAgent': '@Godot Agent',
194
  'GoAgent': '@Go Agent',
195
- 'GitlabAgent': '@Gitlab Agent',
196
- 'GitAgent': '@Gitlab Agent',
197
  'blackboxai-pro': '@BLACKBOXAI-PRO',
198
  'flux': '@Image Generation',
199
  # Added New Agents
@@ -211,10 +206,15 @@ MODEL_PREFIXES = {
211
  'builderAgent': '@builder Agent',
212
  }
213
 
214
- # Headers for HTTP requests
215
  headers = {
216
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) '
217
- 'AppleWebKit/537.36 (KHTML, like Gecko) '
218
- 'Chrome/130.0.0.0 Safari/537.36',
219
- 'Content-Type': 'application/json',
 
 
 
 
 
220
  }
 
3
 
4
  load_dotenv()
5
 
 
6
  BASE_URL = "https://www.blackbox.ai"
7
 
 
8
  APP_SECRET = os.getenv("APP_SECRET")
9
 
 
10
  ALLOWED_MODELS = [
11
  {"id": "blackboxai", "name": "blackboxai"},
12
  {"id": "blackboxai-pro", "name": "blackboxai-pro"},
 
60
  {"id": "builderAgent", "name": "builderAgent"},
61
  ]
62
 
 
63
  MODEL_MAPPING = {
64
  "blackboxai": "blackboxai",
65
  "blackboxai-pro": "blackboxai-pro",
 
126
  'claude-3-5-sonnet-x': {'mode': True, 'id': "Claude-Sonnet-3.52022JE0UdQ3", 'name': "claude-3-5-sonnet-x"},
127
  }
128
 
 
129
  TRENDING_AGENT_MODE = {
130
  "blackboxai": {},
131
  "gemini-1.5-flash": {'mode': True, 'id': 'Gemini'},
 
187
  'HerokuAgent': '@Heroku Agent',
188
  'GodotAgent': '@Godot Agent',
189
  'GoAgent': '@Go Agent',
190
+ 'GitlabAgent': '@Git Agent',
191
+ 'GitAgent': '@Git Agent',
192
  'blackboxai-pro': '@BLACKBOXAI-PRO',
193
  'flux': '@Image Generation',
194
  # Added New Agents
 
206
  'builderAgent': '@builder Agent',
207
  }
208
 
209
+ # Default headers
210
  headers = {
211
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
212
+ "AppleWebKit/537.36 (KHTML, like Gecko) "
213
+ "Chrome/130.0.0.0 Safari/537.36",
214
+ "Accept": "*/*",
215
+ "Accept-Language": "en-US,en;q=0.9",
216
+ "Cache-Control": "no-cache",
217
+ "Origin": BASE_URL,
218
+ "Pragma": "no-cache",
219
+ "Referer": BASE_URL,
220
  }