Update api/config.py
Browse files- api/config.py +18 -3
api/config.py
CHANGED
@@ -4,6 +4,9 @@ from dotenv import load_dotenv
|
|
4 |
load_dotenv()
|
5 |
|
6 |
BASE_URL = "https://www.blackbox.ai"
|
|
|
|
|
|
|
7 |
headers = {
|
8 |
'accept': '*/*',
|
9 |
'accept-language': 'zh-CN,zh;q=0.9',
|
@@ -18,11 +21,24 @@ headers = {
|
|
18 |
'sec-fetch-site': 'same-origin',
|
19 |
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36',
|
20 |
}
|
21 |
-
APP_SECRET = os.getenv("APP_SECRET")
|
22 |
|
|
|
23 |
default_model = 'blackboxai'
|
24 |
-
image_models = ['Image Generation', 'repomap']
|
25 |
userSelectedModel = ['gpt-4o', 'gemini-pro', 'claude-sonnet-3.5', 'blackboxai-pro']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
# Agent and trending agent modes
|
28 |
agentMode = {
|
@@ -46,7 +62,6 @@ trendingAgentMode = {
|
|
46 |
'React Agent': {'mode': True, 'id': "React Agent"},
|
47 |
'Xcode Agent': {'mode': True, 'id': "Xcode Agent"},
|
48 |
'AngularJS Agent': {'mode': True, 'id': "AngularJS Agent"},
|
49 |
-
'blackboxai-pro': {'mode': True, 'id': "BLACKBOXAI-PRO"},
|
50 |
'repomap': {'mode': True, 'id': "repomap"},
|
51 |
'Heroku Agent': {'mode': True, 'id': "Heroku Agent"},
|
52 |
'Godot Agent': {'mode': True, 'id': "Godot Agent"},
|
|
|
4 |
load_dotenv()
|
5 |
|
6 |
BASE_URL = "https://www.blackbox.ai"
|
7 |
+
APP_SECRET = os.getenv("APP_SECRET")
|
8 |
+
|
9 |
+
# Headers for HTTP requests
|
10 |
headers = {
|
11 |
'accept': '*/*',
|
12 |
'accept-language': 'zh-CN,zh;q=0.9',
|
|
|
21 |
'sec-fetch-site': 'same-origin',
|
22 |
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36',
|
23 |
}
|
|
|
24 |
|
25 |
+
# Default model configuration
|
26 |
default_model = 'blackboxai'
|
|
|
27 |
userSelectedModel = ['gpt-4o', 'gemini-pro', 'claude-sonnet-3.5', 'blackboxai-pro']
|
28 |
+
image_models = ['Image Generation', 'repomap']
|
29 |
+
|
30 |
+
# Allowed models including all specified agent and trending models
|
31 |
+
ALLOWED_MODELS = [
|
32 |
+
{"id": "gpt-4o", "name": "gpt-4o"},
|
33 |
+
{"id": "gemini-1.5-pro-latest", "name": "gemini-pro"},
|
34 |
+
{"id": "gemini-1.5-pro", "name": "gemini-pro"},
|
35 |
+
{"id": "gemini-pro", "name": "gemini-pro"},
|
36 |
+
{"id": "claude-3-5-sonnet-20240620", "name": "claude-sonnet-3.5"},
|
37 |
+
{"id": "claude-3-5-sonnet", "name": "claude-sonnet-3.5"},
|
38 |
+
{"id": "blackboxai-pro", "name": "BLACKBOXAI-PRO"},
|
39 |
+
{"id": "repomap", "name": "repomap"},
|
40 |
+
# Add any additional agent models here
|
41 |
+
]
|
42 |
|
43 |
# Agent and trending agent modes
|
44 |
agentMode = {
|
|
|
62 |
'React Agent': {'mode': True, 'id': "React Agent"},
|
63 |
'Xcode Agent': {'mode': True, 'id': "Xcode Agent"},
|
64 |
'AngularJS Agent': {'mode': True, 'id': "AngularJS Agent"},
|
|
|
65 |
'repomap': {'mode': True, 'id': "repomap"},
|
66 |
'Heroku Agent': {'mode': True, 'id': "Heroku Agent"},
|
67 |
'Godot Agent': {'mode': True, 'id': "Godot Agent"},
|