JSPM

  • Created
  • Published
  • Downloads 94
  • Score
    100M100P100Q89136F
  • License ISC

Equos.ai node.js official SDK.

Package Exports

  • @equos/node-sdk
  • @equos/node-sdk/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@equos/node-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@equos/node-sdk

Equos.ai official node js SDK.

Prerequisites

  • Go to Equos Studio.
  • Create an organization.
  • Create an API Key.

Installation

npm install @equos/node-sdk

Usage

import { Equos } from '@equos/node-sdk';

const MY_API_KEY = ''

const  client = Equos.client(MY_API_KEY);


// Create an avatar.
const referenceImageAsDataUrl: string = 'data:...';
const avatar = await client.avatars.create('Equos Avatar', referenceImageAsDataUrl);
console.log(avatar);

// Start a session.

const sessionOptions = {
    name: 'Equos Session',
    agent: {
        instructions: 'You are a Korean teacher...'
    },
    avatar: {
        id: avatar.id // or create one on the fly with referenceImage.
    },
    consumerIdentity: {
        identity: 'client-identity',
        name: 'Client Name'
    }
}

const result = await client.sessions.create(sessionOptions);

console.log(result.session);
console.log(result.consumerAccessToken);