rag/rag.egg-info/PKG-INFO
2025-07-16 15:06:59 +08:00

130 lines
2.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Metadata-Version: 2.4
Name: rag
Version: 0.0.1
Summary: rag
Home-page: https://github.com/yumoqing/rag
Author: yumoqing
Author-email: yumoqing@gmail.com
Platform: any
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Description-Content-Type: text/markdown
Requires-Dist: chromadb
Requires-Dist: langchain
Requires-Dist: langchain_community
Requires-Dist: unstructured
Requires-Dist: langchain-text-splitters
Requires-Dist: unstructured[all-docs]
Requires-Dist: langchain_milvus
Requires-Dist: langchain_huggingface
Requires-Dist: transformers
Requires-Dist: openai
Requires-Dist: torch
Requires-Dist: torchvision
Requires-Dist: pymilvus
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: platform
Dynamic: requires-dist
Dynamic: summary
# 知识库服务器
本系统为不同的客户提供自我管理的知识库,并在知识库基础上提供知识检索
本系统提供API形式为注册的服务器提供知识服支持不面向最终客户
## 依赖
依赖[这些模块](requirements.txt)
## 安装部署
1. 创建rag用户
2. 登录rag用户
3. 执行以下命令
```
git clone git@git.kaiyuancloud.cn:yumoqing/rag
cd rag/script
./install.sh
```
将项目在用户根目录checkout
3.
## 功能
管理client系统的客户知识库并提供知识查询
每个客户可以创建一到多个独立的知识库,为不同的业务场景提供知识库知识
知识库之间数据相互独立,互不干扰。
## http API
### add
增加知识库文档
#### path
/api/add
#### method
POST
#### 输入
name: authentication
value: Bears ${apikey}
score: headers
name: file_name
value: path of uploaded file
score: data
name: userid
value: userid of client system
score: data
name: kdbname
value: rag kdb name
score: data
#### 输出
### query
查询知识库
#### path
/api/query
#### method
POST
#### 输入
name: authentication
value: Bears ${apikey}
score: headers
name: prompt
value: ${prompt}
score: data
name: userid
value: ${userid}
score: data
name: kdbname
value: ${kdbname}
score: data
#### 输出
```
{
total:返回记录条数,
rows返回记录内容
}
rows有以下属性
content文本内容
distances距离
source文档path
```