feat(ui): implement premium beige design system and ux refinements
This commit is contained in:
@@ -17,7 +17,7 @@ class Settings(BaseSettings):
|
||||
|
||||
database_url: str
|
||||
|
||||
llm_provider: Literal["anthropic", "openai", "google"] = "anthropic"
|
||||
llm_provider: Literal["anthropic", "openai", "azure_openai", "google"] = "anthropic"
|
||||
llm_model: str = "claude-sonnet-4-6"
|
||||
|
||||
session_ttl_minutes: int = 30
|
||||
@@ -34,6 +34,10 @@ class Settings(BaseSettings):
|
||||
|
||||
anthropic_api_key: str = ""
|
||||
openai_api_key: str = ""
|
||||
azure_openai_api_key: str = ""
|
||||
azure_openai_endpoint: str = ""
|
||||
azure_openai_api_version: str = "2024-12-01-preview"
|
||||
azure_openai_deployment: str = ""
|
||||
google_api_key: str = ""
|
||||
|
||||
@model_validator(mode="after")
|
||||
@@ -41,6 +45,7 @@ class Settings(BaseSettings):
|
||||
key_map = {
|
||||
"anthropic": self.anthropic_api_key,
|
||||
"openai": self.openai_api_key,
|
||||
"azure_openai": self.azure_openai_api_key,
|
||||
"google": self.google_api_key,
|
||||
}
|
||||
key = key_map.get(self.llm_provider, "")
|
||||
@@ -49,4 +54,13 @@ class Settings(BaseSettings):
|
||||
f"API key for provider '{self.llm_provider}' is required. "
|
||||
f"Set the corresponding environment variable."
|
||||
)
|
||||
if self.llm_provider == "azure_openai":
|
||||
if not self.azure_openai_endpoint:
|
||||
raise ValueError(
|
||||
"AZURE_OPENAI_ENDPOINT is required for azure_openai provider."
|
||||
)
|
||||
if not self.azure_openai_deployment:
|
||||
raise ValueError(
|
||||
"AZURE_OPENAI_DEPLOYMENT is required for azure_openai provider."
|
||||
)
|
||||
return self
|
||||
|
||||
Reference in New Issue
Block a user