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

相关推荐
Rocky Ding*15 分钟前
Latent Consistency Models:一篇读懂扩散模型的少步生成核心基础知识
人工智能·深度学习·机器学习·ai作画·stable diffusion·aigc·ai-native
大山佬16 分钟前
AI 边缘部署:MCU 上的轻量级目标检测,从 YOLO 到 TFLite Micro 的全链路优化
人工智能
数睿数据无代码开发17 分钟前
深度解析smardaten数据大屏:六大核心功能重塑可视化开发
人工智能·信息可视化
陈猪的杰咪18 分钟前
GitHub Copilot 2026计费新规:AI Credits消耗解析与节省策略
人工智能·ai·架构·github·copilot
学术头条26 分钟前
清华团队开源SCAIL-2:角色动画告别骨骼依赖,端到端还原视频中动作细节
人工智能·科技·机器学习·ai·开源·音视频·agi
لا معنى له27 分钟前
世界模型的功能分类法——Renderers, Simulators, Planners, and the Loop That Connects Them
人工智能
华如锦34 分钟前
面了很多 Java转AI Agent方向,一些面试题总结
java·开发语言·人工智能·python·ai
微学AI35 分钟前
大模型与量子纠缠:一场关于“关联“的范式对话与深度研究
人工智能·量子纠缠
虹科网络安全38 分钟前
艾体宝产品|Arango AutoGraph 如何重构企业的知识图谱
人工智能·重构·知识图谱