UGemini 2.0.1
A C# wrapper for the Google Gemini API.
Loading...
Searching...
No Matches
Uralstech.UGemini.Models.Content.GeminiContent Class Reference

The base structured datatype containing multi-part content of a message. More...

Inheritance diagram for Uralstech.UGemini.Models.Content.GeminiContent:
Uralstech.UGemini.IAppendableData< GeminiContent >

Public Member Functions

void Append (GeminiContent data)
 
- Public Member Functions inherited from Uralstech.UGemini.IAppendableData< GeminiContent >
void Append (T data)
 Appends the data to the current IAppendableData<T>.
 

Static Public Member Functions

static GeminiContent GetContent (string message, GeminiRole role=GeminiRole.Unspecified)
 Creates a new GeminiContent from a role and message.
 
static GeminiContent GetContent (string message, Texture2D image, GeminiRole role=GeminiRole.Unspecified)
 Creates a new GeminiContent from a role, message and Texture2D.
 
static GeminiContent GetContent (string message, AudioClip audio, GeminiRole role=GeminiRole.Unspecified)
 Creates a new GeminiContent from a role, message and AudioClip.
 
static GeminiContent GetContent (string message, GeminiFile file, GeminiRole role=GeminiRole.Unspecified)
 Creates a new GeminiContent from a role, message and GeminiFile.
 
static GeminiContent GetContent (GeminiFunctionCall functionCall)
 Creates a new GeminiContent from a GeminiFunctionCall.
 
static GeminiContent GetContent (GeminiFunctionResponse functionResponse)
 Creates a new GeminiContent from a GeminiFunctionResponse.
 

Public Attributes

GeminiContentPart[] Parts
 Ordered Parts that constitute a single message. Parts may have different MIME types.
 
GeminiRole Role
 Optional. The producer of the content.
 

Detailed Description

The base structured datatype containing multi-part content of a message.

Member Function Documentation

◆ GetContent() [1/6]

static GeminiContent Uralstech.UGemini.Models.Content.GeminiContent.GetContent ( GeminiFunctionCall functionCall)
static

Creates a new GeminiContent from a GeminiFunctionCall.

Parameters
functionCallThe function call.
Returns
A new GeminiContent object.

◆ GetContent() [2/6]

static GeminiContent Uralstech.UGemini.Models.Content.GeminiContent.GetContent ( GeminiFunctionResponse functionResponse)
static

Creates a new GeminiContent from a GeminiFunctionResponse.

Parameters
functionResponseThe function response.
Returns
A new GeminiContent object.

◆ GetContent() [3/6]

static GeminiContent Uralstech.UGemini.Models.Content.GeminiContent.GetContent ( string message,
AudioClip audio,
GeminiRole role = GeminiRole::Unspecified )
static

Creates a new GeminiContent from a role, message and AudioClip.

Requires Utilities.Encoding.Wav.

Parameters
roleThe role of the content creator.
messageThe message.
audioThe audio clip.
Returns
A new GeminiContent object.

◆ GetContent() [4/6]

static GeminiContent Uralstech.UGemini.Models.Content.GeminiContent.GetContent ( string message,
GeminiFile file,
GeminiRole role = GeminiRole::Unspecified )
static

Creates a new GeminiContent from a role, message and GeminiFile.

Parameters
roleThe role of the content creator.
messageThe message.
fileThe GeminiFile.
Returns
A new GeminiContent object.

◆ GetContent() [5/6]

static GeminiContent Uralstech.UGemini.Models.Content.GeminiContent.GetContent ( string message,
GeminiRole role = GeminiRole::Unspecified )
static

Creates a new GeminiContent from a role and message.

Parameters
roleThe role of the content creator.
messageThe message.
Returns
A new GeminiContent object.

◆ GetContent() [6/6]

static GeminiContent Uralstech.UGemini.Models.Content.GeminiContent.GetContent ( string message,
Texture2D image,
GeminiRole role = GeminiRole::Unspecified )
static

Creates a new GeminiContent from a role, message and Texture2D.

Parameters
roleThe role of the content creator.
messageThe message.
imageThe image texture.
Returns
A new GeminiContent object.

The documentation for this class was generated from the following file: