File size: 1,101 Bytes
e275025
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""
Configuration settings for LLM corrector
"""

import os
from pathlib import Path
from dotenv import load_dotenv

# Load environment variables from .env file in project root
env_path = Path(__file__).parent.parent / ".env"
load_dotenv(dotenv_path=env_path)

# OpenRouter API Configuration
OPENROUTER_API_KEY = os.getenv("OPENROUTER_API_KEY", "")
OPENROUTER_MODEL = os.getenv("OPENROUTER_MODEL", "google/gemini-3-flash-preview")
OPENROUTER_TEMPERATURE = float(os.getenv("OPENROUTER_TEMPERATURE", "0.1"))
OPENROUTER_MAX_TOKENS = int(os.getenv("OPENROUTER_MAX_TOKENS", "4000"))

# Project Paths
PROJECT_ROOT = Path(__file__).parent.parent
MEDICAL_TERMS_FILE = PROJECT_ROOT / "medical_terms.txt"
RESULTS_DIR = PROJECT_ROOT / "results"

# Correction Settings
CORRECTION_ENABLED = os.getenv("CORRECTION_ENABLED", "true").lower() == "true"
SAVE_DIFF = os.getenv("SAVE_DIFF", "true").lower() == "true"
LOG_CORRECTIONS = os.getenv("LOG_CORRECTIONS", "true").lower() == "true"

# API Retry Settings
MAX_RETRIES = int(os.getenv("MAX_RETRIES", "3"))
RETRY_DELAY = int(os.getenv("RETRY_DELAY", "2"))  # seconds