机器人可能有点啥,但毕竟可以耍耍嘛

参考源码:  ​https://github.com/nineaiyu/GPT2-chitchat​

chatgpt2 搭建自己的聊天机器人_github

该源码是基于chatgpt2,50w数据训练而成,操作步骤如下:

a.安装docker-ce和docker-compose

which dockerd
if [ $? -ne 0 ];then
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
dnf install docker-ce -y
fi

which docker-compose
if [ $? -ne 0 ];then
curl -L https://get.daocloud.io/docker/compose/releases/download/v2.5.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
fi

b.下载代码并启动

cd /opt/
git clone https://github.com/nineaiyu/GPT2-chitchat.git

下载模型数据,并解压到 model 目录下

模型数据如下:​https://download.csdn.net/download/ly1358152944/87576154​

启动:

docker-compose up -d

c.浏览器访问,或者通过api接口访问