Update api/config.py
Browse files- api/config.py +2 -17
api/config.py
CHANGED
@@ -18,6 +18,7 @@ common_headers = {
|
|
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',
|
@@ -26,20 +27,6 @@ common_headers = {
|
|
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():
|
31 |
-
return {**common_headers, 'Content-Type': 'application/json'}
|
32 |
-
|
33 |
-
def get_headers_chat(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 |
-
'next-action': next_action,
|
39 |
-
'next-router-state-tree': next_router_state_tree,
|
40 |
-
'next-url': '/',
|
41 |
-
}
|
42 |
-
|
43 |
APP_SECRET = os.getenv("APP_SECRET")
|
44 |
|
45 |
ALLOWED_MODELS = [
|
@@ -130,7 +117,6 @@ MODEL_MAPPING = {
|
|
130 |
# Additional mappings
|
131 |
"gemini-flash": "gemini-1.5-flash",
|
132 |
"claude-3.5-sonnet": "claude-sonnet-3.5",
|
133 |
-
"flux": "flux",
|
134 |
"gemini-1.5-pro-latest": "gemini-pro",
|
135 |
"gemini-1.5-pro": "gemini-1.5-pro",
|
136 |
"claude-3-5-sonnet-20240620": "claude-sonnet-3.5",
|
@@ -228,10 +214,9 @@ MODEL_PREFIXES = {
|
|
228 |
'GodotAgent': '@Godot Agent',
|
229 |
'GoAgent': '@Go Agent',
|
230 |
'GitlabAgent': '@Gitlab Agent',
|
231 |
-
'GitAgent': '@
|
232 |
'blackboxai-pro': '@BLACKBOXAI-PRO',
|
233 |
'flux': '@Image Generation',
|
234 |
-
# Add any additional prefixes if necessary
|
235 |
|
236 |
# Added New Agents
|
237 |
'FlaskAgent': '@Flask Agent',
|
|
|
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-model:': '',
|
22 |
'sec-ch-ua-platform': '"Windows"',
|
23 |
'sec-ch-ua-platform-version': '"19.0.0"',
|
24 |
'sec-fetch-dest': 'empty',
|
|
|
27 |
'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',
|
28 |
}
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
APP_SECRET = os.getenv("APP_SECRET")
|
31 |
|
32 |
ALLOWED_MODELS = [
|
|
|
117 |
# Additional mappings
|
118 |
"gemini-flash": "gemini-1.5-flash",
|
119 |
"claude-3.5-sonnet": "claude-sonnet-3.5",
|
|
|
120 |
"gemini-1.5-pro-latest": "gemini-pro",
|
121 |
"gemini-1.5-pro": "gemini-1.5-pro",
|
122 |
"claude-3-5-sonnet-20240620": "claude-sonnet-3.5",
|
|
|
214 |
'GodotAgent': '@Godot Agent',
|
215 |
'GoAgent': '@Go Agent',
|
216 |
'GitlabAgent': '@Gitlab Agent',
|
217 |
+
'GitAgent': '@Git Agent',
|
218 |
'blackboxai-pro': '@BLACKBOXAI-PRO',
|
219 |
'flux': '@Image Generation',
|
|
|
220 |
|
221 |
# Added New Agents
|
222 |
'FlaskAgent': '@Flask Agent',
|