Package Exports
- bardiaai
- bardiaai/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bardiaai) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
BardiaAI
Install
npm i bardiaai --saveGPT
Dalle 3
Text To Image
GPT
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);
});Dalle 3
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);
});Text To Image
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);
});