-
Notifications
You must be signed in to change notification settings - Fork 664
Expand file tree
/
Copy pathconfig.py
More file actions
44 lines (34 loc) · 1.08 KB
/
config.py
File metadata and controls
44 lines (34 loc) · 1.08 KB
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
"""
Configuration module for DeepAnalyze API Server
Contains all configuration constants and environment setup
"""
import os
# Environment setup
os.environ.setdefault("MPLBACKEND", "Agg")
# API Configuration
API_BASE = "http://localhost:8000/v1" # vLLM API endpoint
MODEL_PATH = "DeepAnalyze-8B"
WORKSPACE_BASE_DIR = "workspace"
HTTP_SERVER_PORT = 8100
HTTP_SERVER_BASE = f"http://localhost:{HTTP_SERVER_PORT}"
# API Server Configuration
API_HOST = "0.0.0.0"
API_PORT = 8200
API_TITLE = "DeepAnalyze OpenAI-Compatible API"
API_VERSION = "1.0.0"
# Thread cleanup configuration
CLEANUP_TIMEOUT_HOURS = 12
CLEANUP_INTERVAL_MINUTES = 30
# Code execution configuration
CODE_EXECUTION_TIMEOUT = 120
MAX_NEW_TOKENS = 32768
# File handling configuration
FILE_STORAGE_DIR = os.path.join(WORKSPACE_BASE_DIR, "_files")
VALID_FILE_PURPOSES = ["fine-tune", "answers", "file-extract", "assistants"]
# Model configuration
DEFAULT_TEMPERATURE = 0.4
DEFAULT_MODEL = "DeepAnalyze-8B"
# Stop token IDs for DeepAnalyze model
STOP_TOKEN_IDS = [151676, 151645]
# Supported tools
SUPPORTED_TOOLS = ["code_interpreter"]