The library was renamed to rony-llm-agent but some docs still referenced the old go-llm-agent name. Also fixed 'chat-bot/' → 'rony-chat-bot/' in project structure diagrams to match the actual directory name.
3.9 KiB
3.9 KiB
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/ - 🎭 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
# 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
rony-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 §5 — recommended proxy pattern.
// 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):
- 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)