5.0.0-beta.3 • Published 4 months ago
rsnchat v5.0.0-beta.3
This package for AI chats and AI images.
Installation
Installation For CLI
npm i -g rsnchat
Installation
npm i rsnchat
APIKEY
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!
Usage Available Models
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);
});
Usage Chat Completion
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);
});
Usage Image Generation
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);
});
Usage Check NSFW
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
5.0.0-beta.2
5 months ago
5.0.0-beta.3
4 months ago
5.0.0-beta.1
5 months ago
4.0.1
1 year ago
4.0.0
1 year ago
3.0.10
1 year ago
3.0.9
1 year ago
3.0.8
1 year ago
3.0.7
1 year ago
3.0.6
1 year ago
3.0.4
1 year ago
3.0.2
1 year ago
3.0.1
1 year ago
3.0.5
1 year ago
3.0.0
1 year ago
2.0.7
1 year ago
2.0.6
1 year ago
2.0.5
1 year ago
2.0.3
2 years ago
2.0.2
2 years ago
2.0.4
2 years ago
2.0.1
2 years ago
2.0.0
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago