Download the PHP package simonetoo/coze without Composer

On this page you can find all versions of the php package simonetoo/coze. 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 coze

Coze PHP SDK

Coze PHP SDK为开发者提供了简单而灵活的方式来集成Coze AI平台的各种功能到PHP应用中。通过这个SDK,您可以轻松访问Coze的机器人、聊天、知识库、语音合成与识别等多种AI能力,而无需处理底层API的复杂性。

主要特性

安装

系统要求

通过Composer安装

配置

获取API密钥

在使用SDK之前,您需要从Coze平台获取API密钥:https://www.coze.cn/open/docs/developer_guides/pat

快速开始

基本用法

初始化客户端

所有与Coze API的交互都始于创建一个Coze客户端实例:

错误处理

SDK使用异常来处理错误。建议使用try-catch块来捕获和处理可能的异常:

使用示例

机器人(Bot)操作

获取机器人列表:

获取特定机器人信息:

文件(File)操作

上传文件:

获取文件信息:

音频(Audio)处理

语音合成(文本转语音):

语音识别(语音转文本):

语音(Voice)操作

获取可用音色列表:

复刻自定义音色:

工作空间(Workspace)操作

获取工作空间列表:

知识库(Knowledge)操作

获取知识库列表:

更多示例可以在SDK的examples目录中找到。

响应处理

SDK提供了几种响应类型来处理不同的API返回:

JsonResponse

大多数API调用返回JsonResponse对象,它提供了以下方法:

流式响应

某些API(如大型文件下载)可能返回流式响应,可以这样处理:

错误处理

SDK使用异常来处理错误。所有API相关的异常都继承自ApiException

贡献指南

查看贡献指南

许可证

MIT LICENSE


All versions of coze with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
guzzlehttp/guzzle Version ^7.0
psr/http-client Version ^1.0
psr/http-message Version ^1.0|^2.0
psr/http-factory Version ^1.0|^2.0
psr/log Version ^1.0|^2.0|^3.0
php-http/discovery Version ^1.15
php-http/multipart-stream-builder Version ^1.2
symfony/http-client Version ^6.0|^7.0
symfony/http-foundation Version ^5.0|^6.0|^7.0
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 simonetoo/coze contains the following files

Loading the files please wait ....