Table of Contents

Class GeminiContentPart

A datatype containing media that is part of a multi-part Content message. Must only contain one field at a time.

public class GeminiContentPart : IAppendableData<GeminiContentPart>
Inheritance
GeminiContentPart
Implements
Extension Methods

Fields

CodeExecutionResult

Result of executing the ExecutableCode.

public GeminiCodeExecutionResult CodeExecutionResult

Field Value

GeminiCodeExecutionResult

ExecutableCode

Code generated by the model that is meant to be executed.

public GeminiExecutableCode ExecutableCode

Field Value

GeminiExecutableCode

FileData

URI based data.

public GeminiFileData FileData

Field Value

GeminiFileData

Remarks

Only available in the beta API.

FunctionCall

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

public GeminiFunctionCall FunctionCall

Field Value

GeminiFunctionCall

Remarks

Only available in the beta API.

FunctionResponse

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

public GeminiFunctionResponse FunctionResponse

Field Value

GeminiFunctionResponse

Remarks

Only available in the beta API.

InlineData

Inline media bytes.

public GeminiContentBlob InlineData

Field Value

GeminiContentBlob

Text

Inline text.

public string Text

Field Value

string

Properties

IsEmpty

Is there no content stored in this GeminiContentPart?

public bool IsEmpty { get; }

Property Value

bool

Methods

Append(GeminiContentPart)

Appends the data to the current IAppendableData<T>.

public void Append(GeminiContentPart data)

Parameters

data GeminiContentPart

The data to append.

IsAppendable(GeminiContentPart)

Is the data to be appended compatible with the current GeminiContentPart?

public bool IsAppendable(GeminiContentPart data)

Parameters

data GeminiContentPart

The data to be appended.

Returns

bool