PHPackages                             waimao/ai - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. waimao/ai

ActiveLibrarylibrary[Utility &amp; Helpers](/categories/utility)

waimao/ai
=========

优雅的ai客户端

1.0.6(6y ago)0242MITPHPPHP &gt;=7.0

Since Dec 20Pushed 6y agoCompare

[ Source](https://github.com/reddrake/ai)[ Packagist](https://packagist.org/packages/waimao/ai)[ RSS](/packages/waimao-ai/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (2)Versions (8)Used By (2)

基于crisen/ai 做的衍生版本，如要使用BAIDU\_AI，请使用crisen/ai的包
===============================================

[](#基于crisenai-做的衍生版本如要使用baidu_ai请使用crisenai的包)

基于crisen/ai 做的衍生版本，如要使用BAIDU\_AI，请使用crisen/ai的包

优雅的AI客户端调用
==========

[](#优雅的ai客户端调用)

官方的sdk用起来的感觉实在是太忧伤了,换一种更好的调用方式吧

特点
--

[](#特点)

- 优雅的调用方式
- 仅支持php 7.0以上版本
- 参数兼容原生接口
- 隐藏了开发者不需要关注的细节
- 高度抽象的类
- 符合psr4标准 方便集成到各种项目中

支持的平台
-----

[](#支持的平台)

- 百度AI平台
- 腾讯AI平台

安装
--

[](#安装)

```
composer require  "waimao/ai":"^1.0.0"

```

laravel框架,请点击[这里](https://github.com/reddrake/laravel-ai)

使用示例
----

[](#使用示例)

```
use Waimao\AI\AI;

...

//百度ai
$baiduConfig = [
     'app_id' => 'your appid',
     'api_key' => 'your api key',
     'secret_key' => 'your secret key'
];
$ai = AI::baidu($baiduConfig);
//腾讯ai
$tencentConfig = [
     'app_id' => 'your appid',
     'app_key' => 'your secret id',
];
$ai = AI::tencent($tencentConfig);

// 图片检索
$url = 'http://aip.bdstatic.com/portal/dist/1543924308745/ai_images/logo.png';
$res = 	$ai->face()->url($url)->detect();
if($res->success()){
    var_dump($res->toArray())
}else{
    var_dump($res->getErrMsg());
}
```

文档
--

[](#文档)

[详细文档](https://doc.crisen.org/ai)

LICENSE
-------

[](#license)

[MIT](LICENSE)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 91.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~27 days

Recently: every ~40 days

Total

7

Last Release

2536d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ec1ff71c5100abbc637c06479650482967ecfb4d57862bf19acae985a05f0a1?d=identicon)[reddrake](/maintainers/reddrake)

---

Top Contributors

[![crisenchou](https://avatars.githubusercontent.com/u/16332040?v=4)](https://github.com/crisenchou "crisenchou (53 commits)")[![reddrake](https://avatars.githubusercontent.com/u/4412977?v=4)](https://github.com/reddrake "reddrake (4 commits)")[![foundVanting](https://avatars.githubusercontent.com/u/16233666?v=4)](https://github.com/foundVanting "foundVanting (1 commits)")

---

Tags

ai clientbaidu aitencent-ai

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/waimao-ai/health.svg)

```
[![Health](https://phpackages.com/badges/waimao-ai/health.svg)](https://phpackages.com/packages/waimao-ai)
```

###  Alternatives

[crisen/ai

优雅的ai客户端

265.5k1](/packages/crisen-ai)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
