Hey Elliot. Thanks for building this plugin! Wondering if you have plans to add an action to the API that would allow us to post prompts from a workflow. (Iâm having Gemini send me a JSON response that Iâd like to pass into a backend workflow for data handling). Iâll likely just build my own API for now, but could be helpful to others if this were enabled, and/or you enable forking on the plugin
Anyway - really appreciate the work put into this & excited to put it to use in other parts of my application!
I was hoping your plugin would help me run the Gemini Pro VisionâŚimage and text.
Iâm struggling to pass the image into the call.
Is your plug in able to help?
This is the code:
#!/bin/bash
Run this from the directory in which you saved your input images
This script was written to run on Debian Linux. It may require updates
to run on other platforms
Test that the first image is present
if [ ! -f âimage0.jpegâ ]; then
echo âCould not find images in the current directory.â >&2
exit 1
fi
API_KEY=âYOUR_API_KEYâ
curl
-X POST https://generativelanguage.googleapis.com/v1beta/models/gemini-pro-vision:generateContent?key=${API_KEY}
-H âContent-Type: application/jsonâ
-d @<(echo â{
âcontentsâ: [
{
âpartsâ: [
{
âtextâ: "As an expert in reservations, guest relations and hotel concierge, you know the best activities and tours to recommend to guests based on their passport photo. \n\nYour task is to extract the full name, nationality, gender, passport number and date of birth from the passport. \n\nYou will provide this information in a clear format required for hotel check-in. \n\nYou will then generate a list of recommendations for local tours, activities, sites and restaurants based on the guestâ'âs profile taken from the passport information. \n\nYou will be provided with:\n\nHotel Location: \nHotel Name: \nPassport photo of the guest\n\nYou should provide website links in your recommendations. \n\nYour tone should be quirky. Ensure one recommendation is a little risky and will make them laugh. \n\nHotel Location: Rawai Phuket\nHotel Name: Beach Boutique\n"
},
{
âinlineDataâ: {
âmimeTypeâ: âimage/jpegâ,
âdataâ: "â$(base64 -w0 image0.jpeg)â"
}
}
]
}
],
âgenerationConfigâ: {
âtemperatureâ: 0.4,
âtopKâ: 32,
âtopPâ: 1,
âmaxOutputTokensâ: 4096,
âstopSequencesâ:
},
âsafetySettingsâ: [
{
âcategoryâ: âHARM_CATEGORY_HARASSMENTâ,
âthresholdâ: âBLOCK_MEDIUM_AND_ABOVEâ
},
{
âcategoryâ: âHARM_CATEGORY_HATE_SPEECHâ,
âthresholdâ: âBLOCK_MEDIUM_AND_ABOVEâ
},
{
âcategoryâ: âHARM_CATEGORY_SEXUALLY_EXPLICITâ,
âthresholdâ: âBLOCK_MEDIUM_AND_ABOVEâ
},
{
âcategoryâ: âHARM_CATEGORY_DANGEROUS_CONTENTâ,
âthresholdâ: âBLOCK_MEDIUM_AND_ABOVEâ
}
]
}â)
Hi @rohan2,
If I am not mistaken, it seems that you want to send an image encoded in base64 with a prompt. It is something possible with this plugin.
Please have a look at the following workflow (picture).
Hello, greetings, I have been testing the plugin but I have had some problems with the response. For some reason I always get the same response no matter what image I send. My prompt is very basic. I only ask that you describe the image. I leave you here some images of the workflow and the responses. Thank you very much in advance for the response