Skip to content

Commit 2fdf51b

Browse files
committed
Merge branch 'main' of https://github.com/dappros/rag_demos
2 parents 6bd46ab + f6b32b0 commit 2fdf51b

1 file changed

Lines changed: 151 additions & 17 deletions

File tree

README.md

Lines changed: 151 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,156 @@
1-
# Zelensky Speeches Extract – Static + Dynamic
1+
# 🧠 Ethora RAG Demos
22

3-
Two ways to host:
3+
> Retrieval-Augmented Generation (RAG) demos built with [Ethora](https://ethora.com), [LangChain](https://www.langchain.com/), and [OpenAI](https://openai.com).
4+
> Quickly learn how to build knowledge-based AI assistants that can index your own website or documents.
45
5-
## Option A — **Dynamic** (quickest)
6-
1. Put `dynamic/index.html` into any static host (GitHub Pages, Netlify, Vercel, Cloudflare Pages, Hugging Face Spaces).
7-
2. URL will work immediately; it fetches rows live from the Hugging Face datasets-server.
8-
- **Requires your crawler to execute JavaScript** to see the `full_text` content.
6+
---
97

10-
## Option B — **Static (crawler-friendly)**
11-
1. Run `python build.py --pages 1,2` locally (or let GitHub Actions do it).
12-
2. It writes `docs/index.html` with all `full_text` baked in (no JS needed).
13-
3. In GitHub repo settings: **Pages → Build from branch → main → /docs**.
14-
4. Add `robots.txt` and `sitemap.xml` (edit domain placeholders).
8+
## 🚀 Overview
159

16-
### GitHub Actions (optional)
17-
- The included workflow builds `docs/index.html` on every push. You can set a repo variable `PAGES` (e.g. `0,1,2,3`).
10+
This repository contains practical examples showing how to connect **Ethora’s AI chat widget and backend tools** with RAG pipelines.
11+
Each demo is designed to help developers understand how to:
1812

19-
### Notes
20-
- Each HF viewer page corresponds to 100 rows; `--pages 1,2` fetches rows 100–299.
21-
- Dataset: `slava-medvedev/zelensky-speeches` (license: CC BY 4.0).
22-
- If you need other datasets, edit `DATASET`, `CONFIG`, `SPLIT` in `build.py`.
13+
- Crawl and index web pages or documents
14+
- Store embeddings in a vector database
15+
- Retrieve relevant chunks based on user queries
16+
- Use LLMs (OpenAI, Anthropic, etc.) to generate contextual answers
17+
- Serve the results via Ethora’s chat component or WordPress plugin
18+
19+
You can use these demos as templates for your own **AI assistants**, **knowledge bases**, or **support chatbots**.
20+
21+
---
22+
23+
## 📦 Demos Included
24+
25+
| Demo | Description |
26+
|------|--------------|
27+
| `basic_rag_openai` | Minimal RAG pipeline using OpenAI embeddings and text completion. |
28+
| `rag_with_site_crawler` | End-to-end demo combining the [`site_crawler`](https://github.com/dappros/site_crawler) tool for automated website indexing. |
29+
| `rag_langchain` | Example using LangChain Retriever + Chain for custom prompt templates. |
30+
| `rag_api_server` | Demonstrates how to serve results to your Ethora Chat Component or WordPress plugin. |
31+
32+
---
33+
34+
## 🧰 Tech Stack
35+
36+
- **Python 3.10+**
37+
- **LangChain**
38+
- **OpenAI API** (or other LLM providers)
39+
- **FAISS** / **ChromaDB**
40+
- **Ethora Chat Component** (for front-end embedding)
41+
- **Ethora Site Crawler** (for ingestion)
42+
43+
---
44+
45+
## ⚙️ Quick Start
46+
47+
Clone the repo and install dependencies:
48+
49+
```bash
50+
git clone https://github.com/dappros/rag_demos.git
51+
cd rag_demos
52+
pip install -r requirements.txt
53+
````
54+
55+
Set your API keys (for example, OpenAI):
56+
57+
```bash
58+
export OPENAI_API_KEY="sk-..."
59+
```
60+
61+
Run any demo:
62+
63+
```bash
64+
python demos/basic_rag_openai.py
65+
```
66+
67+
You can also index your website before running:
68+
69+
```bash
70+
python ../site_crawler/crawl.py https://yourwebsite.com
71+
```
72+
73+
Then query your knowledge base using the chat widget or CLI interface.
74+
75+
---
76+
77+
## 💬 Connect to Ethora Chat Widget
78+
79+
Once you have a RAG backend running, you can embed it into any website:
80+
81+
```html
82+
<script src="https://cdn.jsdelivr.net/npm/ethora-chat-component@latest/dist/widget.js"></script>
83+
<script>
84+
EthoraChatWidget.init({
85+
endpoint: "https://your-server/api/rag",
86+
title: "Ask our AI Assistant",
87+
});
88+
</script>
89+
```
90+
91+
You can also use the [WordPress plugin](https://github.com/dappros/ethora-wp-plugin) for no-code integration.
92+
93+
---
94+
95+
## 🌍 Related Repositories
96+
97+
| Project | Description |
98+
| ------------------------------------------------------------------------- | ------------------------------------------------------------------- |
99+
| [ethora-chat-component](https://github.com/dappros/ethora-chat-component) | Embeddable AI chat widget built with React & TypeScript. |
100+
| [ethora-wp-plugin](https://github.com/dappros/ethora-wp-plugin) | WordPress plugin for adding AI chat assistants. |
101+
| [site_crawler](https://github.com/dappros/site_crawler) | Lightweight crawler and indexer for website content. |
102+
| [ethora](https://github.com/dappros/ethora) | Main Ethora platform – low-code engine for chat, AI, and Web3 apps. |
103+
104+
---
105+
106+
## 🧭 Roadmap
107+
108+
* [ ] Add demo for multi-vector store (FAISS + Chroma)
109+
* [ ] Add support for PDF & DOCX ingestion
110+
* [ ] Add streaming chat UI example
111+
* [ ] Integrate with local open-source LLMs (Mistral, Ollama, etc.)
112+
* [ ] Add Docker-based RAG starter kit
113+
114+
---
115+
116+
## 🤝 Contributing
117+
118+
Contributions are welcome!
119+
To contribute:
120+
121+
1. Fork this repo
122+
2. Create a new branch
123+
3. Submit a pull request with a clear description
124+
125+
For larger features, please open an issue first to discuss your idea.
126+
127+
---
128+
129+
## 🧾 License
130+
131+
This project is open source under the [MIT License](LICENSE) (content of websites used in demos is not included and belongs to its original owners).
132+
133+
---
134+
135+
## 💡 About Ethora
136+
137+
Ethora is a low-code “super-app” engine for **chat, AI assistants, digital wallets, and communities**.
138+
It allows developers to rapidly build apps that combine **messaging, AI, and Web3** in one stack.
139+
140+
* 🌐 [ethora.com](https://ethora.com)
141+
* 💬 [Community Forum](https://forum.ethora.com/)
142+
* 🧰 [Developer Docs](https://docs.ethora.com)
143+
144+
---
145+
146+
*If you find this repo useful, please ⭐ star it and share your RAG demo with us!*
147+
148+
---
149+
150+
**To use:**
151+
1. Go to your repo → `Add file → Create new file → README.md`
152+
2. Paste everything above
153+
3. Commit to `main`
154+
4. Optionally run `git add README.md && git commit -m "add improved README"` locally.
155+
156+
---

0 commit comments

Comments
 (0)