@termsheetai/ethan-abilities-sdk
v0.0.1
Published
Welcome to the EthanAbilitiesSdk! This library provides functionality to interact with Ethan's abilities.
Downloads
149
Readme
EthanAbilitiesSdk
Welcome to the EthanAbilitiesSdk! This library provides functionality to interact with Ethan's abilities.
Installation
You can install the EthanAbilitiesSdk via npm:
npm install @termsheetai/ethan-abilities-sdk
Usage
Once installed, you can create an instance of the EthanAiAbility Class in your application with your apiKey.
import { EthanAiAbility } from "@termsheetai/ethan-abilities-sdk";
const ethanAiAbilityObject = new EthanAiAbility(apiKey: string);
Functionality
The instance of EthanAiAbility exposes the following function
useEthanAbility(ability_slug: string, input: any)
This Promise function is used to trigger Ethan's abilities for a specific ability. It accepts two parameters:
ability_slug
: A string representing the slug of the ability for which Ethan's ability will be used.input
: An object containing input data required for the specified ability.
Example
import { EthanAiAbility } from "@termsheetai/ethan-abilities-sdk";
const ethanAiAbilityObject = new EthanAiAbility(apiKey: string);
ethanAiAbilityObject.useEthanAbility('ability_slug', { /* input data */ })
.then(response=>{
console.log(response);
})
.catch(error=>{
console.log(error);
})