| import os |
| from pydantic_settings import BaseSettings |
| from typing import List |
|
|
|
|
| class Settings(BaseSettings): |
| app_name: str = "Ollama Model Manager" |
| secret_key: str = os.getenv("SECRET_KEY", "your-secret-key-change-in-production") |
| algorithm: str = "HS256" |
| access_token_expire_minutes: int = 30 |
| database_url: str = "sqlite:///./ollama_tool.db" |
| host: str = "0.0.0.0" |
| port: int = 7860 |
|
|
| |
| recommended_models: List[dict] = [ |
| {"name": "llama3.1:8b", "size": "4.7GB", "ram": "8GB", "description": "Best all-around model for 16GB"}, |
| {"name": "qwen2.5:7b", "size": "4.4GB", "ram": "8GB", "description": "Excellent multilingual support"}, |
| {"name": "mistral:7b", "size": "4.1GB", "ram": "8GB", "description": "Fast and capable"}, |
| {"name": "phi3:mini", "size": "2.3GB", "ram": "4GB", "description": "Lightweight, good for coding"}, |
| {"name": "gemma2:9b", "size": "5.4GB", "ram": "10GB", "description": "Google's strong model"}, |
| {"name": "qwen2.5:14b", "size": "8.2GB", "ram": "16GB", "description": "High quality, fits 16GB"}, |
| {"name": "llama3.1:70b-q4", "size": "39GB", "ram": "48GB", "description": "Too large for 16GB"}, |
| ] |
|
|
| class Config: |
| env_file = ".env" |
|
|
|
|
| settings = Settings() |