IContentsRequest Interface

Represents a request containing a collection of contents.

Definition

Namespace: GenerativeAI.Types
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public interface IContentsRequest

Remarks

This interface defines a property for managing multiple instances of Content. Implementations of this interface can be used to interact with and manipulate content-related requests.

Properties

Contents Represents a collection of content items within an object that implements the IContentsRequest interface.

Extension Methods

AddContent Adds a new Content object to the IContentsRequest.
(Defined by IContentRequest_Extensions)
AddInlineData Adds inline data such as an image or audio file into the latest Content in the IContentsRequest and associates it with the specified role.
(Defined by IContentRequest_Extensions)
AddInlineFile Adds a new Content that includes an inline file as a Part to the IContentsRequest.
(Defined by IContentRequest_Extensions)
AddPart Adds a specific Part to the latest Content in the IContentsRequest. If no Content exists, a new one is created with the provided Part.
(Defined by IContentRequest_Extensions)
AddParts Adds a collection of Part objects to the latest Content in the IContentsRequest with the specified role. If no Content exists, a new one is created with the provided Part collection.
(Defined by IContentRequest_Extensions)
AddRemoteFile Adds a remote file to the IContentsRequest using a RemoteFile object.
(Defined by IContentRequest_Extensions)
AddRemoteFile Adds a remote file to the IContentsRequest using a URL and MIME type.
(Defined by IContentRequest_Extensions)
AddText Adds a single text Part to the IContentsRequest with the specified role.
(Defined by IContentRequest_Extensions)

See Also