1.0.2 • Published 11 months ago

clashai v1.0.2

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

ClashAI API Wrapper

An easy-to-use Api Wrapper for the ClashAI API.

❗ Currently only supports Chat GPT Models

Installation

npm install clashai

Usage

TypeScript

import { GPT } from 'clashai';
const client = new GPT('your-api-key', 'gpt-4o');
(async () => {
    const response = await client.ask("Hello how are you?", [{ role: "system", content: "You are a friendly chatbot developed in typescript. You use emojis in your answers." }]);
    console.log(response.choices[0].message.content);
})();

JavaScript

const { GPT } = require('clashai');
const client = new GPT('your-api-key', 'gpt-4o');
(async () => {
    const response = await client.ask("Hello how are you?", [{ role: "system", content: "You are a friendly chatbot developed in javascript. You use emojis in your answers." }]);
    console.log(response.choices[0].message.content);
})();
1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago