HTTP chatbot for Q&A
Find a file
Victor Hugo Vargas f33708534a feat: bootstrap rony-chat-bot Go module
Initial implementation of the bot:

- cmd/chat-bot: CLI entrypoint (serve, reindex, ask, version)
- internal/agent: LLM provider client + agent runner with RAG injection
- internal/config: YAML config loader (providers, RAG, persona, server)
- internal/i18n: response-language detection (EN/ES)
- internal/persona: persona system prompt assembly from YAML
- internal/portfolio: heading-based chunker + SQLite FTS5 indexer
- internal/server: chi router with /api/chat (SSE), /api/health, /api/info,
  /api/reindex, middleware (RequestID, Logging, CORS, RateLimit)
- internal/streaming: SSE protocol helpers (start, chunk, sources, done, error)
- web/: drop-in vanilla-JS chat widget (no build, no deps) + demo + README
- bench/: reproducible driver benchmark (modernc vs mattn SQLite)
- configs/portfolio-bot.yaml: llama.cpp default provider, SQLite RAG, canine persona
- docs/architecture.md / .es.md: aligned with SQLite FTS5 + llama.cpp decisions
- data/projects/README*.md: project data documentation
- README.md / .es.md: updated for current implementation

All tests pass (go test ./...). Bot is functional end-to-end with the
configured LLM provider.
2026-07-17 00:56:06 -07:00
bench feat: bootstrap rony-chat-bot Go module 2026-07-17 00:56:06 -07:00
cmd/chat-bot feat: bootstrap rony-chat-bot Go module 2026-07-17 00:56:06 -07:00
configs feat: bootstrap rony-chat-bot Go module 2026-07-17 00:56:06 -07:00
data/projects feat: bootstrap rony-chat-bot Go module 2026-07-17 00:56:06 -07:00
docs feat: bootstrap rony-chat-bot Go module 2026-07-17 00:56:06 -07:00
internal feat: bootstrap rony-chat-bot Go module 2026-07-17 00:56:06 -07:00
web feat: bootstrap rony-chat-bot Go module 2026-07-17 00:56:06 -07:00
.gitignore feat: bootstrap rony-chat-bot Go module 2026-07-17 00:56:06 -07:00
go.mod feat: bootstrap rony-chat-bot Go module 2026-07-17 00:56:06 -07:00
go.sum feat: bootstrap rony-chat-bot Go module 2026-07-17 00:56:06 -07:00
LICENSE chore: initial scaffold with design docs 2026-06-28 16:13:21 -07:00
README.es.md feat: bootstrap rony-chat-bot Go module 2026-07-17 00:56:06 -07:00
README.md feat: bootstrap rony-chat-bot Go module 2026-07-17 00:56:06 -07:00

Rony Chat Bot — HTTP Portfolio Bot

🌐 Language: English | Español

🤖 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 .md in data/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):

  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

📄 License

MIT — see LICENSE.

🔗 Workspace projects