File size: 1,329 Bytes
14aad8e | 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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | """
Application Settings - Environment Configuration
"""
from pydantic_settings import BaseSettings
from typing import List
from functools import lru_cache
class Settings(BaseSettings):
# Application
APP_NAME: str = "AmkyawDev Coder Backend"
ENVIRONMENT: str = "production"
DEBUG: bool = False
# CORS
CORS_ORIGINS: List[str] = ["*"]
# Groq API
GROQ_API_KEY: str = ""
GROQ_MODEL: str = "llama-3.1-8b-instant"
GROQ_BASE_URL: str = "https://api.groq.com/openai/v1"
# Hugging Face
HUGGINGFACE_API_KEY: str = ""
HF_INFERENCE_ENDPOINT: str = ""
# Firebase
FIREBASE_API_KEY: str = "AIzaSyCDNASzWo7Ok_h7EFkQvYrowIn6KyEntqU"
FIREBASE_PROJECT_ID: str = "coder-agent-54bb7"
FIREBASE_STORAGE_BUCKET: str = "coder-agent-54bb7.firebasestorage.app"
FIREBASE_DATABASE_URL: str = ""
# Deployment
VERCEL_TOKEN: str = ""
NETLIFY_TOKEN: str = ""
AWS_ACCESS_KEY_ID: str = ""
AWS_SECRET_ACCESS_KEY: str = ""
# Rate Limiting
RATE_LIMIT_PER_MINUTE: int = 60
# Memory
MEMORY_MAX_TOKENS: int = 4096
MEMORY_VECTOR_DIMENSION: int = 768
class Config:
env_file = ".env"
case_sensitive = True
@lru_cache()
def get_settings() -> Settings:
return Settings()
settings = get_settings()
|