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

相关推荐
啦啦啦_999919 小时前
2. PyTorch框架
人工智能·pytorch·python
木雷坞19 小时前
AI Coding Agent 工具链部署:MCP Server、Docker Gateway 和镜像预检
人工智能·容器
其实秋天的枫19 小时前
【26年6月】英语四级高频核心词汇1500+历年真题pdf电子版
经验分享·pdf
Black蜡笔小新19 小时前
自动化AI算法训练服务器DLTM企业级AI模型工作站构筑企业AI自主可控新模式
人工智能·算法·自动化
硅基流动19 小时前
硅基流动上线百度 ERNIE-Image
人工智能·百度
. . . . .19 小时前
Claude Code 插件市场开发及注意事项
人工智能·gitcode
三产19 小时前
Hermes 教程 04:多平台网关
人工智能
Zldaisy3d19 小时前
上交大特材所 l 同步辐射CT与机器学习驱动增材制造气雾化粉末表征及工艺优化
人工智能·机器学习·制造
2401_8322981019 小时前
低成本算力革命,OpenClaw适配低配硬件,普及个人级智能体
人工智能
沪漂阿龙19 小时前
面试题:传统序列模型详解——RNN、LSTM、GRU 原理、区别、优缺点一文讲透
人工智能·rnn·深度学习·gru·lstm