New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hercai

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hercai - npm Package Compare versions

Comparing version 12.1.1 to 12.2.0

53

CHANGELOG.md

@@ -0,17 +1,40 @@

# Version 12.2.0
Timestamp: Thu Feb 27 2024 01:33:55 GMT+0000 (Coordinated Universal Time)
> 🟢 Added
New Beta DrawImage and Question Models Added, Features They Offer;
Question; Memory System
DrawImage; Comprehensive Model Features and Better Quality Drawings
> 🔴 Removed
None
> 🔃 Changed
None
> 🪄 Patches
None
# Version 12.1.1
<Timestamp: Sat Jan 27 2024 20:40:54 GMT+0000 (Coordinated Universal Time)>
Timestamp: Sat Jan 27 2024 20:40:54 GMT+0000 (Coordinated Universal Time)
>> 🟢 Added
> 🟢 Added
None
>> 🔴 Removed
> 🔴 Removed
None
>> 🔃 Changed
> 🔃 Changed
None
>> 🪄 Patches
> 🪄 Patches

@@ -22,5 +45,5 @@ Bug Patch for TypeScript.

# Version 12.1.0
<Timestamp: 2024-01-18T20:46:09.034Z>
Timestamp: 2024-01-18T20:46:09.034Z
>> 🟢 Added
> 🟢 Added

@@ -30,11 +53,11 @@ Personality Parameter has been added to the Question Function, Thanks to this Parameter, You will be able to Personalize your AI Model.

>> 🔴 Removed
> 🔴 Removed
None
>> 🔃 Changed
> 🔃 Changed
Negative Prompt Parameter Structure Updated. (Codical Change)
>> 🪄 Patches
> 🪄 Patches

@@ -45,18 +68,18 @@ None

# Version 12.0.1
<Timestamp: Null>
Timestamp: Null
>> 🟢 Added
> 🟢 Added
None
>> 🔴 Removed
> 🔴 Removed
None
>> 🔃 Changed
> 🔃 Changed
None
>> 🪄 Patches
> 🪄 Patches
Api Key Not Detecting Error Has Been Fixed, And Api Key Structure Has Been Moved To Header.

@@ -82,4 +82,65 @@ "use strict";

/**
* This Model Is Still In Development And Beta Stage.
* The Question You Want to Ask Artificial Intelligence.
* @param {string} content The Question You Want to Ask Artificial Intelligence.
* @param {string} user It includes the features that you want to be included in the output you want from artificial intelligence.
* @example client.betaQuestion({content:"how are you?"})
* @type {string} The Question You Want to Ask Artificial Intelligence.
* @returns {Hercai}
* @async
*/
async betaQuestion({content,personality="",user=""}){
if(!content || content == undefined || content == null)throw new Error("Please specify a question!");
try{
var api = await axios.get(`https://hercai.onrender.com/beta/hercai?question=`+encodeURI(content)+`&user=`+encodeURI(user),{
headers: {
"content-type": "application/json",
"Authorization": this.apiKey,
},
data:{
personality: personality
}
})
return api.data;
}catch(err){
throw new Error("Error: "+ err.message)
}
}
/**
* This Model Is Still In Development And Beta Stage.
* Tell Artificial Intelligence What You Want to Draw.
* @param {string} prompt Tell Artificial Intelligence What You Want to Draw.
* @param {string} negative_prompt It includes the features that you do not want to be included in the output you want from artificial intelligence.
* @param {string} sampler "DPM-Solver" , "SA-Solver"
* @param {string} image_style "Cinematic" , "Photographic" , "Anime" , "Manga" , "Digital Art" , "Pixel art" , "Fantasy art" , "Neonpunk" , "3D Model" , "Null"
* @param {number} width The width of the image you want to draw.
* @param {number} height The height of the image you want to draw.
* @param {number} steps The number of steps you want to draw the image.
* @param {number} scale The scale of the image you want to draw.
* @example client.betaDrawImage({prompt:"anime girl"})
* @type {string} Tell Artificial Intelligence What You Want to Draw.
* @returns {Hercai}
* @async
*/
async betaDrawImage({prompt,negative_prompt="",sampler='DPM-Solver',image_style="Null",width=1024,height=1024,steps=20,scale=5}){
if(!["DPM-Solver","SA-Solver"].some(ind => sampler == ind)) sampler = "DPM-Solver";
if(!prompt || prompt == undefined || prompt == null)throw new Error("Please specify a prompt!");
try{
var api = await axios.get(`https://hercai.onrender.com/beta/text2image`+"?prompt="+encodeURI(prompt)+"&negative_prompt="+encodeURI(negative_prompt)+"&sampler="+encodeURI(sampler)+"&image_style="+encodeURI(image_style)+"&width="+width+"&height="+height+"&steps="+steps+"&scale="+scale,{
headers: {
"content-type": "application/json",
"Authorization": this.apiKey,
},
})
return api.data;
}catch(err){
throw new Error("Error: "+ err.message)
}
}
}
module.exports = Hercai;
{
"name": "hercai",
"version": "12.1.1",
"version": "12.2.0",
"description": "A powerful library for interacting with the Herc.ai API",

@@ -96,3 +96,13 @@ "main": "index.js",

"fivesobes",
"five"
"five",
"neonpunk",
"pixel-art",
"digital-art",
"manga",
"photographic",
"cinematic",
"3d",
"3d-model",
"beta",
"beta-model"
],

