Download the PHP package chatopera/sdk without Composer

On this page you can find all versions of the php package chatopera/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sdk

Chatopera Php SDK

https://bot.chatopera.com

低代码或无代码方式定制智能对话机器人!

Chatopera 提供聊天机器人开发者平台,Chatopera Php SDK 用于在 PHP 应用中集成聊天机器人服务

本教程介绍如何使用 Chatopera 机器人开发者平台的PHP SDK与机器人进行集成,阅读本教程需要 20 分钟时间。

安装

创建机器人

执行程序

帮助

更多 SDK

开源许可协议

安装

composer是一个优秀到 PHP 项目包管理工具,Chatopera PHP SDK 可通过 composer 直接下载,包文件发布在packagist

【注意】如果项目不使用composer管理,那么可直接下载安装Chatbot.php文件到项目中。

创建机器人

登录Chatopera聊天机器人平台

点击“立即使用”

第一登录输入“邮箱”和“密码”,点击“回车键”,完成账户创建。

创建聊天机器人

点击“创建机器人”,并填入下面各项:

项目 描述
机器人名称 小松 机器人的名字
描述 机器人示例 机器人的描述
语言 zh_CN 机器人的语言,目前支持中文(zh_CN)和英文(en_US)

【提示】其它项如兜底回复,问候语可以在创建后,设置页面修改。

下载知识库文件

下载知识库示例文件chatopera_faq_samples.json,保存文件名为chatopera_faq_samples.json

知识库文件格式

在该示例文件中,用 JSON 数组的形式存储了 100 个问答对,字段含义如下:

key type required description
categories [string] false 分类名称,支持层级比如 ["一级", "二级"],服务器端自动创建对应分类
enabled boolean true 是否启用,代表该问答对导入后是否支持来访者检索
post string true 问答对的标准问
replies [object] true 问答对的回答,数组长度大于 0, content是文本内容,rtypeplain表示content为纯文本; rtypehtml表示content为富文本
similarQuestions [string] false 问答对里的相似问

导入知识库

上传知识库文件

选择chatopera_faq_samples.json,这时,会显示问答对列表,点击“提交”,在进度条完成后,知识库导入成功。

测试知识库

知识库测试窗口

输入: 下雨天在屋外烧电焊注意什么

确认得到回复。

获取ClientIdSecret

集成机器人服务的方式是通过 SDK,每个机器人实例需要通过ClientIdSecret初始化,完成认证和授权。打开机器人【设置】页面,拷贝ClientIdSecret

显示Secret

执行示例程序

假设您已经:

  1. 准备好ClientIdSecret了;

  2. 安装了chatopera/sdk

那么,可以用以下代码测试。

返回结果示例

接口概述

各接口的详细描述请访问开发者平台文档中心

同时提供PHP Docs为使用参考。

贡献

单元测试

卸载

从项目中卸载 SDK。

更多 SDK

集成面板

开源许可协议

Copyright (2018-2021) 北京华夏春松科技有限公司

Apache License Version 2.0

Copyright 2018-2021, 北京华夏春松科技有限公司. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

chatoper banner


All versions of sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package chatopera/sdk contains the following files

Loading the files please wait ....