Files
furyhawk 1c203b6bdb Refactor authentication and chat services to use Redis for token management and message storage
- Introduced `auth_token_repo` for handling auth token operations in Redis.
- Created `chat_repo` for managing chat sessions and messages in Redis.
- Implemented `ChatService` and `AuthService` to encapsulate business logic for chat and authentication.
- Updated routes to utilize new service and repository layers, removing direct database calls.
- Enhanced user management with `UserService` for CRUD operations and user authentication.
- Revised architecture documentation to reflect the new service-repository pattern.
2026-06-14 19:24:12 +08:00

49 lines
3.1 KiB
Bash

# ── Debugging ──────────────────────────────────────────────────────────────
# Set to true to enable debug logging and SQLAlchemy echo
DEBUG=false
# ── LLM (OpenAI-compatible) ────────────────────────────────────────────────
LLM_BASE_URL=http://host.docker.internal:11434/v1
LLM_MODEL=llama
# Leave empty for local servers like Ollama / llama.cpp
LLM_API_KEY=
# ── AI Agent ────────────────────────────────────────────────────────────────
# Model used by pydantic-ai for agent reasoning (e.g. gpt-4o, claude-sonnet-4)
AI_MODEL=gpt-4o
# ── Embeddings ─────────────────────────────────────────────────────────────
# If EMBEDDING_BASE_URL is empty, the LLM base URL is used instead
EMBEDDING_BASE_URL=http://host.docker.internal:11434/v1
EMBEDDING_API_KEY=
# ── Observability ──────────────────────────────────────────────────────────
# Set LOGFIRE_TOKEN to enable Logfire telemetry; omit to disable
LOGFIRE_TOKEN=
# ── PostgreSQL ─────────────────────────────────────────────────────────────
DATABASE_URL=postgresql+asyncpg://agent_alpha:agent_alpha@postgres:5432/agent_alpha
# ── Valkey / Redis (cache + chat persistence, also used for RAG status SSE) ─
VALKEY_URL=redis://valkey:6379/0
# ── Milvus (vector database for RAG) ───────────────────────────────────────
MILVUS_URI=http://localhost:19530
MILVUS_TOKEN=
# ── File / Media Storage ──────────────────────────────────────────────────
MEDIA_DIR=media
MAX_UPLOAD_SIZE_MB=50
# ── RAG Parser ─────────────────────────────────────────────────────────────
PDF_PARSER=pymupdf
# ── Cross-Encoder Reranker ─────────────────────────────────────────────────
CROSS_ENCODER_MODEL=cross-encoder/ms-marco-MiniLM-L6-v2
HF_TOKEN=
MODELS_CACHE_DIR=~/.cache/agent-alpha/models
# ── RAG Image Description ──────────────────────────────────────────────────
# Model to use for describing images in RAG documents (empty = disabled)
RAG_IMAGE_DESCRIPTION_MODEL=