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

相关推荐
C^h5 分钟前
python函数学习
人工智能·python·机器学习
KAU的云实验台8 分钟前
【研究分享】大语言模型 × 进化计算新范式? —— 以ReEvo为例拆解
人工智能·语言模型·自然语言处理
品牌全球行9 分钟前
共商共建共享 链接数字未来——“一带一路数字新城(深圳)会客厅筹备办”揭牌仪式在深圳隆重举行
大数据·人工智能
决战灬17 分钟前
langgraph之interrupt(理论篇)
人工智能·python·agent
Python大数据分析@19 分钟前
参加 2026 世界人工智能大会 (WAIC) 是一种怎样的体验?
人工智能
糖果店的幽灵22 分钟前
【langgraph 从入门到精通graphApi 篇】综合实战 —— 智能客服 Agent实战代码解读
人工智能·langgraph
可乐奶茶sky23 分钟前
AI Agent 学习
人工智能·学习
TsingtaoAI23 分钟前
3D高斯泼溅技术发展及其在具身智能领域的应用综述
人工智能·算法·ai·具身智能·高斯泼溅
神奇小汤圆31 分钟前
面试官:Agent意图识别怎么做?95%的人一句话就把自己送走了
人工智能
兜客互动1 小时前
2026年AI关键词拓展挖掘软件,高效助力内容创作精准获流
人工智能·python