ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
此功能对服务器要求比较大,需要私有化部署才可以。 H5客服 可以实时双向通信 场景:开启Ai助理后,自动会帮你回复客户问题,支持Ai训练。 演示地址:https://www.bilibili.com/video/BV1T94y1c72w/?spm_id_from=333.999.0.0 ![](https://img.kancloud.cn/be/16/be161ea75abec458262bac84796f8955_2046x1410.png) ### 设置PHP命令版本 php7.3 ### 开放端口 2.系统的默认长链接的端口是30001,30002,30003这三个端口,如果需要修改端口或者多站点部署,请在在config/workerman.php中修改对应的端口 云服务器和宝塔上面的防火墙都需要打开 ![](https://img.kancloud.cn/4e/72/4e72bdd25326a84089d646bfd41741ff_2087x430.png) ![](https://img.kancloud.cn/3b/a3/3ba36fed5786bbc95043c22abe889e05_1592x347.png) ### 系统配置 ~~~ 配置之前请先删除以下php的禁用函数 proc_open pcntl_signal pcntl_signal_dispatch pcntl_fork pcntl_wait pcntl_alarm ~~~ ### 配置nginx代理 (Nginx)3.点击左侧网站目录,点击域名进入站点配置,修改配置文件,在最后一个大括号上面增加以下代码,如果修改了端口,请对应修改端口,添加完成后保存 ~~~ location /notice { proxy_pass http://127.0.0.1:30001/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header X-real-ip $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; } location /msg { proxy_pass http://127.0.0.1:30002/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header X-real-ip $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; } ~~~ ### 站点根目录运行命令 ~~~ sudo -u www php think workerman start --d ~~~ ![](https://img.kancloud.cn/e5/14/e51471c90272e0cd941d64cb7cc42563_1200x361.png)