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

相关推荐
xsd2024111821 小时前
Eye-in-Hand 还是 Eye-to-Hand?
人工智能
邂逅and回眸1 天前
自进化的 Agent 是通往 AGI 的路吗
人工智能·agi
甲维斯1 天前
GLM5.4“买家秀”来咯,这模型得...慢慢来!
人工智能
AI创界者1 天前
Python 进阶实战(五十八章):配置热更新、优雅停机排空与高并发压测方案
人工智能·python·aigc
oak隔壁找我1 天前
一款运行在 DSHDeepSeek Harness(DSH)中的 MySQL 客户端插件
人工智能
oak隔壁找我1 天前
一款运行在 DSH(DeepSeek Harness)中的 Redis 管理插件
人工智能
孟健1 天前
一个人做的免费AI工具,月访问千万的选品与技术拆解
人工智能·aigc
乌鲁木齐德润恒圣信息科技有限公司1 天前
GEO生成式引擎优化:技术原理与43引擎自动测试系统
大数据·前端·人工智能
SelectDB1 天前
SelectDB 和阿里云 SelectDB 有什么区别?公司关系、产品版本与部署方式详解
人工智能