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

相关推荐
苏州邦恩精密3 分钟前
蔡司3D扫描仪厂家如何应用于新能源行业检测
人工智能·机器学习·3d·自动化·制造
阿里技术1 小时前
Agent 评测:方法论与体系设计
大数据·人工智能·算法
deephub1 小时前
用 Scikit-LLM 和 Groq 搭建情感分析 pipeline
人工智能·大语言模型·sklearn
赛联区块链1 小时前
工厂使用AI降本增效实践与探索
人工智能·ai智能体·deepseek·ai赋能·工业ai·工厂ai
千里马学框架1 小时前
google官方Perfetto 中使用 AI相关skill
android·人工智能·ai·framework·perfetto·性能·skill
蓝速科技1 小时前
蓝速科技 3D 全息舱 AI 数字人校园智慧升级实效展示
人工智能·科技·3d
观远数据1 小时前
像装应用一样落地BI:云市场模板如何降低行业分析项目的实施风险
人工智能
道可云1 小时前
淄博电机模具领军企业如何用AI提质增效?道可云携手精密制造专精特新,探索工业大脑赋能新路径
人工智能·制造
cxr8281 小时前
大语言模型上下文缓存命中率测试全场景清单
人工智能·python·算法·缓存·语言模型·自然语言处理·llm
yingyuecom1 小时前
映悦AI复刻爆款更新深度评测:资产锁定如何治好AI短剧的‘变脸症’
人工智能·gpt·chatgpt·prompt·aigc