2026-06-29 06:24:22 +00:00
# Rony Chat Bot — Portfolio Bot HTTP
2026-06-28 23:13:21 +00:00
> 🤖 **Chatbot HTTP que presenta tu portfolio y responde preguntas sobre tus proyectos.**
2026-06-29 06:24:22 +00:00
**Rony Chat Bot** es un chatbot basado en [`rony-llm-agent` ](https://github.com/VictorVargas/rony-llm-agent ) que se integra con un sitio Astro/React para responder preguntas sobre Victor Hugo Vargas y sus proyectos, usando **RAG sobre archivos markdown** .
2026-06-28 23:13:21 +00:00
## ✨ Features
- 🌐 **HTTP server** con streaming SSE (Server-Sent Events)
- 🧠 **RAG sobre markdown** — indexa automáticamente los `.md` en `data/projects/`
- 🎭 **Persona customizable** — responde como "asistente de Victor"
- ⚡ **Self-hosted** con Ollama o llama.cpp (no requiere API key de cloud)
- 🔌 **Integrable** con Astro/React via proxy HTTP
- 🛡️ **Rate limiting** y logging estructurado
- 📦 **Portable** — se puede adaptar a otros contextos (clientes, productos, etc.)
## 🚀 Quick start
```bash
# 1. Instalar
2026-06-29 06:24:22 +00:00
git clone https://github.com/VictorVargas/rony-chat-bot.git
2026-06-28 23:13:21 +00:00
cd chat-bot
# 2. Resolver dependencias (crea go.sum con hashes)
go mod tidy
# 3. Configurar provider (ejemplo: Ollama)
# Asegúrate de tener Ollama corriendo: ollama serve
# Modelo descargado: ollama pull qwen2.5:1.5b
# 4. Cargar tus proyectos en data/projects/
echo "# Mi Proyecto Cool\nDescripción..." > data/projects/mi-proyecto.md
# 5. Build
go build -o bin/chat-bot ./cmd/chat-bot
# 6. Run
./bin/chat-bot serve
# → Sirve en http://localhost:7331
```
## 📁 Estructura
```
chat-bot/
2026-06-29 06:24:22 +00:00
├── cm./rony-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
├── data/projects/ # ← TUS PROYECTOS EN MARKDOWN
│ ├── rony-tui.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/
│ └── architecture.md # ← Especificación técnica completa
2026-06-29 06:24:22 +00:00
└── go.mod # require rony-llm-agent
2026-06-28 23:13:21 +00:00
```
## 🎯 Uso desde Astro
Ver [`docs/architecture.md` ](./docs/architecture.md ) §5 — patrón recomendado de proxy.
```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',
body: JSON.stringify(body),
});
return new Response(resp.body, {
headers: { 'Content-Type': 'text/event-stream' },
});
};
```
## 🔄 Adaptar a otro cliente
Este bot está diseñado para ser **atómico** y reusable. Para adaptarlo (ej. chatbot para un concesionario):
1. Fork/clone este repo
2. Reemplaza `data/projects/` con `data/inventory/` (u otro dominio)
3. Actualiza `configs/portfolio-bot.yaml` con la nueva persona
4. Deploy
2026-06-29 06:24:22 +00:00
La librería `rony-llm-agent` no cambia.
2026-06-28 23:13:21 +00:00
## 📚 Documentación
- [**Architecture doc** ](./docs/architecture.md ) — Especificación técnica completa
2026-06-29 06:24:22 +00:00
- [Library: `rony-llm-agent` ](https://github.com/VictorVargas/rony-llm-agent ) — Core reutilizable
- [Harness ](https://github.com/VictorVargas/rony-harness ) — El otro proyecto que usa la misma librería
2026-06-28 23:13:21 +00:00
## 📄 Licencia
MIT — ver [`LICENSE` ](./LICENSE ).
## 🔗 Proyectos del workspace
2026-06-29 06:24:22 +00:00
- [`rony-llm-agent` ](https://github.com/VictorVargas/rony-llm-agent ) — Librería core
- [`harness` ](https://github.com/VictorVargas/rony-harness ) — AI agent harness (TUI)
2026-06-28 23:13:21 +00:00
- [`portfolio` ](https://github.com/VictorVargas/portfolio ) — Astro + React site (integra este bot)