Introduction
Welcome to Nextify.js, your go-to multipurpose npm package designed to simplify development tasks. If you encounter any issues or need assistance, feel free to reach out on Discord: koushik0p
(ID: 1050641070368772166
).
Key Features
- NextChat: Effortlessly interact with a range of AI models without requiring an API key.
- Http: Simplify the process of making HTTP requests.
- NsfwFilter: Accurately detect NSFW content from images.
- NextRL: Develop interactive CLI tools with ease.
- Rectify: Build web applications with an optimized, Express.js-like framework.
Usage
NextChat
Interact with AI models for text and image generation.
Click Here
const { nextchat } = require("nextify.js");
(async () => {
const options = {
model: "bard",
cache: true
};
const resp = await nextchat.ask("Hello, what's your name?", options);
console.log(resp);
})();
const { nextchat } = require("nextify.js");
(async () => {
const resp = await nextchat.imagine("a cute cat");
console.log(resp);
})();
Http
Execute HTTP requests with customizable options.
Click Here
const { http } = require("nextify.js");
(async () => {
const resp = await http.fetch("Your_Url", {
method: "get",
auth: "Bearer Your_Token",
data: { prompt: "hello" },
params: { prompt: "hello" }
});
console.log(resp);
})();
NsfwFilter
Filter images for NSFW content to ensure safety and compliance.
Click Here
const { nsfwfilter } = require("nextify.js");
(async () => {
const resp = await nsfwfilter.detect("Your_Image_URL");
if (resp.isNsfw) {
console.log("NSFW content detected");
} else {
console.log("Content is safe");
}
})();
NextRL
Create dynamic CLI tools for interactive sessions.
Click Here
const { NextRL } = require("nextify.js");
const rl = new NextRL();
function askName() {
rl.question('What is your name? ', (name) => {
if (name.toUpperCase() === 'EXIT') {
console.log('Goodbye!');
rl.close();
return;
}
console.log(`Hello, ${name}!`);
rl.close();
});
}
askName();
Rectify
Build web applications, an optimized framework for handling routes, middleware, and static files, similar to Express.js.
Click Here
const { Rectify } = require('nextify.js');
const path = require('path');
const app = new Rectify();
app.use(async (req, res, next) => {
console.log(`${req.method} ${req.url}`);
next();
});
app.route('GET', '/', async (req, res) => {
res.writeHead(200, { 'Content-Type': 'text/html' });
res.end('<h1>Welcome to Rectify Server</h1>');
});
app.route('GET', '/user/:id', async (req, res) => {
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ userId: req.params.id }));
});
app.serveStatic(path.join(__dirname, 'public'));
app.listen(3000);
Support
Need help? Join our Discord Community for support, discussions, and updates.