File size: 673 Bytes
5726faa
d44c135
5726faa
 
c296117
5726faa
 
 
5389086
 
2706e01
 
 
f61eeae
 
 
5389086
5726faa
4df57fe
5726faa
f61eeae
d44c135
 
 
 
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
from pydantic_settings import BaseSettings
from functools import lru_cache

class Settings(BaseSettings):
    app_name: str = "BreachOS"
    debug: bool = False
    max_turns: int = 10

    # LLM
    hf_token:             str = ""
    api_base_url:         str = "https://api.groq.com/openai/v1"
    model_name:           str = "llama-3.1-8b-instant"
    provider:             str = "groq"
    groq_api_key:         str = ""
    llm_timeout:          int = 30
    llm_max_retries:      int = 3

    class Config:
        env_prefix = "BREACHOS_"
        env_file_encoding = "utf-8"
        extra = "ignore"

@lru_cache
def get_settings() -> Settings:
    return Settings()