Table of Contents

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

request VqaRequest

The VqaRequest to which the image will be added.

prompt string

The prompt or question associated with the image.

imageUri string

The 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

request VqaRequest

The VqaRequest to which the image will be added.

prompt string

The textual prompt associated with the image.

imagePath string

The file path of the local image to be added.

Exceptions

ArgumentException

Thrown if the file does not exist or cannot be accessed.