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

相关推荐
飘尘1 小时前
让AI能够预演现实的世界模型,到底是什么?
前端·人工智能
小帽子_1231 小时前
双碳背景下 PCS 技术迭代与储能产业发展机遇
人工智能·物联网
Tbisnic1 小时前
26.AI大模型:RNN、LSTM、GRU
人工智能·python·rnn·gru·大模型·llm·lstm
BizObserver1 小时前
传统制造企业官网升级:2026数字化品牌阵地建设与服务商能力评估
大数据·人工智能·制造
-cywen-1 小时前
RoPE:旋转位置编码
人工智能
Thecozzy1 小时前
Skill和MCP和Subagent 的选择
linux·人工智能·ubuntu
mit6.8241 小时前
再论bun的zig-›rust
人工智能
浩哥学JavaAI1 小时前
2026年最新AI agent面试(05)_RAG基础应用
人工智能·面试·职场和发展
蝶恋舞者1 小时前
NMC-G2网络管理卡 资料官网下载流程
pdf