Commit graph

6 commits

Author SHA1 Message Date
Vadym Samoilenko
0e18359b63 Rename bot to The APAC OpsBot 2026-02-11 12:54:37 +00:00
michael
05a81d075a Change Redis host port to 6399 to avoid port conflict
Port 6380 was also in use. Using 6399 instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 17:03:55 -06:00
michael
7f1bc76123 Change Redis host port from 6379 to 6380 to avoid port conflict
Existing Redis instance was using port 6379, causing Docker container
startup failures. Changed host-exposed port to 6380 while keeping
internal container port at 6379.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 17:02:48 -06:00
michael
c66d498d04 configured app to run on custom port with apache reverse proxy, wrote deploy.sh script 2026-02-02 16:56:48 -06:00
SamoilenkoVadym
86da0b2330 Implement OpenAI Responses API service with RAG enforcement
Features:
- OpenAIService class for Responses API integration
- file_search tool integration with Vector Store
- Strict RAG-only enforcement via system instructions
- Citation validation to prevent hallucinations
- Warning logs for responses without proper citations
- Support for multi-turn conversations via previous_response_id
- Async streaming support for real-time responses
- Comprehensive error handling and logging

Test Coverage:
- Service initialization and configuration
- System instructions validation
- Citation detection (valid, missing, no-info responses)
- Search results formatting
- RAG usage validation with hallucination detection
- Response generation with mocked API calls
- Multi-turn conversation support
- Error handling
- Integration test stubs (skipped, require API key)

Key RAG Safety Features:
- Low temperature (0.3) for factual responses
- Citation keyword detection
- Automatic disclaimer for uncited responses
- Separate handling of valid "no info" responses
- Warning logs for potential hallucinations

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-27 14:26:43 +00:00
SamoilenkoVadym
a8151fbe66 Add comprehensive backend test suite and Phase 1 foundation
Backend Tests:
- Add pytest configuration with async support (conftest.py)
- Add model tests: User, Conversation, Message, TokenUsage, Session, UserMemory
- Add configuration tests: Settings validation and environment variables
- Add API tests: Health endpoint and future endpoint stubs
- Add database tests: Connection, transactions, query execution

Phase 1 Foundation:
- FastAPI application structure with main.py
- SQLAlchemy async models for all entities
- Alembic migrations setup
- Configuration management via Pydantic Settings
- Logging system (English only)
- Docker multi-stage builds for backend
- Docker Compose orchestration (PostgreSQL, Redis, backend)
- Frontend React + TypeScript structure
- Dark & Gold theme CSS implementation
- Environment configuration examples

All code and comments in English as per requirements.
Tests cover model relationships, cascade deletes, and constraints.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-27 14:24:59 +00:00