2026-06-30 20:27:00 +00:00
# Rony Chat Bot — HTTP Portfolio Bot
2026-06-28 23:13:21 +00:00
2026-06-30 20:27:00 +00:00
> 🌐 **Language:** [English](./README.md) | [Español](./README.es.md)
>
> 🤖 **HTTP chatbot that presents your portfolio and answers questions about your projects.**
2026-06-28 23:13:21 +00:00
2026-06-30 20:27:00 +00:00
**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** .
2026-06-28 23:13:21 +00:00
## ✨ Features
2026-06-30 20:27:00 +00:00
- 🌐 **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.)
2026-06-28 23:13:21 +00:00
## 🚀 Quick start
```bash
2026-06-30 20:27:00 +00:00
# 1. Install
2026-06-29 06:24:22 +00:00
git clone https://github.com/VictorVargas/rony-chat-bot.git
2026-06-30 20:27:00 +00:00
cd rony-chat-bot
2026-06-28 23:13:21 +00:00
2026-06-30 20:27:00 +00:00
# 2. Resolve dependencies (creates go.sum with hashes)
2026-06-28 23:13:21 +00:00
go mod tidy
2026-06-30 20:27:00 +00:00
# 3. Configure provider (e.g., Ollama)
# Make sure Ollama is running: ollama serve
# Downloaded model: ollama pull qwen2.5:1.5b
2026-06-28 23:13:21 +00:00
2026-06-30 20:27:00 +00:00
# 4. Load your projects in data/projects/
echo "# My Cool Project\nDescription..." > data/projects/my-project.md
2026-06-28 23:13:21 +00:00
# 5. Build
go build -o bin/chat-bot ./cmd/chat-bot
# 6. Run
./bin/chat-bot serve
2026-06-30 20:27:00 +00:00
# → Serves on http://localhost:7331
2026-06-28 23:13:21 +00:00
```
2026-06-30 20:27:00 +00:00
## 📁 Structure
2026-06-28 23:13:21 +00:00
```
2026-06-30 21:39:54 +00:00
rony-chat-bot/
2026-06-30 20:27:00 +00:00
├── cmd/chat-bot/ # Entry point (CLI)
2026-06-28 23:13:21 +00:00
├── internal/
│ ├── server/ # HTTP handlers + SSE
│ ├── portfolio/ # Data loader (markdown → RAG)
│ ├── persona/ # Persona override
│ └── streaming/ # SSE helpers
2026-06-30 20:27:00 +00:00
├── data/projects/ # ← YOUR PROJECTS IN MARKDOWN
│ ├── rony-harness.md
2026-06-29 06:24:22 +00:00
│ ├── rony-llm-agent.md
2026-06-28 23:13:21 +00:00
│ └── ...
├── configs/
│ └── portfolio-bot.yaml # Provider config
├── docs/
2026-06-30 20:27:00 +00:00
│ └── architecture.md # ← Complete technical specification
└── go.mod # require rony-llm-agent
2026-06-28 23:13:21 +00:00
```
2026-06-30 20:27:00 +00:00
## 🎯 Use from Astro
2026-06-28 23:13:21 +00:00
2026-06-30 20:27:00 +00:00
See [`docs/architecture.md` ](./docs/architecture.md ) §5 — recommended proxy pattern.
2026-06-28 23:13:21 +00:00
```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',
2026-06-30 20:27:00 +00:00
headers: { 'Content-Type': 'application/json' },
2026-06-28 23:13:21 +00:00
body: JSON.stringify(body),
});
return new Response(resp.body, {
2026-06-30 20:27:00 +00:00
status: 200,
headers: {
'Content-Type': 'text/event-stream',
'Cache-Control': 'no-cache',
'Connection': 'keep-alive',
},
2026-06-28 23:13:21 +00:00
});
};
```
2026-06-30 20:27:00 +00:00
## 🔄 Adapt to another client
2026-06-28 23:13:21 +00:00
2026-06-30 20:27:00 +00:00
This bot is designed to be **atomic** and reusable. To adapt it (e.g., chatbot for a car dealership):
2026-06-28 23:13:21 +00:00
2026-06-30 20:27:00 +00:00
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
2026-06-28 23:13:21 +00:00
4. Deploy
2026-06-30 20:27:00 +00:00
The `rony-llm-agent` library doesn't change.
2026-06-28 23:13:21 +00:00
2026-06-30 20:27:00 +00:00
## 📚 Documentation
2026-06-28 23:13:21 +00:00
2026-06-30 20:27:00 +00:00
- [**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
2026-06-28 23:13:21 +00:00
2026-06-30 20:27:00 +00:00
## 📄 License
2026-06-28 23:13:21 +00:00
2026-06-30 20:27:00 +00:00
MIT — see [`LICENSE` ](./LICENSE ).
2026-06-28 23:13:21 +00:00
2026-06-30 20:27:00 +00:00
## 🔗 Workspace projects
2026-06-28 23:13:21 +00:00
2026-06-30 20:27:00 +00:00
- [`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)