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

相关推荐
明志数科9 分钟前
具身智能产业基础设施换挡:从算力本体到数据层的技术逻辑
人工智能·机器学习
gongfeng300011 分钟前
福州企业级AI自动化获客解决方案品牌梳理与适用场景分析
运维·人工智能·自动化·g-claw ai员工
陈碧甫13 分钟前
因果Agent的Memory在对话中的表现
人工智能
高洁0118 分钟前
大模型的幻觉怎么治
人工智能·深度学习·django·transformer·tornado
m0_7345717622 分钟前
深入理解人工智能 主流的训练算法
人工智能
kyriewen24 分钟前
我删掉了 29 个 AI Skill 里的 23 个:留下的 6 个都有同一个特点
人工智能·程序员·ai编程
weixin_4462608525 分钟前
编译式智能体:前沿通用编码智能体从零交互构建游戏玩家——从Flappy Bird到星际争霸2与文明
人工智能
星栈独行25 分钟前
ADK-Rust 是什么?Rust 生态新一代 AI Agent 开发套件
人工智能·后端·rust
得一录29 分钟前
Agent 的 RAG 遇到 PDF 怎么处理?一套可落地的工程方案
人工智能
陈碧甫1 小时前
法会体——元龙因果链理论表达的一种文体 & 时间
人工智能