HTTP chatbot for Q&A
Adds the §4.5 Auto-compaction section to architecture.md and architecture.es.md describing the trigger, fallback, persistence and the new SSE 'compaction' event so consumers know how to react. Includes the three placeholder projects used while exercising the feature end to end (bot-onboarding, dashboard-metricas, tienda-ropa) so /api/reindex picks them up without further setup. |
||
|---|---|---|
| bench | ||
| cmd/chat-bot | ||
| configs | ||
| data/projects | ||
| docs | ||
| internal | ||
| web | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| README.es.md | ||
| README.md | ||
Rony Chat Bot — HTTP Portfolio Bot
🤖 HTTP chatbot that presents your portfolio and answers questions about your projects.
Rony Chat Bot is a chatbot based on 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
.mdindata/projects/(SQLite FTS5, no embeddings) - 🎭 Customizable persona — responds as "Victor's assistant"
- ⚡ Self-hosted with llama.cpp (default) or Ollama (no cloud API key required)
- 💬 Drop-in chat widget — vanilla JS, no build step, works in any site
- 🛡️ Rate limiting and structured logging
- 📦 Portable — adaptable to other contexts (clients, products, etc.)
🚀 Quick start
# 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 (llama.cpp by default)
# Download a GGUF model, e.g.:
# https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct-GGUF
export RONY_MODELS_PATH=/path/to/models
# 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
rony-chat-bot/
├── cmd/chat-bot/ # Entry point (CLI)
├── internal/
│ ├── server/ # HTTP handlers + SSE
│ ├── agent/ # LLM client + RAG + persona runner
│ ├── portfolio/ # Data loader (markdown → RAG)
│ ├── persona/ # Persona override
│ ├── streaming/ # SSE helpers
│ └── i18n/ # Language detection (EN/ES)
├── web/ # ← DROP-IN CHAT WIDGET
│ ├── chat-widget.js
│ ├── chat-widget.css
│ └── example.html
├── data/projects/ # ← YOUR PROJECTS IN MARKDOWN
│ ├── rony-harness.md
│ ├── rony-llm-agent.md
│ └── ...
├── configs/
│ └── portfolio-bot.yaml # Provider + RAG + persona config
├── docs/
│ └── architecture.md # ← Complete technical specification
└── go.mod # require rony-llm-agent
🎯 Embed in any site
The bot ships with a drop-in chat widget. Add two files and a <script> tag:
<link rel="stylesheet" href="/chat-widget.css">
<script src="/chat-widget.js"
data-api-url="https://chat.example.com"
data-title="Ask me anything"
data-position="bottom-right"
data-theme="auto"
defer></script>
See web/README.md for the full configuration reference and Astro/Next.js integration snippets. Full architecture in docs/architecture.md §5.
🔄 Adapt to another client
This bot is designed to be atomic and reusable. To adapt it (e.g., chatbot for a car dealership):
- Fork/clone this repo
- Replace
data/projects/withdata/inventory/(or another domain) - Update
configs/portfolio-bot.yamlwith the new persona - Deploy
The rony-llm-agent library doesn't change.
📚 Documentation
- Architecture doc — Complete technical specification
- Library:
rony-llm-agent— Reusable core - Rony Harness — The other project using the same library
📄 License
MIT — see LICENSE.
🔗 Workspace projects
rony-llm-agent— Core libraryrony-harness— AI agent harness (TUI)portfolio— Astro + React site (integrates this bot)