Tbox
Tbox
This guide introduces how to integrate Tbox agent services into applications built with Ant Design X.
import { TboxClient } from 'tbox-nodejs-sdk';const client = new TboxClient({httpClientConfig: {authorization: 'Tbox-your-token-xxx',},});const stream = client.chat({appId: 'your-app-id',query: '今天杭州天气怎么样?',userId: 'user123',});stream.on('data', (data) => {console.log('Received data:', data);});stream.on('end', () => {console.log('Stream ended');});stream.on('error', (error) => {console.error('Stream error:', error);});
Using URL to integrate agents is a basic capability provided by X SDK. For details, see X SDK. For the complete Tbox template, see Template - Tbox.