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

相关推荐
武子康30 分钟前
调查研究-187 Claude Fable 5 / Mythos 5 事件:前沿模型开始进入“能力分层”时代
人工智能·openai·claude
IT_陈寒32 分钟前
React状态更新总是不及时?你可能漏了这步批处理机制
前端·人工智能·后端
aneasystone本尊38 分钟前
turbovec 快速入门
人工智能
xiezhr1 小时前
折腾了半小时,终于让AI能帮我写飞书文档了
人工智能·agent·ai编程
ZhengEnCi11 小时前
09bad-斯坦福CS336作业一-构建优化器
人工智能
ZhengEnCi11 小时前
09bac-斯坦福CS336作业一-实现训练损失计算
人工智能
冬奇Lab12 小时前
Skill 系列(01):Skill 评测体系——如何量化一个 AI Skill 的质量
人工智能
IT_陈寒15 小时前
Redis内存爆了,原来我漏掉了这个致命配置
前端·人工智能·后端
用户35218024547516 小时前
🎆从 Prompt 到 Skill:让 Spring AI Agent 学会"装新技能"
人工智能·spring boot·ai编程