File size: 2,053 Bytes
6aaa586
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4bab9d2
 
 
 
 
 
 
 
 
 
da3bce5
6aaa586
 
 
 
da3bce5
6aaa586
 
 
 
 
 
da3bce5
 
 
 
 
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
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}

APP_SECRET = os.getenv("APP_SECRET")

ALLOWED_MODELS = [
    {"id": "blackboxai", "name": "blackboxai"},
    {"id": "blackboxai-pro", "name": "blackboxai-pro"},
    {"id": "flux", "name": "flux"},
    {"id": "llama-3.1-8b", "name": "llama-3.1-8b"},
    {"id": "llama-3.1-70b", "name": "llama-3.1-70b"},
    {"id": "llama-3.1-405b", "name": "llama-3.1-405"},
    {"id": "gpt-4o", "name": "gpt-4o"},
    {"id": "gemini-pro", "name": "gemini-pro"},
    {"id": "gemini-1.5-flash", "name": "gemini-1.5-flash"},
    {"id": "claude-sonnet-3.5", "name": "claude-sonnet-3.5"},
    # Add any additional models here
]

AGENT_MODE = {
    'flux': {'mode': True, 'id': "ImageGenerationLV45LJp", 'name': "flux"},
    # Add other agent modes as needed
}

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"},
    # Add other trending agent modes as needed
}