LLM之RAG实战(四十四)| rag-chatbot:支持Huggingface和Ollama任意模型的多PDF本地RAG方案

特点:

  • 支持本地运行和Kaggle (new)运行
  • 支持HuggingfaceOllama 的任意模型
  • Process multiple PDF inputs.
  • Chat with multiples languages (Coming soon).
  • Simple UI with Gradio.

一、安装使用

1.1 Kaggle(推荐)

Step1:把https://github.com/datvodinh/rag-chatbot/blob/main/notebooks/kaggle.ipynb脚本导入到Kaggle。

Step2:把<YOUR_NGROK_TOKEN>替换为自己的token。

1.2 本地安装

a)克隆项目

复制代码
git clone https://github.com/datvodinh/rag-chatbot.gitcd rag-chatbot

b)安装

Docker方式

复制代码
docker compose up --build

脚本方式(Ollama, Ngrok, python package)

复制代码
source ./scripts/install_extra.sh

手动安装

Step1:Ollama
Step2:Ngrok

Step3:安装rag_chatbot包

复制代码
source ./scripts/install.sh

c)启动

复制代码
source ./scripts/run.sh

或者

复制代码
python -m rag_chatbot --host localhost

使用Ngrok

复制代码
source ./scripts/run.sh --ngrok

此时,会下载大模型

大模型的配置文件:https://github.com/datvodinh/rag-chatbot/blob/main/rag_chatbot/setting/setting.py

LLM默认是:llama3:8b-instruct-q8_0

Embedding模型默认是:BAAI/bge-large-en-v1.5

此时,登录http://0.0.0.0:7860即可访问:

参考文献:

1 https://github.com/datvodinh/rag-chatbot

相关推荐
Wireless_wifi61 分钟前
Why Choose IPQ9574 for Your WiFi 7 Solution
linux·人工智能·5g
Ar-Sr-Na3 分钟前
工作路演PPT处理,交给Workbuddy
人工智能·powerpoint·workbuddy开发者分享季
阿洛学长3 分钟前
Cursor下载安装使用教程(最新详细图文)
人工智能·gpt·深度学习·ai·ai编程
2603_955279704 分钟前
城市与雨水的隐秘对话
人工智能
renhongxia18 分钟前
原生多模态对应用架构的重塑
人工智能·深度学习·机器学习·自然语言处理·架构·机器人
ShiXZ2138 分钟前
PDF-OCR文件识别篇(七):数据入库
java·pdf·json·ocr·springboot
俊哥V9 分钟前
每日 AI 研究简报 · 2026-07-03
人工智能·ai
Nomarsgo15 分钟前
工控机蓝屏怎么办?
人工智能·科技·计算机视觉·视觉检测·电脑
金融小师妹16 分钟前
人工智能推演框架:非农降温信号如何重构黄金定价模型
数据结构·人工智能·机器学习·transformer
HavenlonLabs20 分钟前
Havenlon 思考录(十一):系统的冷,不是对人,而是对风险
人工智能·安全威胁分析·安全架构·havenlon