knowledge_with_chatglm
knowledge_with_chatglm copied to clipboard
KnowledgeWithChatGLM
介绍
KnowledgeWithChatGLM是一个基于向量索引库Milvus和ChatGLM-6B实现的知识库问答应用
运行环境
检查pytorch是否支持GPU
import torch
print(torch.cuda.is_available())
使用方式
pip install -r requirements.txt- 部署
milvus服务:docker-compose up -d - 初始化向量索引库,将文档预处理并转为向量建立索引:
python document_preprocess.py - 启动服务:
python web_demo.py
如果对本项目源码有更多的好奇,可以参考以下文章chatglm实现基于知识库问答的应用