Giter Club home page Giter Club logo

herc.ai's Introduction

Discord Buy Me A Coffee

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.

✨ How about a one-time subscription to benefit from Hercai's features unlimitedly? ✨ Use Hercai Unlimited with API Key!

📂 NPM

📝 Github

Example On CLI

Installation

🔲 Installation For CLI

npm i hercai -g

📂 Installation

npm i hercai
yarn add hercai
pnpm add hercai
bun add hercai

Quick Example

Question API; https://hercai.onrender.com/v3/hercai?question=

Example Question For CommonJS;

/* Importing The Package */
const { Hercai } = require('hercai');

const herc = new Hercai(); //new Hercai("your api key"); => Optional

/* Available Models */
/* "v3" , "v3-32k" , "turbo" , "turbo-16k" , "gemini" */
/* Default Model; "v3" */
/* Premium Parameter; personality => Optional */
herc.question({model:"v3",content:"hi, how are you?"}).then(response => {
console.log(response.reply);
/* The module will reply based on the message! */

});

Text To Image API; https://hercai.onrender.com/v3/text2image?prompt=

Example Draw Image For CommonJS;

/* Importing The Package */
const { Hercai } = require('hercai');

const herc = new Hercai(); //new Hercai("your api key"); => Optional

/* Available Models */
/* "v1" , "v2" , "v2-beta" , "v3" (DALL-E) , "lexica" , "prodia", "simurg", "animefy", "raava", "shonin" */
/* Default Model; "v3" */
herc.drawImage({model:"v3",prompt:"anime girl",negative_prompt:""}).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(); //new Hercai("your api key"); => Optional

/* Question Example For TypeScript */
herc.question({model:"v3",content:"hi, how are you?"})
.then((response:QuestionData) => {
console.log(response.reply);
});

/* DrawImage Example For TypeScript */
herc.drawImage({model:"v3",prompt:"anime girl",negative_prompt:""})
.then((response:DrawImageData) => {
console.log(response.url);
});

Example CLI Command Usage;

hercai <Your Question>

Herc.ai Also Supports TypeScript And EsModule 🥳!

Example Beta Model's Usage;

import { Hercai } from "hercai";

const herc = new Hercai(); //new Hercai("your api key"); => Optional


herc.betaQuestion({content:"hi, how are you?",user:'chat-id'})
.then((response) => {
console.log(response.reply);
});

/* DrawImage Example */
herc.betaDrawImage({
prompt:"anime girl",
negative_prompt:"", 
sampler:"DPM-Solver", /* Default => DPM-Solver */
image_style:"Null", /* Default => Null */
width:1024, /* Default => 1024 */
height:1024, /* Default => 1024 */
steps:20, /* Default => 20 */
scale:5 /* Default => 5 */
}).then((response) => {
console.log(response.url);
});

Credits

Made by FiveSoBes And Luppux Development

Contact & Support & Donate

Buy Me A Coffee

Discord Banner

herc.ai's People

Contributors

bes-js avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

herc.ai's Issues

413 Issue

I keep getting this error when using the NPM package on a question. Code is funcitoning 100%, I'm sure.

error - Error: Error: Request failed with status code 500
    at Hercai.question (node_modules\hercai\hercai.js:42:7)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async summarizeTranscript (webpack-internal:///(api)/./src/pages/api/summarize.ts:62:22)
    at async handler (webpack-internal:///(api)/./src/pages/api/summarize.ts:95:21)
    at async Object.apiResolver (node_modules\next\dist\server\api-utils\node.js:363:9)
    at async DevServer.runApi (node_modules\next\dist\server\next-server.js:488:9)
    at async Object.fn (node_modules\next\dist\server\next-server.js:750:37)
    at async Router.execute (node_modules\next\dist\server\router.js:253:36)
    at async DevServer.run (node_modules\next\dist\server\base-server.js:384:29)
    at async DevServer.run (node_modules\next\dist\server\dev\next-dev-server.js:741:20)
    at async DevServer.handleRequest (node_modules\next\dist\server\base-server.js:322:20) {
  page: '/api/summarize'
}```

Error: Request failed with status code 500

I'm trying to run the simple example in the readme file.

/* 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! */

});

I get Error: Request failed with status code 500
Are there temp issues? Does it usually work? Should i try later?

Request

Hello, can you help me for my commercial chatbot , just i wanna do some personalization on the params to the api. So i just know if i can have my own api server like yours on render? Pls

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.