Installation
To install the Latitude SDK, use your preferred package manager:
npm install @latitude-data/sdk
yarn add @latitude-data/sdk
pnpm add @latitude-data/sdk
Usage
To trace OpenAI calls with Latitude, you need to install the OpenAI SDK
and initialize the Latitude SDK with your API key:
import OpenAI from 'openai'
import { Latitude } from '@latitude-data/sdk'
new Latitude('your-api-key-here', {
telemetry: {
modules: {
openAI: OpenAI,
},
},
})