File size: 1,311 Bytes
f72291c | 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 | 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
# Model recommendations for 16GB RAM
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() |