File size: 548 Bytes
e309431 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | from __future__ import annotations
import os
from dataclasses import dataclass
@dataclass(frozen=True)
class AppConfig:
model_name: str = "meta/llama-3.3-70b-instruct"
nvidia_env_key: str = "NVIDIA_API_KEY"
base_url: str = "https://integrate.api.nvidia.com/v1"
def load_environment() -> str | None:
api_key = os.getenv(AppConfig.nvidia_env_key)
print(f"NVIDIA API Key loaded: {'✓' if api_key else '✗'}")
if not api_key:
print(f"⚠️ {AppConfig.nvidia_env_key} not set in environment")
return api_key
|