File size: 805 Bytes
9bf9067
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import os
from typing import Optional
from pydantic import BaseModel
from dotenv import load_dotenv

load_dotenv()

class Config(BaseModel):
    # OpenRouter API configuration
    OPENROUTER_API_KEY: Optional[str] = os.getenv("OPENROUTER_API_KEY")
    OPENROUTER_BASE_URL: str = "https://openrouter.ai/api/v1"
    
    # Model configuration - using free models when possible
    EXTRACTION_MODEL: str = "qwen/qwen3-32b"  # Free model
    BACKUP_MODEL: str = "qwen/qwen3-32b"  # Backup free model
    
    # Processing configuration
    CHUNK_SIZE: int = 2000
    CHUNK_OVERLAP: int = 200
    MAX_FILE_SIZE_MB: int = 10
    
    # Graph configuration
    MAX_ENTITIES: int = 100
    MAX_RELATIONSHIPS: int = 200
    ENTITY_IMPORTANCE_THRESHOLD: float = 0.3
    
    class Config:
        env_file = ".env"