It is possible to use the Azure Node.JS SDK to download images from Azure Blog Storage
and use them in the prompt. The defImages function support the node.js [Buffer] type.
Make sure to login with the Azure CLI and set the subscription.
Reading blobs
Open a connection to the Azure Blob Storage and get a client to the container.
We deconstruct the account and container from the env.vars object
so that they can be set through the cli.
If you do not have a specific blob in mind, you can iterate through the blobs,
and download them into a buffer (buf).
Using images in the prompt
The image buffer can be passed in defImages to be used in the prompt.
However since images can be โheavyโ, you will most likely have to use
inline prompts to split into smaller queries. (Note the use of _.)
Summarizing results
To summarize all images, we store each image summary using the def function and
add prompting to summarize the descriptions.