Table of Contents

Class GeminiContentPart

A datatype containing media that is part of a multi-part GeminiContent message.

A GeminiContentPart consists of data which has an associated datatype.A GeminiContentPart can only contain one of the accepted types in GeminiContentPart.Data.

A GeminiContentPart must have a fixed IANA MIME type identifying the type and subtype of the media if the InlineData field is filled with raw bytes.

public class GeminiContentPart
Inheritance
object
GeminiContentPart

Constructors

GeminiContentPart()

public GeminiContentPart()

GeminiContentPart(FunctionResponse)

public GeminiContentPart(FunctionResponse response)

Parameters

response FunctionResponse

Properties

FileData

URI based data.

public GoogleFileData FileData { get; set; }

Property Value

GoogleFileData

FunctionCall

A predicted FunctionCall returned from the model that contains a string representing the Name with the arguments and their values.

public FunctionCall FunctionCall { get; set; }

Property Value

FunctionCall

FunctionResponse

The result output of a FunctionCall that contains a string representing the Name and a structured JSON object containing any output from the function is used as context to the model.

public FunctionResponse FunctionResponse { get; set; }

Property Value

FunctionResponse

ImageContent

public File<Texture2D> ImageContent { get; set; }

Property Value

File<Texture2D>

InlineData

Inline media bytes.

public Blob InlineData { get; set; }

Property Value

Blob

IsImage

public bool IsImage { get; }

Property Value

bool

Text

Inline text.

public string Text { get; set; }

Property Value

string

Methods

FromBase64(string, MimeType)

public static GeminiContentPart FromBase64(string base64File, MimeType mimeType)

Parameters

base64File string
mimeType MimeType

Returns

GeminiContentPart

FromText(string)

public static GeminiContentPart FromText(string text)

Parameters

text string

Returns

GeminiContentPart

FromUrl(string)

public static GeminiContentPart FromUrl(string fileUrl)

Parameters

fileUrl string

Returns

GeminiContentPart