File size: 727 Bytes
da8d2e4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""
Configuration defaults for the Translator application.
This file contains the default values for environment variables.
These are only used if the actual environment variables are not set.
"""

# Default model configuration
DEFAULT_CONFIG = {
    "MAX_PARALLEL_MODELS": 4,
    "SESSION_TIMEOUT": 1800,
    "MODEL_INSTANCE_TIMEOUT": 1800,
    "ALLOW_GPU": True,   # Разрешить использование GPU если доступно
    "LOGLEVEL": "INFO",
    "MAX_TOKENS": 4096,
    "CHUNK_SIZE": 3000
}

# Convert boolean and integer values to strings for environment variables
ENV_DEFAULTS = {
    key: str(value).lower() if isinstance(value, bool) else str(value)
    for key, value in DEFAULT_CONFIG.items()
}