ibagayoko/rc_sdk_php
Composer 安装命令:
composer require ibagayoko/rc_sdk_php
包简介
A PHP version of th SDK for the development of custom actions for Rasa Core.
关键字:
README 文档
README
PHP SDK for the development of custom actions for Rasa Core.
Compatibility
| SDK version | compatible Rasa Core version |
|---|---|
0.1.x |
>=0.12.x |
Installation
To install the SDK run
composer require ibagayoko/rc_sdk_php
Usage
Can find detailed instructions about Custom Actions in the Rasa Core Documentation. Custom Actions. In your acion endpoint config file put:
action_endpoint: url: http://path-to.php/webhook
Simple PHP app
require "vendor/autoload.php"; use IBagayoko\RasaCoreSdk\Endpoint; use IBagayoko\RasaCoreSdk\Action; use IBagayoko\RasaCoreSdk\Events; class PhpAction extends Action { public function name() { return "action_php"; } public function run($dispatcher, $tracker, $domain) { $dispatcher->utter_message("Hello From Php"); return [Events::SlotSet("php", "up")]; } } // create a new endpoint with an array of customs actions $endpoint = new Endpoint([PhpAction::class]); switch ($_SERVER["PATH_INFO"]) { case '/health': $endpoint->health(); break; case '/webhook': $endpoint->webhook(); default: break; }
Laravel Usage
use IBagayoko\RasaCoreSdk\Endpoint; use IBagayoko\RasaCoreSdk\Action; use IBagayoko\RasaCoreSdk\Events; class PhpAction extends Action { public function name() { return "action_php"; } public function run($dispatcher, $tracker, $domain) { $dispatcher->utter_message("Hello From Php"); return [Events::SlotSet("php", "up")]; } } // create a new endpoint with an array of customs actions $endpoint = new Endpoint([PhpAction::class]); Route::get('/health', function () use($endpoint) { return $endpoint->health(); }); Route::post('/webhook', function () use($endpoint) { return $endp->webhook(); });
License
Licensed under the Apache License, Version 2.0. Copy of the license.
ibagayoko/rc_sdk_php 适用场景与选型建议
ibagayoko/rc_sdk_php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 12 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「Rasa Core SDK」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ibagayoko/rc_sdk_php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ibagayoko/rc_sdk_php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ibagayoko/rc_sdk_php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Contao Open Source CMS
DiZed Team Core module for the Magento 2 project
Core library that defines common interfaces used by the rest of the intahwebz..
Copona Core
The Core Framework for MightyPHP Framework
Core Module
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2018-12-30