13.0.0 • Published 4 months ago
hercai v13.0.0
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.
❔ Support
📂 NPM
📝 Github
📂 Installation
npm i hercai
yarn add hercai
pnpm add hercai
bun add hercai
Quick Example
Example Question For TypeScript;
import { Hercai } from "hercai";
const hercai = new Hercai({
apiKey: 'YourSecretAPIKey'
});
hercai.chat.completions.create({
messages: [
{
role: 'user',
content: 'Hi How Are You?'
},
{
role: 'assistant',
content: 'I\'m just a computer program, so I don\'t have feelings, but thanks for asking. How can I assist you today?'
},
{
role: 'user',
content: [
{
type: 'image',
image_url: {
url: 'base64:....'
}
},
{
type: 'text',
text: 'What Do You See In This Picture?'
}
]
}
],
model: 'meta-llama/Llama-3.2-90b-Vision',
stream: true
}).then(async(streamResponse) => {
for await (const chunk of streamResponse) {
console.log(chunk.reply);
}
});
Example Draw Image For TypeScript;
import { Hercai } from "hercai";
import * as fs from 'fs';
const hercai = new Hercai({
apiKey: 'YourSecretAPIKey'
});
hercai.images.generations({
prompt: 'a photo of an astronaut riding a horse',
negative_prompt: '',
model: '',
size: '1024x1024',
seed: '45',
response_format: 'buffer',
steps: 50,
}).then(async(ImageBuffer) => {
fs.writeFileSync(ImageBuffer, './hercai.png');
});
Credits
Made by FiveSoBes And Luppux Development
Contact & Support
13.0.0
4 months ago
12.4.0
8 months ago
12.3.0
1 year ago
12.3.1
1 year ago
12.3.2
12 months ago
12.2.0
1 year ago
12.1.1
1 year ago
12.1.0
1 year ago
12.0.1
1 year ago
12.0.0
2 years ago
11.1.3
2 years ago
11.1.1
2 years ago
11.1.2
2 years ago
11.1.0
2 years ago
11.0.1
2 years ago
10.0.3
2 years ago
10.0.4
2 years ago
11.0.0
2 years ago
10.0.2
2 years ago
10.0.1
2 years ago
10.0.0
2 years ago
9.0.3
2 years ago
9.0.2
2 years ago
9.0.1
2 years ago
9.0.0
2 years ago
8.0.1
2 years ago
8.0.0
2 years ago
7.0.1
2 years ago
7.0.0
2 years ago
6.0.0
2 years ago
5.0.0
2 years ago
4.0.0
2 years ago
3.0.0
2 years ago
2.0.0
2 years ago
1.0.0
2 years ago