1.0.0 • Published 5 months ago

@sryden/tenon v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

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',
});
1.0.0

5 months ago