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

特点:

  • 支持本地运行和Kaggle (new)运行
  • 支持Huggingface 和Ollama 的任意模型
  • 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

相关推荐
qinglongcn12 小时前
2026 Agent 记忆安全威胁全景
网络·人工智能·安全·web安全·编辑器·ai编程
ARM+FPGA+AI工业主板定制专家12 小时前
工业视觉检测:Jetson 整机硬件方案与部署落地总结
人工智能·计算机视觉·视觉检测
鲜于言悠90512 小时前
2026 GitHub AI开源榜单:冠军换人,Agent技能时代爆发
人工智能
用户23398617957312 小时前
TypeScript源码解析:系统提示词组装管线
人工智能
数据世界112 小时前
医院、零售、电商三端销售数据如何放进同一体系?分层抽样放大模型的分立与统一
大数据·数据库·人工智能
user44651179179112 小时前
拆解 AgentScope Agent 运行时:一次 reply 从输入到结束的完整链路
人工智能
模事在人12 小时前
Agent 效果上不去:先别急着换模型,先量一遍 harness
人工智能
lihuang31912 小时前
逆向工程新范式:用 REA + MCP 让 AI Agent 直接拆二进制(原理拆解 + 实战)
人工智能
陈如水12 小时前
尚硅谷 Spring AI学习
人工智能·python·spring
用户369594537382912 小时前
大模型推理优化系列二:注意力计算与执行分派
人工智能