# tencent-ai **Repository Path**: khs1994-php/tencent-ai ## Basic Information - **Project Name**: tencent-ai - **Description**: Tencent AI SDK - **Primary Language**: PHP - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 6 - **Forks**: 0 - **Created**: 2018-04-09 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: ai **Tags**: None ## README # Tencent AI SDK [![GitHub stars](https://img.shields.io/github/stars/khs1994-php/tencent-ai.svg?style=social&label=Stars)](https://github.com/khs1994-php/tencent-ai) [![PHP from Packagist](https://img.shields.io/packagist/php-v/khs1994/tencent-ai.svg)](https://packagist.org/packages/khs1994/tencent-ai) [![GitHub (pre-)release](https://img.shields.io/github/release/khs1994-php/tencent-ai/all.svg)](https://github.com/khs1994-php/tencent-ai/releases) [![Build Status](https://travis-ci.org/khs1994-php/tencent-ai.svg?branch=master)](https://travis-ci.org/khs1994-php/tencent-ai) [![StyleCI](https://styleci.io/repos/115306597/shield?branch=master)](https://styleci.io/repos/115306597) [![codecov](https://codecov.io/gh/khs1994-php/tencent-ai/branch/master/graph/badge.svg)](https://codecov.io/gh/khs1994-php/tencent-ai) - [Tencent AI](https://ai.qq.com) - [Official Documents](https://ai.qq.com/doc/index.shtml) - [Documents](https://khs1994-php.github.io/tencent-ai/) ## 微信订阅号

关注项目作者微信订阅号,接收项目最新动态

# Installation To Use Tencent AI SDK, simply: ```bash $ composer require khs1994/tencent-ai ``` For latest commit version: ```bash $ composer require khs1994/tencent-ai dev-master ``` ## Usage ```php face()->detect($image); } catch (TencentAIException $e) { $result = $e->getExceptionAsArray(); } // default return array var_dump($result); ``` ## Laravel ```bash $ php artisan vendor:publish --tag=config ``` Then edit config in `config/tencent-ai.php` ```php detect($image); // call by helper function // tencent_ai()->face()->detect($image); } catch (TencentAIException $e) { $result = $e->getExceptionAsArray(); } // default return array var_dump($result); // use DI class AI { public $tencent_ai; public function __construct(\TencentAI\TencentAI $tencent_ai) { $this->tencent_ai = $tencent_ai; } public function demo() { $image = __DIR__.'/path/name.jpg'; return $this->tencent_ai->face()->detect($image); } } ``` ## Who use it? * [PCIT](https://github.com/khs1994-php/pcit) ## PHP CaaS **Powered By [khs1994-docker/lnmp](https://github.com/khs1994-docker/lnmp)**