File size: 1,267 Bytes
42a12ac
 
 
 
 
4d61d47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b297abf
42a12ac
 
 
4d61d47
 
 
 
42a12ac
 
4d61d47
 
 
 
 
b297abf
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
import os
from dotenv import load_dotenv

load_dotenv()

# Base URL and Common Headers
BASE_URL = "https://editee.com"
EDITEA_API_ENDPOINT = "https://editee.com/submit/chatgptfree"

# Editee API Headers
EDITEA_HEADERS = {
    "Accept": "application/json, text/plain, */*",
    "Accept-Language": "en-US,en;q=0.9",
    "Cache-Control": "no-cache",
    "Content-Type": "application/json",
    "Origin": BASE_URL,
    "Pragma": "no-cache",
    "Priority": "u=1, i",
    "Referer": f"{BASE_URL}/chat-gpt",
    "Sec-CH-UA": '"Chromium";v="129", "Not=A?Brand";v="8"',
    "Sec-CH-UA-Mobile": '?0',
    "Sec-CH-UA-Platform": '"Linux"',
    "Sec-Fetch-Dest": 'empty',
    "Sec-Fetch-Mode": 'cors',
    "Sec-Fetch-Site": 'same-origin',
    "User-Agent": 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36',
    "X-Requested-With": 'XMLHttpRequest',
}

APP_SECRET = os.getenv("APP_SECRET")

ALLOWED_MODELS = [
    {"id": "claude", "name": "Claude"},
    {"id": "gpt4", "name": "GPT-4"},
    {"id": "gemini", "name": "Gemini"},
    {"id": "mistrallarge", "name": "Mistral Large"},
]

MODEL_MAPPING = {
    "claude-3.5-sonnet": "claude",
    "gpt-4o": "gpt4",
    "gemini-pro": "gemini",
    "mistral-large": "mistrallarge",
}