Spaces:
Sleeping
Sleeping
Commit ·
f080be2
1
Parent(s): 5608193
feat: add NVIDIA API key support and additional env vars
Browse files- .env.example +10 -0
- backend/app/config.py +3 -0
.env.example
CHANGED
|
@@ -3,6 +3,7 @@ OPENAI_API_KEY=
|
|
| 3 |
ANTHROPIC_API_KEY=
|
| 4 |
GOOGLE_API_KEY=
|
| 5 |
GROQ_API_KEY=
|
|
|
|
| 6 |
|
| 7 |
# HuggingFace
|
| 8 |
HF_TOKEN=
|
|
@@ -10,3 +11,12 @@ HF_TOKEN=
|
|
| 10 |
# App Settings
|
| 11 |
DEBUG=false
|
| 12 |
LOG_LEVEL=INFO
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
ANTHROPIC_API_KEY=
|
| 4 |
GOOGLE_API_KEY=
|
| 5 |
GROQ_API_KEY=
|
| 6 |
+
NVIDIA_API_KEY=
|
| 7 |
|
| 8 |
# HuggingFace
|
| 9 |
HF_TOKEN=
|
|
|
|
| 11 |
# App Settings
|
| 12 |
DEBUG=false
|
| 13 |
LOG_LEVEL=INFO
|
| 14 |
+
HOST=0.0.0.0
|
| 15 |
+
PORT=8000
|
| 16 |
+
|
| 17 |
+
# CORS Settings
|
| 18 |
+
CORS_ORIGINS=["http://localhost:5173","http://localhost:3000"]
|
| 19 |
+
|
| 20 |
+
# Session & Memory
|
| 21 |
+
SESSION_TIMEOUT=3600
|
| 22 |
+
MEMORY_TTL=86400
|
backend/app/config.py
CHANGED
|
@@ -43,6 +43,7 @@ class Settings(BaseSettings):
|
|
| 43 |
anthropic_api_key: SecretStr | None = Field(default=None, description="Anthropic API key")
|
| 44 |
google_api_key: SecretStr | None = Field(default=None, description="Google AI API key")
|
| 45 |
groq_api_key: SecretStr | None = Field(default=None, description="Groq API key")
|
|
|
|
| 46 |
|
| 47 |
# Model Defaults
|
| 48 |
default_model: str = "gpt-4o-mini"
|
|
@@ -89,6 +90,8 @@ class Settings(BaseSettings):
|
|
| 89 |
providers.append("google")
|
| 90 |
if self.groq_api_key:
|
| 91 |
providers.append("groq")
|
|
|
|
|
|
|
| 92 |
return providers
|
| 93 |
|
| 94 |
|
|
|
|
| 43 |
anthropic_api_key: SecretStr | None = Field(default=None, description="Anthropic API key")
|
| 44 |
google_api_key: SecretStr | None = Field(default=None, description="Google AI API key")
|
| 45 |
groq_api_key: SecretStr | None = Field(default=None, description="Groq API key")
|
| 46 |
+
nvidia_api_key: SecretStr | None = Field(default=None, description="NVIDIA API key")
|
| 47 |
|
| 48 |
# Model Defaults
|
| 49 |
default_model: str = "gpt-4o-mini"
|
|
|
|
| 90 |
providers.append("google")
|
| 91 |
if self.groq_api_key:
|
| 92 |
providers.append("groq")
|
| 93 |
+
if self.nvidia_api_key:
|
| 94 |
+
providers.append("nvidia")
|
| 95 |
return providers
|
| 96 |
|
| 97 |
|