@latitude-data/sdk
TypeScript icon, indicating that this package has built-in type declarations

4.1.2 • Public • Published

Latitude SDK for Typescript & Javascript

npm install @latitude-data/sdk

Requires Node.js 20 or higher.

Go to the documentation to learn more.

Usage

import { Latitude, LatitudeOptions, RunPromptOptions } from '@latitude-data/sdk'

const sdk = new Latitude('my-api-key', {
  projectId: 'my-project-id',
  versionUuid: 'my-version-uuid',
})

await sdk.prompts.run('joke-teller', {
  parameters: { topic: 'Typescript' },
  onEvent: (event) => console.log(event),
  onFinished: (event) => console.log(event),
  onError: (error) => console.log(error),
  stream: true,
})

Find more examples.

Development

Requires npm 0.5.10 or higher.

  • Install dependencies: npm install
  • Add [dev] dependencies: npm install <package> [--save-dev]
  • Run linter: npm run lint
  • Run formatter: npm run format
  • Run tests: npm run test
  • Build package: npm run build

License

The SDK is licensed under the LGPL-3.0 License - read the LICENSE file for details.

Package Sidebar

Install

npm i @latitude-data/sdk

Weekly Downloads

881

Version

4.1.2

License

LGPL-3.0

Unpacked Size

634 kB

Total Files

8

Last publish

Collaborators

  • cesr
  • andresgutgon
  • csansoon
  • gerardclos
  • neoxelox