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

相关推荐
cxr8282 分钟前
如何彻底解决AI杜撰编造假文献的问题
人工智能·智能体
孤狼warrior4 分钟前
SCTR 五次失败的安全 BN 路由器
人工智能·python·深度学习·算法·安全·yolo
AgentMaster4 分钟前
元数据、血缘、质量、安全四大模块能力拆解,数据治理方案对比:4 种技术路线深度评测
大数据·数据库·数据仓库·人工智能·原型模式
霸道流氓气质6 分钟前
Spring AI vs Spring AI Alibaba:技术选型与平滑迁移策略
java·人工智能·spring
艾莉丝努力练剑6 分钟前
【AI大模型接入SDK】Ollama本地大语言模型部署
c++·人工智能·语言模型·自然语言处理·面试
Raas1008 分钟前
AI网关和OpenRouter区别在哪?MAI Gateway(魔芋企业级AI网关)统一治理方案深度解析
大数据·人工智能·gateway·ai网关·mai gateway
JJJennie7779 分钟前
MAI Gateway能力解析:大模型网关支持本地模型吗?AI网关核心功能详解
人工智能
找方案13 分钟前
AI安全攻防:大模型越狱、提示注入与防御之道
人工智能·安全·机器学习
张彦峰ZYF14 分钟前
从“记住对话”到“经营组织经验”:TencentDB Agent Memory 的团队级记忆架构、工程取舍与企业落地边界
人工智能·架构·llm·agent·skill·agent memory·tencentdb
shionhana15 分钟前
从资料到演示稿:AI 生成 PPT 的工作流拆解
人工智能·ai·powerpoint