Spaces:
Runtime error
Runtime error
Commit History
-
fix(hf): fix 204 response body error + faiss-cpu install for HF Spacesβ
EymenFix 1 β rag.py DELETE /index: HTTP 204 cannot have response body but FastAPI was adding one Changed to HTTP 200 with {status: ok} response body Fix 2 β Dockerfile: faiss-cpu fails silently (|| echo) so container starts even if faiss wheel not available β pipeline.py already handles this with keyword search fallbackbaad71c
-
feat(backend): add stock_analysis_service, .env.example, Next.js integration guideβ
Eymen- api/services/stock_analysis_service.py: full pipeline service - backend/.env.example: all env vars documented with descriptions - backend/NEXTJS_INTEGRATION.md: complete frontend integration patterns including SSE streaming, PDF upload polling, error handling, env varsba5854f -
feat: production FastAPI backend β modular microservice architectureβ
EymenStructure: backend/ βββ main.py # ASGI app, lifespan, middleware, exception handlers βββ api/ β βββ dependencies.py # DI providers + Annotated aliases β βββ routers/ β β βββ finance.py # GET /finance/info|history|signals β β βββ chat.py # POST /chat/stream (SSE) + /chat/complete β β βββ rag.py # POST /rag/upload (202) + GET /rag/jobs/{id} β βββ schemas/ β β βββ requests.py # Pydantic v2 request models w/ Field constraints β β βββ responses.py # Pydantic v2 response models (from_attributes=True) β βββ services/ β βββ finance_service.py # asyncio.to_thread wrappers for yfinance/ta β βββ rag_service.py # EmbedJob dataclass + background task runner βββ requirements.txt βββ Dockerfile # Multi-stage, non-root user, healthcheck Key architectural decisions: - Lifespan context manager:β¦bbb3578