commune / studio-hyperf
commune/chatbot studio base on swoole coroutine framework hyperf
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 59
Watchers: 6
Forks: 2
Open Issues: 1
Type:project
Requires
- php: >=7.2
- ext-swoole: >=4.4
- commune/chatbot-hyperf: ~0.1.0
- commune/compnt-rasa: ~0.1.0
- commune/platform-dueros: ~0.1.0
- commune/platform-wechat: ~0.1.0
- hyperf/async-queue: ~1.1.0
- hyperf/cache: ~1.1.0
- hyperf/command: ~1.1.0
- hyperf/config: ~1.1.0
- hyperf/contract: ~1.1.0
- hyperf/database: ~1.1.0
- hyperf/db-connection: ~1.1.0
- hyperf/devtool: ~1.1.0
- hyperf/di: ~1.1.0
- hyperf/dispatcher: ~1.1.0
- hyperf/event: ~1.1.0
- hyperf/exception-handler: ~1.1.0
- hyperf/framework: ~1.1.0
- hyperf/guzzle: ~1.1.0
- hyperf/http-server: ~1.1.0
- hyperf/logger: ~1.1.0
- hyperf/memory: ~1.1.0
- hyperf/paginator: ~1.1.0
- hyperf/pool: ~1.1.0
- hyperf/process: ~1.1.0
- hyperf/redis: ~1.1.0
- hyperf/utils: ~1.1.0
- hyperf/websocket-server: ^1.0
Requires (Dev)
- doctrine/common: ^2.9
- friendsofphp/php-cs-fixer: ^2.14
- hyperf/testing: ~1.1.0
- mockery/mockery: ^1.0
- phpmd/phpmd: ^2.6
- phpstan/phpstan: ^0.11.2
- swoft/swoole-ide-helper: ^4.2
- symfony/var-dumper: ^4.3
Suggests
- ext-intl: Required for ICU
- ext-json: Required to use JSON.
- ext-openssl: Required to use HTTPS.
- ext-pdo: Required to use MySQL Client.
- ext-pdo_mysql: Required to use MySQL Client.
- ext-redis: Required to use Redis Client.
This package is auto-updated.
Last update: 2025-02-07 16:32:50 UTC
README
0.2 版本正在开发中... 应用开发完后正式撰写文档
- 展示网站: https://communechatbot.com/chatlog
- v0.1网站: https://communechatbot.com/
- v0.1分枝: https://github.com/thirdgerb/chatbot/tree/v0.1.x
- v0.1文档: https://communechatbot.com/docs/#/
微信公众号 CommuneChatbot,qq群:907985715 欢迎交流!
相关项目:
- chatbot: https://github.com/thirdgerb/chatbot
- hyperf 对接: https://github.com/thirdgerb/chatbot-hyperf
- 前端项目: https://github.com/thirdgerb/chatlog-web
- nlu单元: https://github.com/thirdgerb/spacy-nlu
运行本地 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 直接向作者提出, 感谢!