File size: 893 Bytes
1bc6b1b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a8979bb
1bc6b1b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ed4afb1
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
import os

try:
    from dotenv import load_dotenv
    load_dotenv()
except ImportError:
    pass 

KAGGLE_USERNAME: str = os.environ.get("KAGGLE_USERNAME", "")
KAGGLE_KEY: str = os.environ.get("KAGGLE_KEY", "")

RESULTS_PER_SOURCE: int = 20

RETRIEVER_TIMEOUT_SECONDS: int = 15

EMBEDDING_MODEL: str = "sentence-transformers/all-MiniLM-L6-v2"

FAISS_TOP_K: int = 10

LLM_MODEL_ID: str = "Qwen/Qwen2.5-7B-Instruct"

LLM_MAX_NEW_TOKENS: int = 900

LLM_INPUT_COUNT: int = 5

DISPLAY_TOP_N: int = 5

LLM_MAX_RETRIES: int = 3
LLM_RETRY_BACKOFF_SECONDS: int = 5

def check_secrets() -> dict[str, bool]:
    """
    Returns a dict showing which optional secrets are configured.
    Used at startup to warn the user if a retrieval lane will be skipped.
    """
    return {
        "kaggle":  bool(KAGGLE_USERNAME and KAGGLE_KEY),
        "huggingface": True,   
        "datagov":     True,   
    }