@sryden/tenon

1.0.0 • Public • Published

SRYDEN Tenon

Node.js module for interacting with the SRYDEN Tenon API.

Installation

npm install @sryden/tenon

Usage

const tenon = require('@sryden/tenon');

// Example for chat
tenon.chat({
  model: 'tenon-5',
  history: ['msg1', 'msg2'],
})
  .then(response => {
    console.log(response);
  })
  .catch(error => {
    console.error(error);
  });

// Example for create
tenon.create({
  model: 'tenon-5',
  message: 'Message for the AI model here',
})
  .then(response => {
    console.log(response);
  })
  .catch(error => {
    console.error(error);
  });

Configuration

Before using the module, you need to configure it with your Tenon API key using the configure function.

tenon.configure({
  apiKey: 'tenon_xxxxxxxxxxxxxxxxxxxx',
});

Readme

Keywords

Package Sidebar

Install

npm i @sryden/tenon

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

2.15 kB

Total Files

3

Last publish

Collaborators

  • halex