xsAI v0.3 "future base" is now available! Read Announcement
xsAI0.4.0-beta.3

Telemetry

xsAI Telemetry is experimental and may change in the future.

We may consider discontinuing Vercel AI SDK compatibility in the future and transitioning to full support for GenAI.

install sizeminified sizeminzipped size
npm i @xsai-ext/telemetry

Usage

@xsai/telemetry exports everything from xsai, so you can use it for overrides.

Currently, telemetry only supports generateText and streamText.

Simply switch the import.

- import { generateText, streamText } from 'xsai'
+ import { generateText, streamText } from '@xsai-ext/telemetry'

You can also configure additional telemetry options:

import {  } from '@xsai-ext/telemetry'
import {  } from 'node:process'

const  = 'You\'re a helpful assistant.'

const {  } = await ({
  : .!,
  : 'https://api.openai.com/v1/',
  : [
    {
      : , 
      : 'system'
    },
    {
      : 'Why is the sky blue?',
      : 'user'
    }
  ],
  : 'gpt-4o',
  : { 
    : { 
      : 'weather-assistant', 
      , 
    }, 
  }, 
})

On this page