본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

Tbox

원문 보기 위키 갱신

Ant Design X로 만든 애플리케이션에 Tbox 에이전트 서비스를 통합하는 방법을 소개하는 가이드예요.

출처: 문서

본문

관련 문서

tbox-nodejs-sdk

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);
});

tbox-nodejs-sdk를 X SDK와 통합하기

URL로 에이전트를 통합하는 것은 X SDK가 제공하는 기본 기능이에요. 자세한 내용은 X SDK를 참고하고, 완전한 Tbox 템플릿은 Template - Tbox를 확인해 주세요.

예제

더 알아보기

에이전트 데모는 Tbox 플레이그라운드 문서에서 확인할 수 있어요.