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

相关推荐
KG_LLM图谱增强大模型2 小时前
Vgent:基于图的多模态检索推理增强生成框架GraphRAG,突破长视频理解瓶颈
大数据·人工智能·算法·大模型·知识图谱·多模态
AKAMAI2 小时前
企业如何平衡AI创新与风险
人工智能·云原生·云计算
TDengine (老段)3 小时前
优化 TDengine IDMP 面板编辑的几种方法
人工智能·物联网·ai·时序数据库·tdengine·涛思数据
数据的世界014 小时前
Visual Studio 2026 正式发布:AI 原生 IDE 与性能革命的双向突破
ide·人工智能·visual studio
shayudiandian5 小时前
深度学习中的激活函数全解析:该选哪一个?
人工智能·深度学习
视界先声5 小时前
如何选择合适的养老服务机器人
人工智能·物联网·机器人
RPA机器人就选八爪鱼5 小时前
RPA财务机器人:重塑财务效率,数字化转型的核心利器
大数据·数据库·人工智能·机器人·rpa
腾讯WeTest6 小时前
Al in CrashSight ——基于AI优化异常堆栈分类模型
人工智能·分类·数据挖掘
凯子坚持 c6 小时前
openGauss向量数据库技术演进与AI应用生态全景
数据库·人工智能