rony-chat-bot/README.md
Victor Hugo Vargas b9769fac41 docs(i18n): translate all docs to English (with .es.md as Spanish alternative)
- README.md: full English translation, .es.md preserved
- docs/architecture.md: full translation (1039 lines)
- configs/portfolio-bot.yaml: full English translation, .es.yaml preserved
- data/projects/README.md + example-project.md: translated with banners

Default language is now English (standard for OSS). Spanish remains
available via .es.* suffix files.
2026-06-30 13:27:00 -07:00

114 lines
No EOL
3.9 KiB
Markdown

# 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)