preparations for demo html page

This commit is contained in:
2026-02-04 22:50:24 +03:00
parent bf3a3735cb
commit 9188b672c2
5 changed files with 436 additions and 3 deletions

View File

@@ -28,6 +28,7 @@ rag-solution/services/rag/langchain/
├── PLANNING.md # Development roadmap and phases
├── QWEN.md # Current file - project context
├── requirements.txt # Python dependencies
├── server.py # Web server with API endpoints for the RAG agent
├── vector_storage.py # Vector storage module with Qdrant and Ollama embeddings
└── venv/ # Virtual environment
```
@@ -85,7 +86,11 @@ The project is organized into 8 development phases as outlined in `PLANNING.md`:
- [x] Allow switching between "ollama" and "openai" strategies
### Phase 8: HTTP Endpoint
- [ ] Create web framework with POST endpoint `/api/test-query` for agent queries
- [x] Create web framework with POST endpoint `/api/test-query` for agent queries
- [x] Implement server using FastAPI and LangServe
- [x] Add request/response validation with Pydantic models
- [x] Include CORS middleware for cross-origin requests
- [x] Add health check endpoint
## Environment Configuration
@@ -195,6 +200,15 @@ The project is in early development phase. The virtual environment is set up and
- When strategy is "ollama" (default), uses existing `ChatOllama` implementation
- Updated CLI chat command to show which model strategy is being used
### Phase 8 Implementation Notes
- Created `server.py` with FastAPI and integrated with existing agent functionality
- Implemented `/api/test-query` POST endpoint that accepts JSON with "query" field
- Added request/response validation using Pydantic models
- Included CORS middleware to support cross-origin requests
- Added health check endpoint at root path
- Server runs on port 8000 by default
- Supports both Ollama and OpenAI strategies through existing configuration
### Issue Fix Notes
- Fixed DocumentRetrievalTool class to properly declare and initialize the retriever field
- Resolved Pydantic field declaration issue that caused "object has no field" error