@@ -99,0 +109,0 @@ "repository": {

@@ -108,3 +108,31 @@ <p align="center"> <a href="#"> <img width=500 src="https://raw.githubusercontent.com/Bes-js/herc.ai/main/hercai-logo.png"></a></p>

**[Herc.ai](https://discord.gg/luppux) Also Supports TypeScript And EsModule 🥳!**
#
**Example Beta Model's Usage;**
```js
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);
});
```
#

@@ -111,0 +139,0 @@ # Credits

@@ -41,2 +41,31 @@ export = Hercai;

/**
* The Question You Want to Ask Artificial Intelligence.
* @param {string} content The Question You Want to Ask Artificial Intelligence.
* @param {string} user It includes the features that you want to be included in the output you want from artificial intelligence.
* @example client.betaQuestion({content:"how are you?"})
* @type {string} The Question You Want to Ask Artificial Intelligence.
* @returns {Hercai}
* @async
*/
betaQuestion(object:{content:string,user?:string|""}):Promise<{content:string,reply:string}>;
/**
* Tell Artificial Intelligence What You Want to Draw.
* @param {string} prompt Tell Artificial Intelligence What You Want to Draw.
* @param {string} negative_prompt It includes the features that you do not want to be included in the output you want from artificial intelligence.
* @param {string} sampler "DPM-Solver" , "SA-Solver"
* @param {string} image_style "Cinematic" , "Photographic" , "Anime" , "Manga" , "Digital Art" , "Pixel art" , "Fantasy art" , "Neonpunk" , "3D Model" , "Null"
* @param {number} width The width of the image you want to draw.
* @param {number} height The height of the image you want to draw.
* @param {number} steps The number of steps you want to draw the image.
* @param {number} scale The scale of the image you want to draw.
* @example client.betaDrawImage({prompt:"anime girl"})
* @type {string} Tell Artificial Intelligence What You Want to Draw.
* @returns {Hercai}
* @async
*/
betaDrawImage(object:{prompt:string,negative_prompt?:string|"",sampler?:'DPM-Solver'|'SA-Solver',image_style?:"Cinematic"|"Photographic"|"Anime"|"Manga"|"Digital Art"|"Pixel art"| "Fantasy art"|"Neonpunk"|"3D Model"|"Null",width?:number,height?:number,steps?:number,scale?:number}):Promise<{model:string,prompt:string,url:string}>;
}

@@ -43,0 +72,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc