# Rony Chat Bot β€” HTTP Portfolio Bot > 🌐 **Language:** [English](./README.md) | [EspaΓ±ol](./README.es.md) > > πŸ€– **HTTP chatbot that presents your portfolio and answers questions about your projects.** **Rony Chat Bot** is a chatbot based on [`rony-llm-agent`](https://github.com/VictorVargas/rony-llm-agent) that integrates with an Astro/React site to answer questions about Victor Hugo Vargas and his projects, using **RAG over markdown files**. ## ✨ Features - 🌐 **HTTP server** with SSE (Server-Sent Events) streaming - 🧠 **RAG over markdown** β€” automatically indexes `.md` in `data/projects/` - 🎭 **Customizable persona** β€” responds as "Victor's assistant" - ⚑ **Self-hosted** with Ollama or llama.cpp (no cloud API key required) - πŸ”Œ **Integrable** with Astro/React via HTTP proxy - πŸ›‘οΈ **Rate limiting** and structured logging - πŸ“¦ **Portable** β€” adaptable to other contexts (clients, products, etc.) ## πŸš€ Quick start ```bash # 1. Install git clone https://github.com/VictorVargas/rony-chat-bot.git cd rony-chat-bot # 2. Resolve dependencies (creates go.sum with hashes) go mod tidy # 3. Configure provider (e.g., Ollama) # Make sure Ollama is running: ollama serve # Downloaded model: ollama pull qwen2.5:1.5b # 4. Load your projects in data/projects/ echo "# My Cool Project\nDescription..." > data/projects/my-project.md # 5. Build go build -o bin/chat-bot ./cmd/chat-bot # 6. Run ./bin/chat-bot serve # β†’ Serves on http://localhost:7331 ``` ## πŸ“ Structure ``` chat-bot/ β”œβ”€β”€ cmd/chat-bot/ # Entry point (CLI) β”œβ”€β”€ internal/ β”‚ β”œβ”€β”€ server/ # HTTP handlers + SSE β”‚ β”œβ”€β”€ portfolio/ # Data loader (markdown β†’ RAG) β”‚ β”œβ”€β”€ persona/ # Persona override β”‚ └── streaming/ # SSE helpers β”œβ”€β”€ data/projects/ # ← YOUR PROJECTS IN MARKDOWN β”‚ β”œβ”€β”€ rony-harness.md β”‚ β”œβ”€β”€ rony-llm-agent.md β”‚ └── ... β”œβ”€β”€ configs/ β”‚ └── portfolio-bot.yaml # Provider config β”œβ”€β”€ docs/ β”‚ └── architecture.md # ← Complete technical specification └── go.mod # require rony-llm-agent ``` ## 🎯 Use from Astro See [`docs/architecture.md`](./docs/architecture.md) Β§5 β€” recommended proxy pattern. ```typescript // portfolio/src/pages/api/chat.ts export const POST: APIRoute = async ({ request }) => { const body = await request.json(); const resp = await fetch('http://localhost:7331/api/chat', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body), }); return new Response(resp.body, { status: 200, headers: { 'Content-Type': 'text/event-stream', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive', }, }); }; ``` ## πŸ”„ Adapt to another client This bot is designed to be **atomic** and reusable. To adapt it (e.g., chatbot for a car dealership): 1. Fork/clone this repo 2. Replace `data/projects/` with `data/inventory/` (or another domain) 3. Update `configs/portfolio-bot.yaml` with the new persona 4. Deploy The `rony-llm-agent` library doesn't change. ## πŸ“š Documentation - [**Architecture doc**](./docs/architecture.md) β€” Complete technical specification - [Library: `rony-llm-agent`](https://github.com/VictorVargas/rony-llm-agent) β€” Reusable core - [Rony Harness](https://github.com/VictorVargas/rony-harness) β€” The other project using the same library ## πŸ“„ License MIT β€” see [`LICENSE`](./LICENSE). ## πŸ”— Workspace projects - [`rony-llm-agent`](https://github.com/VictorVargas/rony-llm-agent) β€” Core library - [`rony-harness`](https://github.com/VictorVargas/rony-harness) β€” AI agent harness (TUI) - [`portfolio`](https://github.com/VictorVargas/portfolio) β€” Astro + React site (integrates this bot)