bugfix
This commit is contained in:
parent
30b33096cb
commit
7e3860c810
87
README.md
87
README.md
@ -1,73 +1,32 @@
|
||||
# 开元rag
|
||||
|
||||
## 安装
|
||||
## 克隆仓库
|
||||
执行下面的命令
|
||||
```
|
||||
dir=$(pwd)
|
||||
git clone https://git.opencomputing.cn/yumoqing/appbase
|
||||
git clone https://git.opencomputing.cn/yumoqing/rbac
|
||||
git clone https://git.opencomputing.cn/yumoqing/filemgr
|
||||
git clone https://git.opencomputing.cn/yumoqing/rag
|
||||
git clone https://git.opencomputing.cn/yumoqing/dapi
|
||||
git clone https://git.opencomputing.cn/yumoqing/kyrag
|
||||
git clone https://git.opencomputing.cn/yumoqing/kyrag.git
|
||||
```
|
||||
## 一键安装
|
||||
安装前检查当前用户是否有sudo权限
|
||||
```
|
||||
cd kyrag
|
||||
cdir=$(pwd)
|
||||
uname=$(id -un)
|
||||
gname=$(id -gn)
|
||||
python3 -m venv py3
|
||||
source py3/bin/activate
|
||||
pip install -r requirements.txt
|
||||
for m in appbase rbac filemgr rag dapi
|
||||
do
|
||||
cd $dir/$m
|
||||
pip install .
|
||||
cd models
|
||||
xls2ddl mysql . > mysql.ddl.sql
|
||||
mysql -h db -utest -ptest123 kyrag < mysql.ddl.sql
|
||||
cd ../json
|
||||
./build
|
||||
ln -s $dir/$m/wwwroot $cdir/wwwroot/$m
|
||||
done
|
||||
cd $cdir
|
||||
cat > $cdir/kyrag.service <<EOF
|
||||
[Unit]
|
||||
Wants=systemd-networkd.service
|
||||
./build.sh
|
||||
```
|
||||
|
||||
[Service]
|
||||
User=$uname
|
||||
Group=$gname
|
||||
Type=forking
|
||||
WorkingDirectory=$cdur
|
||||
ExecStart=$cdir/start.sh
|
||||
ExecStop=$cdir/stop.sh
|
||||
StandardOutput=append:/var/log/kyrag/kyrag.log
|
||||
StandardError=append:/var/log/kyrag/kyrag.log
|
||||
SyslogIdentifier=kyrag
|
||||
## 检查安装
|
||||
```
|
||||
ps -ef|grep kyrag.py
|
||||
```
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat > $cdir/start.sh <<EOF
|
||||
#!/usr/bin/bash
|
||||
cd $cdir
|
||||
$cdir/py3/bin/python $cdir/app/kyrag.py -p 9182 -w $cdir &
|
||||
exit 0
|
||||
EOF
|
||||
cat > $cdir/stop.sh <<EOF
|
||||
PORT=9182
|
||||
PID=\$(lsof -t -i:$PORT)
|
||||
|
||||
if [ -n "\$PID" ]; then
|
||||
echo "找到端口 $PORT 的进程: PID=\$PID"
|
||||
kill -9 \$PID
|
||||
echo "已终止端口 $PORT 的进程"
|
||||
else
|
||||
echo "未找到端口 $PORT 的进程"
|
||||
fi
|
||||
EOF
|
||||
chmod +x $cdir/start.sh stop.sh
|
||||
sudo mkdir /var/log/kyrag
|
||||
sudo cp kyrag.service /etc/systemd/system
|
||||
sudo systemctl enable kyrag
|
||||
## 重启服务
|
||||
```
|
||||
sudo systemctl restart kyrag
|
||||
```
|
||||
|
||||
## 功能
|
||||
* 支持多客户
|
||||
* 客户间的知识库隔离,相互不可见
|
||||
* 每个用户可以创建一到多个知识库
|
||||
* 知识图谱增强
|
||||
* 使用可配置的服务:潜入模型,向量数据库,重排模型,三元组模型,图知识库,实体模型
|
||||
* 原始文档管理
|
||||
* 网上知识爬取以及爬取配置
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
{
|
||||
"widgettype":"VBox",
|
||||
"widgettype":"MdWidget",
|
||||
"options":{
|
||||
"md_url":"{{entire_url('kyrag.md')}}",
|
||||
"height":"100%"
|
||||
}
|
||||
}
|
||||
|
||||
10
wwwroot/kyrag.md
Normal file
10
wwwroot/kyrag.md
Normal file
@ -0,0 +1,10 @@
|
||||
# 开元rag
|
||||
|
||||
## 功能
|
||||
* 支持多客户
|
||||
* 客户间的知识库隔离,相互不可见
|
||||
* 每个用户可以创建一到多个知识库
|
||||
* 知识图谱增强
|
||||
* 使用可配置的服务:潜入模型,向量数据库,重排模型,三元组模型,图知识库,实体模型
|
||||
* 原始文档管理
|
||||
* 网上知识爬取以及爬取配置
|
||||
Loading…
x
Reference in New Issue
Block a user