File size: 4,665 Bytes
6aaa586
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c8a657a
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
135
136
137
import os
from dotenv import load_dotenv

load_dotenv()

# Base URL and Common Headers
BASE_URL = "https://www.blackbox.ai"
common_headers = {
    'accept': '*/*',
    'accept-language': 'en-US,en;q=0.9',
    'cache-control': 'no-cache',
    'origin': BASE_URL,
    'pragma': 'no-cache',
    'priority': 'u=1, i',
    'sec-ch-ua': '"Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"',
    'sec-ch-ua-mobile': '?0',
    'sec-ch-ua-platform': '"Windows"',
    'sec-fetch-dest': 'empty',
    'sec-fetch-mode': 'cors',
    'sec-fetch-site': 'same-origin',
    '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',
}

# Header Configurations for Specific API Calls
def get_headers_api_chat(referer_url):
    return {**common_headers, 'Content-Type': 'application/json', 'Referer': referer_url}

def get_headers_chat(chat_url, next_action, next_router_state_tree):
    return {
        **common_headers,
        'Accept': 'text/x-component',
        'Content-Type': 'text/plain;charset=UTF-8',
        'Referer': chat_url,
        'next-action': next_action,
        'next-router-state-tree': next_router_state_tree,
        'next-url': '/',
    }

APP_SECRET = os.getenv("APP_SECRET")

# ALLOWED_MODELS Configuration
ALLOWED_MODELS = [
    "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",
    # Added New Agents
    "FlaskAgent",
    "FirebaseAgent",
    "FastAPIAgent",
    "ErlangAgent",
    "ElectronAgent",
    "DockerAgent",
    "DigitalOceanAgent",
    "BitbucketAgent",
    "AzureAgent",
    "FlutterAgent",
    "YoutubeAgent",
    "builderAgent",
]

# AGENT_MODE Configuration
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"},
}

# TRENDING_AGENT_MODE Configuration
TRENDING_AGENT_MODE = {
    "blackboxai": {},
    "gemini-1.5-flash": {'mode': True, 'id': 'Gemini'},
    "llama-3.1-8b": {'mode': True, 'id': "llama-3.1-8b"},
    'llama-3.1-70b': {'mode': True, 'id': "llama-3.1-70b"},
    'llama-3.1-405b': {'mode': True, 'id': "llama-3.1-405"},
    'blackboxai-pro': {'mode': True, 'id': "BLACKBOXAI-PRO"},
    'PythonAgent': {'mode': True, 'id': "Python Agent"},
    'JavaAgent': {'mode': True, 'id': "Java Agent"},
    'JavaScriptAgent': {'mode': True, 'id': "JavaScript Agent"},
    'HTMLAgent': {'mode': True, 'id': "HTML Agent"},
    'GoogleCloudAgent': {'mode': True, 'id': "Google Cloud Agent"},
    'AndroidDeveloper': {'mode': True, 'id': "Android Developer"},
    'SwiftDeveloper': {'mode': True, 'id': "Swift Developer"},
    'Next.jsAgent': {'mode': True, 'id': "Next.js Agent"},
    'MongoDBAgent': {'mode': True, 'id': "MongoDB Agent"},
    'PyTorchAgent': {'mode': True, 'id': "PyTorch Agent"},
    'ReactAgent': {'mode': True, 'id': "React Agent"},
    'XcodeAgent': {'mode': True, 'id': "Xcode Agent"},
    'AngularJSAgent': {'mode': True, 'id': "AngularJS Agent"},
    'HerokuAgent': {'mode': True, 'id': "Heroku Agent"},
    'GodotAgent': {'mode': True, 'id': "Godot Agent"},
    'GoAgent': {'mode': True, 'id': "Go Agent"},
    'GitlabAgent': {'mode': True, 'id': "Gitlab Agent"},
    'GitAgent': {'mode': True, 'id': "Git Agent"},
    'RepoMap': {'mode': True, 'id': "repomap"},
    # Added New Agents
    'FlaskAgent': {'mode': True, 'id': "FlaskAgent"},
    'FirebaseAgent': {'mode': True, 'id': "FirebaseAgent"},
    'FastAPIAgent': {'mode': True, 'id': "FastAPIAgent"},
    'ErlangAgent': {'mode': True, 'id': "ErlangAgent"},
    'ElectronAgent': {'mode': True, 'id': "ElectronAgent"},
    'DockerAgent': {'mode': True, 'id': "DockerAgent"},
    'DigitalOceanAgent': {'mode': True, 'id': "DigitalOceanAgent"},
    'BitbucketAgent': {'mode': True, 'id': "BitbucketAgent"},
    'AzureAgent': {'mode': True, 'id': "AzureAgent"},
    'FlutterAgent': {'mode': True, 'id': "FlutterAgent"},
    'YoutubeAgent': {'mode': True, 'id': "YoutubeAgent"},
    'builderAgent': {'mode': True, 'id': "builderAgent"},
}