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

相关推荐
helloworld也报错?几秒前
深度强化学习(1)——基础知识(名词解释,概率论基础,蒙特卡洛采样,马尔可夫决策过程)
人工智能·深度学习·机器学习·概率论
小白学大数据1 分钟前
未来趋势:AI 时代下 python 爬虫技术的发展方向
运维·人工智能·爬虫·python·自动化
dagouaofei2 分钟前
2026 年年度工作计划 PPT:AI 自动生成方案横向对比
人工智能·python·powerpoint
龙腾AI白云9 分钟前
10分钟了解向量数据库(1)
人工智能·神经网络
Mintopia14 分钟前
“开源”和“闭源“,AI 模型的发展方向
前端·人工智能·aigc
广东数字化转型16 分钟前
开源!工业AI模型训练平台,包含图像采集、智能检测、数据标注、模型训练四大模块
人工智能·开源
龙亘川26 分钟前
技术驱动低空经济:5G-A+AI + 北斗赋能,无人机网联化核心架构与落地实践
人工智能·5g·无人机
kisshuan1239628 分钟前
实战景观图像识别与分类_faster-rcnn_hrnetv2p-w40_2x_coco模型应用
人工智能·分类·数据挖掘
wu_jing_sheng031 分钟前
黑龙江省保险补贴Shapefile转换工具:GIS数据处理自动化实践
大数据·数据库·人工智能
around_0131 分钟前
实验4基于神经网络的模式识别实验
人工智能·深度学习·神经网络