Comparing version 12.0.1 to 12.1.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const axios = require('axios'); | ||
const axios = require('axios').default; | ||
const baseurl = "https://hercai.onrender.com/v3/hercai"; | ||
@@ -30,2 +30,3 @@ | ||
* @param {string} content The Question You Want to Ask Artificial Intelligence. | ||
* @param {string} personality It includes the features that you want to be included in the output you want from artificial intelligence. | ||
* @example client.question({model:"v3-beta",content:"how are you?"}) | ||
@@ -36,3 +37,3 @@ * @type {string} The Question You Want to Ask Artificial Intelligence. | ||
*/ | ||
async question({model = "v3",content}){ | ||
async question({model = "v3",content,personality=""}){ | ||
if(!["v3","gemini","v3-32k","turbo","turbo-16k"].some(ind => model == ind)) model = "v3"; | ||
@@ -44,4 +45,7 @@ if(!content || content == undefined || content == null)throw new Error("Please specify a question!"); | ||
"content-type": "application/json", | ||
"Authorization": this.apiKey | ||
"Authorization": this.apiKey, | ||
}, | ||
data:{ | ||
personality: personality | ||
} | ||
}) | ||
@@ -64,6 +68,5 @@ return api.data; | ||
*/ | ||
async drawImage({model = "v3",prompt,negative_prompt}){ | ||
async drawImage({model = "v3",prompt,negative_prompt=""}){ | ||
if(!["v1","v2","v2-beta","v3","lexica","prodia","simurg","animefy","raava","shonin"].some(ind => model == ind)) model = "prodia"; | ||
if(!prompt || prompt == undefined || prompt == null)throw new Error("Please specify a prompt!"); | ||
if(!negative_prompt || negative_prompt == undefined || negative_prompt == null) negative_prompt = ""; | ||
try{ | ||
@@ -70,0 +73,0 @@ var api = await axios.get(`https://hercai.onrender.com/${model}/text2image`+"?prompt="+encodeURI(prompt)+"&negative_prompt="+encodeURI(negative_prompt),{ |
@@ -8,2 +8,3 @@ "use strict"; | ||
Hercai: require('./hercai'), | ||
version: packs.version, | ||
} | ||
@@ -10,0 +11,0 @@ async function versionControl(version){ |
@@ -634,4 +634,4 @@ GNU GENERAL PUBLIC LICENSE | ||
<one line to give the program's name and a brief idea of what it does.> | ||
Copyright (C) <year> <name of author> | ||
Hercai | ||
Copyright (C) 2023 Bes-js / beykant | ||
@@ -656,3 +656,3 @@ This program is free software: you can redistribute it and/or modify | ||
<program> Copyright (C) <year> <name of author> | ||
Hercai Copyright (C) 2023 Bes-js / beykant | ||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. | ||
@@ -659,0 +659,0 @@ This is free software, and you are welcome to redistribute it |
{ | ||
"name": "hercai", | ||
"version": "12.0.1", | ||
"version": "12.1.0", | ||
"description": "A powerful library for interacting with the Herc.ai API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
<p align="center"> <a href="#"> <img width=500 src="https://raw.githubusercontent.com/Bes-js/herc.ai/main/hercai-logo.png"></a></p> | ||
<p align="center"><a href="https://nodei.co/npm/hercai/"><img src="https://nodei.co/npm/hercai.png"></a></p> | ||
<p align="center"> <a href="https://render.com?ref=hercai"> <img width=200 height=90 src="https://raw.githubusercontent.com/Bes-js/herc.ai/main/render-logo.png"></a> </p> | ||
<p align="center"><img src="https://img.shields.io/npm/v/hercai?style=for-the-badge"> <img src="https://img.shields.io/github/repo-size/Bes-js/herc.ai?style=for-the-badge"> <img src="https://img.shields.io/npm/l/hercai?style=for-the-badge"> <img src="https://img.shields.io/npm/dt/hercai?style=for-the-badge"> <img src="https://img.shields.io/github/contributors/Bes-js/herc.ai?style=for-the-badge"> <img src="https://img.shields.io/github/package-json/dependency-version/Bes-js/herc.ai/axios?style=for-the-badge"> <a href="https://discord.gg/luppux" target="_blank"> <img alt="Discord" src="https://img.shields.io/badge/Support-Click%20here-7289d9?style=for-the-badge&logo=discord"> </a><a href="https://www.buymeacoffee.com/beykant" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" width="120px" height="30px" alt="Buy Me A Coffee"></a></p> | ||
@@ -17,2 +17,3 @@ | ||
### 📂 [NPM](https://npmjs.com/hercai) | ||
### 📖 [Document's](https://fivesobes.gitbook.io/hercai/) | ||
### 📝 [Github](https://github.com/Bes-js/herc.ai) | ||
@@ -35,3 +36,6 @@ | ||
```bash | ||
npm i hercai | ||
npm i hercai | ||
yarn add hercai | ||
pnpm add hercai | ||
bun add hercai | ||
``` | ||
@@ -53,2 +57,3 @@ # | ||
/* Default Model; "v3" */ | ||
/* Premium Parameter; personality => Optional */ | ||
herc.question({model:"v3",content:"hi, how are you?"}).then(response => { | ||
@@ -55,0 +60,0 @@ console.log(response.reply); |
import Hercai from "./src/hercai"; | ||
import {version} from "../package.json"; | ||
@@ -17,3 +18,4 @@ type QuestionData = { | ||
QuestionData, | ||
DrawImageData | ||
DrawImageData, | ||
version | ||
}; |
@@ -19,2 +19,3 @@ export = Hercai; | ||
* @param {string} content The Question You Want to Ask Artificial Intelligence. | ||
* @param {string} personality It includes the features that you want to be included in the output you want from artificial intelligence. | ||
* @example client.question({model:"v3-beta",content:"how are you?"}) | ||
@@ -25,3 +26,3 @@ * @type {string} The Question You Want to Ask Artificial Intelligence. | ||
*/ | ||
question(object:{model:"v3"|"v3-32k"|"turbo"|"turbo-16k"|"gemini",content:string}):Promise<{content:string,reply:string}>; | ||
question(object:{model:"v3"|"v3-32k"|"turbo"|"turbo-16k"|"gemini",content:string,personality:string|""}):Promise<{content:string,reply:string}>; | ||
@@ -28,0 +29,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49863
10
156
118