nxtgauge-ai-assistant/README.md

61 lines
1.4 KiB
Markdown
Raw Normal View History

# nxtgauge-ai-assistant
Backend-only Rust service for Nxtgauge AI workflows.
## Scope (MVP)
- Job description generation
- Form filling assistance
- Help article retrieval
- Support ticket creation via chatbot
## Stack
- Rust + Axum
- Ollama (default local runtime)
- Postgres scaffolding via `sqlx`
- Provider abstractions for future runtime swaps
## Run
```bash
cp .env.example .env
cargo run
```
## Endpoints
- `GET /health`
- `POST /api/v1/chat/message`
- `POST /api/v1/jobs/generate-description`
- `POST /api/v1/forms/extract`
- `POST /api/v1/tickets/create`
- `POST /api/v1/help/search`
## Environment
- `APP_HOST`
- `APP_PORT`
- `DATABASE_URL`
- `OLLAMA_BASE_URL`
- `OLLAMA_CHAT_MODEL` (default `smollm2:360m`)
- `OLLAMA_EMBED_MODEL` (default `nomic-embed-text`)
- `HELP_CENTER_SEED_PATH`
- `TICKETS_SOURCE`
## Architecture
- `chat/`: workflow-oriented orchestration
- `jobs/`, `forms/`, `tickets/`: domain modules
- `providers/llm`: `AiProvider` + Ollama implementation
- `providers/tickets`: `TicketProvider` + mock adapter
- `providers/help_center`: `HelpCenterProvider` + local seed implementation
- `retrieval/embeddings`: embedding abstraction + Ollama adapter
- `db/`: DB connection, entities, repository helpers
- `routes/`, `handlers/`: API layer
## Notes
- Service starts even if Ollama model is unavailable; provider returns graceful fallback responses.
- STT (`faster-whisper`) is intentionally deferred to phase 2.