File size: 1,345 Bytes
0cac273
 
 
 
 
 
 
 
 
901a13f
0cac273
 
901a13f
0cac273
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import os
from dotenv import load_dotenv

load_dotenv()

BASE_URL = "https://www.blackbox.ai"
headers = {
    'accept': '*/*',
    'accept-language': 'zh-CN,zh;q=0.9',
    'content-type': 'application/json',
    'origin': 'https://www.blackbox.ai',
    '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/129.0.0.0 Safari/537.36',
}
APP_SECRET = os.getenv("APP_SECRET")
ALLOWED_MODELS = [
    {"id": "gpt-4o", "name": "gpt-4o"},
    {"id": "gemini-1.5-pro-latest", "name": "gemini-pro"},
    {"id": "gemini-1.5-pro", "name": "gemini-pro"},
    {"id": "gemini-pro", "name": "gemini-pro"},
    {"id": "claude-3-5-sonnet-20240620", "name": "claude-sonnet-3.5"},
    {"id": "claude-3-5-sonnet", "name": "claude-sonnet-3.5"},
]
MODEL_MAPPING = {
    "gpt-4o":"gpt-4o",
    "gemini-1.5-pro-latest": "gemini-pro",
    "gemini-1.5-pro":"gemini-1.5-pro",
    "gemini-pro":"gemini-pro",
    "claude-3-5-sonnet-20240620":"claude-sonnet-3.5",
    "claude-3-5-sonnet":"claude-sonnet-3.5",
}