PHPackages                             wxbool/tengxunai - 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. [API Development](/categories/api)
4. /
5. wxbool/tengxunai

ActiveProject[API Development](/categories/api)

wxbool/tengxunai
================

快速接入，腾讯AI开发平台应用

116[1 issues](https://github.com/wxbool/TengxunAi/issues)PHP

Since Dec 11Pushed 7y agoCompare

[ Source](https://github.com/wxbool/TengxunAi)[ Packagist](https://packagist.org/packages/wxbool/tengxunai)[ RSS](/packages/wxbool-tengxunai/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Tengxunai
=========

[](#tengxunai)

Tengxunai 是一个开源的 非官方 SDK。

Tengxunai 用于快速接入[`腾讯开发AI平台`](https://ai.qq.com/) 中的应用

1. 系统要求
=======

[](#1-系统要求)

- PHP version &gt;= 5.4（推荐 7.1）
- PHP 组件: curl, json, mbstring, xml, zip

2. 安装
=====

[](#2-安装)

使用 composer:

$ composer require wxbool/tengxunai dev-master

3. 使用
=====

[](#3-使用)

获取全局实例
------

[](#获取全局实例)

```
use Tengxunai\App;

$config = [
    'appId'  => 123456789,
    'appKey' => '6vIdsfasdIgVv58tv',
];

$app = App::instance($config);

```

$app 是所有应用对象的集合，全局统一使用 $app 进行获取应用实例。

调用示例
----

[](#调用示例)

### a.基础文本分词

[](#a基础文本分词)

```
//获得 基础文本分词 应用
$textAnalysis = $app->textAnalysis;
//执行分词
$httpResult = $textAnalysis->wordSeg('侏罗纪世界2')

//输出分词文本
echo $httpResult->text();
//打印分词文本 混排词粒度分词列表
var_dump( $httpResult->mixTokens() );
//打印分词文本 基础词粒度分词列表
var_dump( $httpResult->baseTokens() );

```

### b.智能闲聊

[](#b智能闲聊)

```
//获得 智能闲聊 应用
$textChat = $app->textChat;
//执行 聊天
$httpResult = $textChat->textChat('你好啊');

//输出会话Id
echo $httpResult->session();
//输出回答文本
echo $httpResult->answer();

```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29696787?v=4)[Viggo](/maintainers/wxbool)[@wxbool](https://github.com/wxbool)

---

Top Contributors

[![wxbool](https://avatars.githubusercontent.com/u/29696787?v=4)](https://github.com/wxbool "wxbool (9 commits)")

### Embed Badge

![Health badge](/badges/wxbool-tengxunai/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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