commune/studio-hyperf

commune/chatbot studio base on swoole coroutine framework hyperf

v0.1.2 2020-03-11 11:51 UTC

This package is auto-updated.

Last update: 2024-04-07 14:54:28 UTC


README

0.2 版本正在开发中... 应用开发完后正式撰写文档

微信公众号 CommuneChatbot,qq群:907985715 欢迎交流!

相关项目:

运行本地 Demo

如果想尝试运行本地 demo, 请确保:

  • php >=7.3
  • swoole >= 4.5 (最好是最新版本)
  • 本地安装了 redis
  • 本地安装了 mysql

机器人的默认配置文件地址在 /commune/config/host.php

安装项目

克隆仓库

git clone https://github.com/thirdgerb/studio-hyperf.git

进入目录, 使用 composer 安装依赖

composer install

修改环境变量文件 ./.env 配置 mysql, redis 等. 具体可参考 hyperf 配置

初始化数据表

运行命令:

php bin/hyperf.php migrate

可初始化数据表, 具体请参考 hyperf 迁移

运行本地 console 端

执行命令:

php bin/hyperf.php commune:start stdio_console -d -r

其中 -d 参数表示 debug 模式, -r参数重置机器人的对话逻辑.

运行其它端

执行命令:

php bin/hyperf.php commune:start

可查看目前开箱自带的端. 需要配合微信公众号/网页版/nlu 才能使用.

由于项目还在开发中, 尚未撰写相关文档.

如果想运行 demo, 建议还是先查看项目 https://github.com/thirdgerb/chatbot

如果有更多需要, 请加 qq群:907985715 直接向作者提出, 感谢!