Package Exports
- hercai
- hercai/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hercai) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Herc.ai
A powerful library for interacting with the Herc.ai API.
We Offer It To You For Free. Herc.ai Answers Your Question According To The Language, And It Supports All Languages.
Question API; https://hercai.onrender.com/v2/hercai?question=
Text To Image API; https://hercai.onrender.com/v2/text2image?prompt=
❔ Support
📂 NPM
📝 Github
Example On CLI
Installation
🔲 Installation For CLI
npm i hercai -g
📂 Installation
npm i hercai
Quick Example
Example Question For CommonJS;
/* Importing The Package */
const { Hercai } = require('hercai');
const herc = new Hercai();
/* Available Models */
/* "v2" , "beta" , "v3-beta" */
/* Default Model; "v2" */
herc.question({model:"v2",content:"hi, how are you?"}).then(response => {
console.log(response.reply);
/* The module will reply based on the message! */
});
Example Draw Image For CommonJS;
/* Importing The Package */
const { Hercai } = require('hercai');
const herc = new Hercai();
/* Available Models */
/* "v1" , "v2" , "v2-beta" , "v3" (DALL-E) , "lexica" , "prodia" */
/* Default Model; "v2" */
herc.drawImage({model:"v2",prompt:"anime girl"}).then(response => {
console.log(response.url);
/* The module will reply based on the prompt! */
});
Example Interface And Usage For TypeScript;
import { Hercai, QuestionData, DrawImageData } from "hercai";
const herc = new Hercai();
/* Question Example For TypeScript */
herc.question({model:"v2",content:"hi, how are you?"})
.then((response:QuestionData) => {
console.log(response.reply);
});
/* DrawImage Example For TypeScript */
herc.drawImage({model:"v2",prompt:"anime girl"})
.then((response:DrawImageData) => {
console.log(response.url);
});
Example CLI Command Usage;
hercai <Your Question>
Herc.ai Also Supports TypeScript And EsModule 🥳!
Credits
Made by FiveSoBes And Luppux Development