PHPackages                             pfinalclub/coze\_sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. pfinalclub/coze\_sdk

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

pfinalclub/coze\_sdk
====================

Coze AI PHP 版本的 SDK - 完整的聊天、机器人管理和流式处理功能

1.0.0(9mo ago)871MITPHPPHP ^8.2

Since Jul 28Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/pfinalclub/code_sdk)[ Packagist](https://packagist.org/packages/pfinalclub/coze_sdk)[ Docs](https://github.com/pfinalclub/coze_sdk)[ GitHub Sponsors](https://github.com/pfinalclub/coze_sdk)[ RSS](/packages/pfinalclub-coze-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (8)Versions (2)Used By (0)

Coze AI PHP SDK
===============

[](#coze-ai-php-sdk)

[![](https://raw.githubusercontent.com/pfinal-nc/iGallery/master/pkg/20240719204051.png)](https://raw.githubusercontent.com/pfinal-nc/iGallery/master/pkg/20240719204051.png)

[![PHP Version](https://camo.githubusercontent.com/c5e8da782b1a0673c08b4f474108036d2cc973470eed2d5d89d48e8c8475eee6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e322d626c75652e737667)](https://php.net)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)[![Tests](https://camo.githubusercontent.com/3ab4882a1b7d64e5eb5168ad0b0b9cdfd53f59f114ee5f727958504214a5789c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d70617373696e672d627269676874677265656e2e737667)](tests/)

一个功能完整、设计优雅的 Coze AI 平台 PHP SDK，提供机器人管理、聊天对话、会话管理等核心功能。

✨ 特性
----

[](#-特性)

- 🚀 **高性能**: 基于 Symfony HTTP Client，支持连接池和并发请求
- 🔐 **安全认证**: 完整的 JWT Bearer 认证机制，自动令牌刷新
- 💾 **智能缓存**: 多层缓存策略，提升性能和稳定性
- 📝 **详细日志**: 完整的日志记录系统，便于调试和监控
- 🛡️ **类型安全**: 完整的 PHP 8.2+ 类型声明
- 🧪 **测试覆盖**: 全面的单元测试和集成测试
- 🔧 **易于扩展**: 模块化设计，易于扩展和维护

📦 安装
----

[](#-安装)

```
composer require pfinalclub/coze_sdk
```

🚀 快速开始
------

[](#-快速开始)

### 基本配置

[](#基本配置)

```
