nixaut-ai

1.0.4 • Public • Published

nixaut-ai

nixaut-ai is a powerful module designed to simplify AI-based chat, translation, and image generation tasks.

Features

  • Chat Completion: Interact with users using your custom AI model for engaging conversations.
  • Translation: Instantly translate text and break down language barriers.
  • Image Generation: Create stunning and creative visuals with ease.

Installation

You can easily install the module using npm:

npm install nixaut-ai@latest

Usage

Here are some examples demonstrating how to use the module:

Chat Completion

const { AI } = require("nixaut-ai");

const client = new AI({ debugMode: false });

client.chat.create({
  model: "gpt-4-32k",
  messages: [{ role: "user", content: "Hello!" }]
}).then(chatCompletion => {
  console.log("Chat Completion Response:", chatCompletion);
}).catch(error => {
  console.error("Error during chat completion:", error);
});

Translation

const { AI } = require("nixaut-ai");

const client = new AI({ debugMode: false });

client.translation.translate({
  text: "hello",
  language: "en"
}).then(translation => {
  console.log("Translation Response:", translation);
}).catch(error => {
  console.error("Error during translation:", error);
});

Image Generation

const { AI } = require("nixaut-ai");

const client = new AI({ debugMode: false });

client.images.generate({
  model: "dall-e-2",
  prompt: "cat"
}).then(imageGeneration => {
  console.log("Image Generation Response:", imageGeneration);
}).catch(error => {
  console.error("Error during image generation:", error);
});

Available Models

Chat Completion Models

  • gpt-4-32k
  • gpt-4
  • gpt-3.5-turbo
  • gpt-3.5-turbo-16k
  • gemini-pro
  • gpt-4-0613
  • gpt-4-0314
  • gpt-4-32k-0314
  • gpt-3.5-turbo-0613
  • gpt-3.5-turbo-16k-0613
  • gpt-3.5-turbo-0301
  • text-davinci-003
  • text-davinci-002
  • code-davinci-002
  • gpt-3
  • text-curie-001
  • text-babbage-001
  • text-ada-001

Image Generation Models

  • dall-e-2
  • stable-diffusion-1.5
  • stable-diffusion-2.1
  • sdxl-turbo
  • sdxl-lora

Elevate your AI applications with this module. Everything you need is right here!

Package Sidebar

Install

npm i nixaut-ai

Weekly Downloads

2

Version

1.0.4

License

ISC

Unpacked Size

10.6 kB

Total Files

3

Last publish

Collaborators

  • utiric