Backend:
- Fix TicketInput ticket_id type (int|str -> str) — Pydantic 500 on numeric IDs
- Fix LLM module: add missing logger import, handle 429 and non-200 responses
- Switch LLM model to poolside/laguna-m.1:free (avoid OpenRouter rate limits)
- Add GET /api/collections/{id} endpoint to fetch single collection
- Deduplicate tickets: replace randomized hash() with deterministic
hashlib.md5 for Qdrant point IDs
- Add get_existing_ticket_ids() — scroll Qdrant before processing,
skip already-imported tickets, avoid redundant embeddings
- Multi-tenant isolation: tenant_id + collection_id in all Qdrant filters
- Fix embedding: drop incompatible openai SDK, use raw httpx
- Fix reranking: access ScoredPoint.payload via .get(), not []
- Fix chunking: expand role detection (support/operator/agent + client/user/customer)
- Fix bcrypt: downgrade to 4.0.1 (incompatible 5.x with passlib)
Frontend:
- Register: add plan selection (free/starter/pro)
- CollectionView: fetch ticket_count from backend on mount
(not only from upload response — survived page refresh)
- uploadFile: use getToken() instead of stale module-level var,
show real HTTP status in error messages
- Nginx: increase client_max_body_size to 50M for file uploads
27 lines
804 B
Python
27 lines
804 B
Python
from pydantic_settings import BaseSettings
|
|
from pathlib import Path
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
app_name: str = "Support Bot SaaS"
|
|
debug: bool = False
|
|
|
|
database_url: str = "postgresql+asyncpg://postgres:postgres@localhost:5432/support_bot"
|
|
redis_url: str = "redis://localhost:6379/0"
|
|
qdrant_url: str = "http://localhost:6333"
|
|
|
|
openrouter_api_key: str = ""
|
|
openrouter_embedding_model: str = "nvidia/llama-nemotron-embed-vl-1b-v2:free"
|
|
openrouter_llm_model: str = "poolside/laguna-m.1:free"
|
|
|
|
jwt_secret: str = "change-me-in-production"
|
|
jwt_algorithm: str = "HS256"
|
|
jwt_expire_minutes: int = 1440
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
env_file_encoding = "utf-8"
|
|
|
|
|
|
settings = Settings()
|
|
BASE_DIR = Path(__file__).resolve().parent.parent.parent
|