Class VqaRequestExtensions
- Namespace
- GenerativeAI
- Assembly
- GenerativeAI.dll
Extension methods for adding image data to a VqaRequest object.
public static class VqaRequestExtensions
- Inheritance
-
VqaRequestExtensions
- Inherited Members
Methods
AddGcsImage(VqaRequest, string, string)
Adds an image to the VqaRequest from a Google Cloud Storage (GCS) URI.
public static void AddGcsImage(this VqaRequest request, string prompt, string imageUri)
Parameters
requestVqaRequestThe VqaRequest to which the image will be added.
promptstringThe prompt or question associated with the image.
imageUristringThe URI of the image stored in Google Cloud Storage.
AddLocalImage(VqaRequest, string, string)
Adds an image to the VqaRequest from a local file with a specified prompt.
public static void AddLocalImage(this VqaRequest request, string prompt, string imagePath)
Parameters
requestVqaRequestThe VqaRequest to which the image will be added.
promptstringThe textual prompt associated with the image.
imagePathstringThe file path of the local image to be added.
Exceptions
- ArgumentException
Thrown if the file does not exist or cannot be accessed.