npm i bardiaai --save
https://hapi.majidapi.ir/bardia/gpt/4?q=Hello
https://hapi.majidapi.ir/bardia/gpt/3-5/turbo?q=Hello
https://hapi.majidapi.ir/bardia/gpt/3?q=Hello
const {gpt} = require("bardiaai")
gpt({
model: "GPT-4", // GPT-4, GPT-3.5-turbo, GPT-3
prompt: "Hello Bardia"
})
.then(result => {
console.log(result);
})
.catch(err => {
console.error(err);
});
https://hapi.majidapi.ir/bardia/dalle3?p=Flower
const {dalle3} = require("bardiaai")
dalle3({
prompt: "beautiful flower"
})
.then(result => {
console.log(result);
})
.catch(err => {
console.error(err);
});
https://hapi.majidapi.ir/bardia/tti?model=default&p=Flower
const {textToImage} = require("bardiaai")
textToImage({
model: "default", // default, stablediffusion, dalle, pixart, prodia
prompt: "beautiful flower"
})
.then(result => {
console.log(result);
})
.catch(err => {
console.error(err);
});