ALM_LLM / utils /config.py
AshenH's picture
Uploaded support files
0f166dc verified
raw
history blame
645 Bytes
import os
from dataclasses import dataclass
@dataclass
class AppConfig:
hf_model_repo: str
sql_backend: str # "bigquery" or "motherduck"
gcp_project: str | None = None
motherduck_db: str | None = None
motherduck_token: str | None = None
@classmethod
def from_env(cls):
return cls(
hf_model_repo=os.getenv("HF_MODEL_REPO", "your-username/your-private-tabular-model"),
sql_backend=os.getenv("SQL_BACKEND", "motherduck"),
gcp_project=os.getenv("GCP_PROJECT"),
motherduck_db=os.getenv("MOTHERDUCK_DB", "default"),
motherduck_token=os.getenv("MOTHERDUCK_TOKEN")
)