rony-chat-bot/web/example.html
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

51 lines
No EOL
1.7 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Rony Chat Widget — demo</title>
<link rel="stylesheet" href="chat-widget.css">
<style>
body {
max-width: 720px;
margin: 40px auto;
padding: 0 20px;
font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
color: #1a1a1a;
}
h1 { margin-bottom: 4px; }
.muted { color: #5c5c66; }
pre { background: #f5f5f7; padding: 12px; border-radius: 8px; overflow-x: auto; }
</style>
</head>
<body>
<h1>Rony Chat Widget — local demo</h1>
<p class="muted">The bubble in the bottom-right is the widget. It talks to the local chat-bot server on :7331.</p>
<h2>Try asking</h2>
<ul>
<li>“What database does the project use?”</li>
<li>“¿De qué trata el portfolio?” (responde en inglés porque el contenido indexado lo está)</li>
<li>“Tell me about the tech stack”</li>
</ul>
<h2>Embed snippet (copy this into your site)</h2>
<pre>&lt;link rel="stylesheet" href="/chat-widget.css"&gt;
&lt;script src="/chat-widget.js"
data-api-url="http://localhost:7331"
data-title="Ask me anything"
data-greeting="Hi! Ask me about the projects."
data-position="bottom-right"
data-theme="auto"
defer&gt;&lt;/script&gt;</pre>
<!-- The widget itself -->
<script src="chat-widget.js"
data-api-url="http://localhost:7331"
data-title="Rony Chat"
data-greeting="Hi! I'm Rony's assistant. Ask me about the projects."
data-position="bottom-right"
data-theme="auto"
defer></script>
</body>
</html>