Spaces:
Runtime error
Runtime error
Create setting.py
Browse files- setting.py +36 -0
setting.py
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# settings.py
|
2 |
+
import os
|
3 |
+
from pydantic_settings import BaseSettings, SettingsConfigDict
|
4 |
+
from pydantic import HttpUrl, SecretStr
|
5 |
+
|
6 |
+
|
7 |
+
class Settings(BaseSettings):
|
8 |
+
def __init__(self):
|
9 |
+
super().__init__()
|
10 |
+
# No Langfuse authentication setup needed here anymore
|
11 |
+
|
12 |
+
# Configure Pydantic Settings to load from .env file
|
13 |
+
model_config = SettingsConfigDict(env_file='.env')
|
14 |
+
|
15 |
+
# API Base URLs
|
16 |
+
scoring_api_base_url: HttpUrl = HttpUrl(
|
17 |
+
"https://agents-course-unit4-scoring.hf.space"
|
18 |
+
)
|
19 |
+
chess_eval_url: HttpUrl = HttpUrl(
|
20 |
+
"https://stockfish.online/api/s/v2.php"
|
21 |
+
)
|
22 |
+
|
23 |
+
# API Keys (SecretStr for security)
|
24 |
+
gemini_api_key: SecretStr
|
25 |
+
# langfuse_public_key: SecretStr # Removed
|
26 |
+
# langfuse_secret_key: SecretStr # Removed
|
27 |
+
|
28 |
+
# OpenTelemetry Collector Endpoint (for Langfuse) # Removed as it's Langfuse-specific
|
29 |
+
# otel_exporter_otlp_endpoint: HttpUrl = HttpUrl("https://cloud.langfuse.com/api/public/ingestion")
|
30 |
+
|
31 |
+
# Hugging Face Space details
|
32 |
+
space_id: str
|
33 |
+
username: str
|
34 |
+
|
35 |
+
# set_langfuse_auth method removed
|
36 |
+
|