Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

902 B
Raw Blame
"""Canonical SQLAlchemy declarative ``Base`` for the application schema.

This lives in a dependency-free leaf (it imports only SQLAlchemy) so that model
modules — including ones in *other* top-level packages, e.g.
``domain_classifier.models`` — can import ``Base`` without pulling in the
``database.models`` package. ``database.models`` eagerly imports every model to
register it on ``Base.metadata``; if a model reached ``Base`` *through* that
package it would create an import cycle (``domain_classifier.models`` ->
``database.models`` -> ``domain_classifier.models``). Importing from here avoids
that entirely.

``database.models.base`` re-exports this same object for backwards
compatibility, so ``from .base import Base`` inside the models package keeps
working and there is exactly one ``Base`` / one ``metadata``.
"""

from sqlalchemy.orm import declarative_base

Base = declarative_base()