Update api/config.py
Browse files- api/config.py +7 -66
api/config.py
CHANGED
|
@@ -27,20 +27,8 @@ common_headers = {
|
|
| 27 |
def get_headers_api_chat(referer_url):
|
| 28 |
return {**common_headers, 'Content-Type': 'application/json', 'Referer': referer_url}
|
| 29 |
|
| 30 |
-
def get_headers_chat(chat_url, next_action, next_router_state_tree):
|
| 31 |
-
return {
|
| 32 |
-
**common_headers,
|
| 33 |
-
'Accept': 'text/x-component',
|
| 34 |
-
'Content-Type': 'text/plain;charset=UTF-8',
|
| 35 |
-
'Referer': chat_url,
|
| 36 |
-
'next-action': next_action,
|
| 37 |
-
'next-router-state-tree': next_router_state_tree,
|
| 38 |
-
'next-url': '/',
|
| 39 |
-
}
|
| 40 |
-
|
| 41 |
APP_SECRET = os.getenv("APP_SECRET")
|
| 42 |
|
| 43 |
-
# Allowed Models
|
| 44 |
ALLOWED_MODELS = [
|
| 45 |
{"id": "blackboxai", "name": "blackboxai"},
|
| 46 |
{"id": "blackboxai-pro", "name": "blackboxai-pro"},
|
|
@@ -52,67 +40,20 @@ ALLOWED_MODELS = [
|
|
| 52 |
{"id": "gemini-pro", "name": "gemini-pro"},
|
| 53 |
{"id": "gemini-1.5-flash", "name": "gemini-1.5-flash"},
|
| 54 |
{"id": "claude-sonnet-3.5", "name": "claude-sonnet-3.5"},
|
| 55 |
-
|
| 56 |
-
{"id": "JavaAgent", "name": "JavaAgent"},
|
| 57 |
-
{"id": "JavaScriptAgent", "name": "JavaScriptAgent"},
|
| 58 |
-
{"id": "HTMLAgent", "name": "HTMLAgent"},
|
| 59 |
-
{"id": "GoogleCloudAgent", "name": "GoogleCloudAgent"},
|
| 60 |
-
{"id": "AndroidDeveloper", "name": "AndroidDeveloper"},
|
| 61 |
-
{"id": "SwiftDeveloper", "name": "SwiftDeveloper"},
|
| 62 |
-
{"id": "Next.jsAgent", "name": "Next.jsAgent"},
|
| 63 |
-
{"id": "MongoDBAgent", "name": "MongoDBAgent"},
|
| 64 |
-
{"id": "PyTorchAgent", "name": "PyTorchAgent"},
|
| 65 |
-
{"id": "ReactAgent", "name": "ReactAgent"},
|
| 66 |
-
{"id": "XcodeAgent", "name": "XcodeAgent"},
|
| 67 |
-
{"id": "AngularJSAgent", "name": "AngularJSAgent"},
|
| 68 |
-
{"id": "HerokuAgent", "name": "HerokuAgent"},
|
| 69 |
-
{"id": "GodotAgent", "name": "GodotAgent"},
|
| 70 |
-
{"id": "GoAgent", "name": "GoAgent"},
|
| 71 |
-
{"id": "GitlabAgent", "name": "GitlabAgent"},
|
| 72 |
-
{"id": "GitAgent", "name": "GitAgent"},
|
| 73 |
-
{"id": "RepoMap", "name": "RepoMap"},
|
| 74 |
-
|
| 75 |
-
# Added New Agents
|
| 76 |
-
{"id": "FlaskAgent", "name": "FlaskAgent"},
|
| 77 |
-
{"id": "FirebaseAgent", "name": "FirebaseAgent"},
|
| 78 |
-
{"id": "FastAPIAgent", "name": "FastAPIAgent"},
|
| 79 |
-
{"id": "ErlangAgent", "name": "ErlangAgent"},
|
| 80 |
-
{"id": "ElectronAgent", "name": "ElectronAgent"},
|
| 81 |
-
{"id": "DockerAgent", "name": "DockerAgent"},
|
| 82 |
-
{"id": "DigitalOceanAgent", "name": "DigitalOceanAgent"},
|
| 83 |
-
{"id": "BitbucketAgent", "name": "BitbucketAgent"},
|
| 84 |
-
{"id": "AzureAgent", "name": "AzureAgent"},
|
| 85 |
-
{"id": "FlutterAgent", "name": "FlutterAgent"},
|
| 86 |
-
{"id": "YoutubeAgent", "name": "YoutubeAgent"},
|
| 87 |
-
{"id": "builderAgent", "name": "builderAgent"},
|
| 88 |
]
|
| 89 |
|
| 90 |
-
# Agent modes
|
| 91 |
AGENT_MODE = {
|
| 92 |
'flux': {'mode': True, 'id': "ImageGenerationLV45LJp", 'name': "flux"},
|
| 93 |
-
|
| 94 |
-
'o1-preview': {'mode': True, 'id': "o1Dst8La8", 'name': "o1-preview"},
|
| 95 |
}
|
| 96 |
|
| 97 |
TRENDING_AGENT_MODE = {
|
| 98 |
"blackboxai": {},
|
| 99 |
"gemini-1.5-flash": {'mode': True, 'id': 'Gemini'},
|
| 100 |
"llama-3.1-8b": {'mode': True, 'id': "llama-3.1-8b"},
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
'FlaskAgent': {'mode': True, 'id': "FlaskAgent"},
|
| 107 |
-
'FirebaseAgent': {'mode': True, 'id': "FirebaseAgent"},
|
| 108 |
-
'FastAPIAgent': {'mode': True, 'id': "FastAPIAgent"},
|
| 109 |
-
'ErlangAgent': {'mode': True, 'id': "ErlangAgent"},
|
| 110 |
-
'ElectronAgent': {'mode': True, 'id': "ElectronAgent"},
|
| 111 |
-
'DockerAgent': {'mode': True, 'id': "DockerAgent"},
|
| 112 |
-
'DigitalOceanAgent': {'mode': True, 'id': "DigitalOceanAgent"},
|
| 113 |
-
'BitbucketAgent': {'mode': True, 'id': "BitbucketAgent"},
|
| 114 |
-
'AzureAgent': {'mode': True, 'id': "AzureAgent"},
|
| 115 |
-
'FlutterAgent': {'mode': True, 'id': "FlutterAgent"},
|
| 116 |
-
'YoutubeAgent': {'mode': True, 'id': "YoutubeAgent"},
|
| 117 |
-
'builderAgent': {'mode': True, 'id': "builderAgent"},
|
| 118 |
-
}
|
|
|
|
| 27 |
def get_headers_api_chat(referer_url):
|
| 28 |
return {**common_headers, 'Content-Type': 'application/json', 'Referer': referer_url}
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
APP_SECRET = os.getenv("APP_SECRET")
|
| 31 |
|
|
|
|
| 32 |
ALLOWED_MODELS = [
|
| 33 |
{"id": "blackboxai", "name": "blackboxai"},
|
| 34 |
{"id": "blackboxai-pro", "name": "blackboxai-pro"},
|
|
|
|
| 40 |
{"id": "gemini-pro", "name": "gemini-pro"},
|
| 41 |
{"id": "gemini-1.5-flash", "name": "gemini-1.5-flash"},
|
| 42 |
{"id": "claude-sonnet-3.5", "name": "claude-sonnet-3.5"},
|
| 43 |
+
# Add any additional models here
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
]
|
| 45 |
|
|
|
|
| 46 |
AGENT_MODE = {
|
| 47 |
'flux': {'mode': True, 'id': "ImageGenerationLV45LJp", 'name': "flux"},
|
| 48 |
+
# Add other agent modes as needed
|
|
|
|
| 49 |
}
|
| 50 |
|
| 51 |
TRENDING_AGENT_MODE = {
|
| 52 |
"blackboxai": {},
|
| 53 |
"gemini-1.5-flash": {'mode': True, 'id': 'Gemini'},
|
| 54 |
"llama-3.1-8b": {'mode': True, 'id': "llama-3.1-8b"},
|
| 55 |
+
"llama-3.1-70b": {'mode': True, 'id': "llama-3.1-70b"},
|
| 56 |
+
"llama-3.1-405b": {'mode': True, 'id': "llama-3.1-405"},
|
| 57 |
+
"blackboxai-pro": {'mode': True, 'id': "BLACKBOXAI-PRO"},
|
| 58 |
+
# Add other trending agent modes as needed
|
| 59 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|