An open API service indexing awesome lists of open source software.

https://github.com/leon0204/fast-rag

LLM Rag Intelligent Q&A Robot
https://github.com/leon0204/fast-rag

fastapi full-stack llm ollama rag

Last synced: 5 months ago
JSON representation

LLM Rag Intelligent Q&A Robot

Awesome Lists containing this project

README

          

# Fast RAG

[中文](README.zh-CN.md) | English

> Local, privacy-first RAG using PostgreSQL + pgvector and Ollama. Streams responses via SSE. Simple, fast, hackable.


Python
FastAPI
PostgreSQL
pgvector
Docling
FTS/pg_trgm
Hybrid Retrieval
Docker
License

![img_6.png](img/img_6.png)

![img.png](img/img.png)
![img_2.png](img/img_2.png)
![img3.png](img/img3.png)

## Features
- Process management 【LangGraph】
- Documents transform core tools 【Docling】、supprt PDF、DOCX、PPTX、Image、HTML、AsciiDoc、Markdown
- Semantic search with pgvector (768-dim `nomic-embed-text`)
- REST + Streaming responses via SSE
- Optional frontend: React + Vite + TypeScript
- Local models via Ollama or openai api

## Table of Contents
- [Local Setup](#local-setup)
- [Run](#run)
- [Frontend (optional)](#frontend-optional)
- [License](#license)

---

- env configure

---

## Local Setup
```bash
pip install -r requirements.txt
docling-tools models download
cp env.example .env # edit DB_* for your environment
#python scripts/init_db.py # if not using docker init
```

---

## Run
```bash
python main.py
```
App: http://localhost:8000
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc

---

## Frontend

React + Vite + TypeScript app lives in `frontend-app/`.

Dev
```bash
cd frontend-app
npm install # or: pnpm i / yarn
npm run dev # http://localhost:5173
```

---

## License
MIT. See `LICENSE`.