-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.py
More file actions
33 lines (26 loc) · 962 Bytes
/
Copy pathsettings.py
File metadata and controls
33 lines (26 loc) · 962 Bytes
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
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
openai_api_key: str = ""
model: str = "gpt-4o-mini"
embedding_model: str = "text-embedding-3-small"
temperature: float = 0.0
request_timeout: int = 30
max_retries: int = 2
allowed_origins: str = "*"
app_host: str = "0.0.0.0"
app_port: int = 8000
database_url: str = "postgresql+psycopg://postgres:postgres@db:5432/app"
rag_collection: str = "documents"
redis_url: str = "redis://redis:6379/0"
cache_ttl_seconds: int = 300
# Rate limiting
enable_rate_limit: bool = True
rate_limit_per_minute: int = 60
# Observability
enable_metrics: bool = True
enable_tracing: bool = False
otel_service_name: str = "projeto_codex"
otel_exporter_otlp_endpoint: str = ""
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
def get_settings() -> Settings:
return Settings()