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

相关推荐
小保CPP20 分钟前
OCR C++ Tesseract按行识别字符
c++·人工智能·ocr·模式识别·光学字符识别
小弥儿41 分钟前
GitHub今日热榜 | 2026-07-19
人工智能·学习·github·知识图谱
犀利豆41 分钟前
写 Mermaid 总在查语法?我做了个用一句话生成图的小工具 - text2mermaid
人工智能
墨舟的AI笔记41 分钟前
端侧推理后端:ONNX Runtime 与跨平台执行提供方
人工智能
大模型码小白2 小时前
JAVA 集合框架进阶:List 与 Set 的深度解析与实战
java·开发语言·人工智能·windows·语言模型·list·ai编程
IT_陈寒2 小时前
为什么我的JavaScript异步代码总是不按顺序执行?
前端·人工智能·后端
石头dhf2 小时前
Claude code执行过程
人工智能
小码哥哥2 小时前
云原生时代的企业AI知识库:从云生态融合到多云知识治理
人工智能·云原生
熊猫钓鱼>_>3 小时前
Redis 突发缓存穿透:一次完整的定位复盘
数据库·人工智能·redis·缓存·ai·agent·智能
Xzaveir3 小时前
不要用一个状态表示“号码已认证”:企业号码身份的四域模型
android·人工智能