Spaces:
Runtime error
Runtime error
Fix configuration validation
Browse files- app/config.py +5 -2
app/config.py
CHANGED
|
@@ -1,13 +1,16 @@
|
|
| 1 |
from pydantic_settings import BaseSettings
|
|
|
|
| 2 |
|
| 3 |
class Settings(BaseSettings):
|
| 4 |
-
OPENAI_API_KEY: str
|
| 5 |
GOOGLE_GEMINI_API_KEY: str
|
| 6 |
-
|
|
|
|
|
|
|
| 7 |
DEBUG: bool = False
|
| 8 |
|
| 9 |
class Config:
|
| 10 |
env_file = ".env"
|
|
|
|
| 11 |
|
| 12 |
settings = Settings()
|
| 13 |
|
|
|
|
| 1 |
from pydantic_settings import BaseSettings
|
| 2 |
+
from typing import Optional
|
| 3 |
|
| 4 |
class Settings(BaseSettings):
|
|
|
|
| 5 |
GOOGLE_GEMINI_API_KEY: str
|
| 6 |
+
DB_URL: str
|
| 7 |
+
OPENAI_API_KEY: Optional[str] = None
|
| 8 |
+
COHERE_API_KEY: Optional[str] = None
|
| 9 |
DEBUG: bool = False
|
| 10 |
|
| 11 |
class Config:
|
| 12 |
env_file = ".env"
|
| 13 |
+
extra = "ignore" # Ignore extra env vars
|
| 14 |
|
| 15 |
settings = Settings()
|
| 16 |
|