AI implementation for openai and claude.
This commit is contained in:
33
backend/app/config.py
Normal file
33
backend/app/config.py
Normal file
@@ -0,0 +1,33 @@
|
||||
from typing import Optional
|
||||
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
# API Keys
|
||||
ANTHROPIC_API_KEY: Optional[str] = None
|
||||
OPENAI_API_KEY: Optional[str] = None
|
||||
|
||||
# Provider Settings
|
||||
DEFAULT_PROVIDER: str = "claude"
|
||||
CLAUDE_MODEL: str = "claude-3-5-sonnet-20241022"
|
||||
OPENAI_MODEL: str = "gpt-4-turbo-preview"
|
||||
|
||||
# API Settings
|
||||
MAX_TOKENS: int = 4000
|
||||
TEMPERATURE: float = 0.7
|
||||
TIMEOUT: int = 60
|
||||
|
||||
# CORS
|
||||
FRONTEND_URL: str = "http://localhost:3000"
|
||||
|
||||
# Rate Limiting
|
||||
RATE_LIMIT_REQUESTS: int = 10
|
||||
RATE_LIMIT_WINDOW: int = 60
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
case_sensitive = True
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user