add editimage

This commit is contained in:
bignutty 2025-03-22 00:34:34 +01:00
parent da5da4c673
commit 5e3235019c
3 changed files with 79 additions and 0 deletions

View file

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