@sryden/tenon
v1.0.0
Published
Node.js module for interacting with the SRYDEN Tenon API
Downloads
6
Readme
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',
});