https://github.com/rsnlabs/rsnchat-js
A package for interacting with GPT4-based chat services, OpenChat, Bard, Gemini, Bing, LlaMa, CodeLlama, Mixtral, Claude, Naomi, Prodia, Kandinsky, Absolutebeauty, Sdxl, Dalle and AI Icon
https://github.com/rsnlabs/rsnchat-js
ai artificial-intelligence chat chatbot
Last synced: over 1 year ago
JSON representation
A package for interacting with GPT4-based chat services, OpenChat, Bard, Gemini, Bing, LlaMa, CodeLlama, Mixtral, Claude, Naomi, Prodia, Kandinsky, Absolutebeauty, Sdxl, Dalle and AI Icon
- Host: GitHub
- URL: https://github.com/rsnlabs/rsnchat-js
- Owner: rsnlabs
- License: mit
- Created: 2024-01-04T12:34:15.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-02T09:47:19.000Z (about 2 years ago)
- Last Synced: 2024-10-20T03:46:48.511Z (over 1 year ago)
- Topics: ai, artificial-intelligence, chat, chatbot
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/rsnchat
- Size: 61.5 KB
- Stars: 11
- Watchers: 0
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
RsnChat
The ultimate AI-powered RsnChat
This package for AI chats and AI images.
## Installation
**Installation For CLI**
```bash
npm i -g rsnchat
```
**Installation**
```bash
npm i rsnchat
```
# APIKEY
Discord : [https://api.rnilaweera.lk/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
```javascript
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
```javascript
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
```javascript
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
```javascript
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**
```hs
rsnchat
```