The ultimate AI-powered RsnChat
This package for AI chats and AI images.
Installation For CLI
npm i -g rsnchat
Installation
npm i rsnchat
Discord : https://api.rnilaweera.lk/discord
Join discord server and create account with /register slash command and get your apikey with /generate-key slash command for free!
const { RsnChat } = require("rsnchat");
const rsnchat = new RsnChat("rsnlabs_××××××××××××××××××××××××××××××");
rsnchat.getModels().then((models) => {
console.log("Active Chat Models:", models.chatModels);
console.log("Active Image Models:", models.imageModels);
}).catch((error) => {
console.error(error.message);
});
const { RsnChat } = require("rsnchat");
const rsnchat = new RsnChat("rsnlabs_××××××××××××××××××××××××××××××");
const prompt = "Hello, what is your name?"
const model = "gemini" // gpt, grok-2, llama, etc... (https://api.rnilaweera.lk/api/models)
rsnchat.chat(prompt, model).then((response) => {
console.log(response);
}).catch((error) => {
console.error(error.message);
});
const { RsnChat } = require("rsnchat");
const rsnchat = new RsnChat("rsnlabs_××××××××××××××××××××××××××××××");
const prompt = "beautiful girl";
const model = "flux"; // rsnlabs, photograpy, etc... (https://api.rnilaweera.lk/api/models)
rsnchat.image(prompt, model).then((response) => {
console.log(response);
}).catch((error) => {
console.error(error.message);
});
const { RsnChat } = require("rsnchat");
const rsnchat = new RsnChat("rsnlabs_××××××××××××××××××××××××××××××");
const image_url = "";
rsnchat.checkNSFW(image_url).then((response) => {
console.log(response);
}).catch((error) => {
console.error(error.message);
});
Example CLI Command
rsnchat