Pablan, as it stands
Self-hosted knowledge management for SMEs: a split-screen Markdown editor whose sections an LLM refines while you write, and RAG question answering over the documents that result. FastAPI + Postgres/pgvector on the back, SvelteKit on the front, everything OpenAI-compatible and self-hostable. Squashed into a single commit; the development history stays local. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CA43ZJda8Rbp2hKXNy8f6b
This commit is contained in:
co-authored by
Claude Opus 5
parent
68d3a43191
commit
784b76baf7
@@ -0,0 +1,23 @@
|
||||
from sqlalchemy import String, Text
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.models.base import Base, TimestampMixin, UUIDPrimaryKeyMixin
|
||||
|
||||
|
||||
class PromptSetting(UUIDPrimaryKeyMixin, TimestampMixin, Base):
|
||||
"""An admin override for a shipped system prompt.
|
||||
|
||||
Every prompt has a CODE default (`app/prompts/defaults.py`); a row here
|
||||
exists only when an admin has changed one. `content` is the full replacement
|
||||
text. Applied without a restart via a module-level cache
|
||||
(`app/prompts/overrides.py`), refreshed on every write — like the LLM
|
||||
settings, and single-process by design (`--workers 1`). Resetting a prompt
|
||||
deletes its row, so the code default takes over again. Unlike LLM settings
|
||||
there is no `.env` layer: prompts have no environment representation, so the
|
||||
reset target is the code default rather than the environment.
|
||||
"""
|
||||
|
||||
__tablename__ = "prompt_settings"
|
||||
|
||||
key: Mapped[str] = mapped_column(String(64), unique=True)
|
||||
content: Mapped[str] = mapped_column(Text)
|
||||
Reference in New Issue
Block a user