allow specifying how many images should be generated

This commit is contained in:
bignutty 2025-03-04 12:30:45 +01:00
parent 90b4b0c6a8
commit 9b1e76ebc3
2 changed files with 9 additions and 6 deletions

View file

@ -42,9 +42,10 @@ async function request(path, type, headers, args, host) {
throw new Error("unsupported, must either use GET or POST");
}
module.exports.googleGenaiImagen = async function(context, prompt){
module.exports.googleGenaiImagen = async function(context, prompt, imageCount = 2){
return await request(Api.GOOGLE_GENERATIVEAI_IMAGEN, "GET", {}, {
prompt: prompt
prompt: prompt,
image_count: imageCount
})
}