Class GeminiContent
The base structured datatype containing multi-part content of a message.
public class GeminiContent : IAppendableData<GeminiContent>
- Inheritance
-
GeminiContent
- Implements
- Extension Methods
Fields
Parts
Ordered Parts that constitute a single message. Parts may have different MIME types.
public GeminiContentPart[] Parts
Field Value
Role
Optional. The producer of the content.
public GeminiRole Role
Field Value
Methods
Append(GeminiContent)
Appends the data
to the current IAppendableData<T>.
public void Append(GeminiContent data)
Parameters
data
GeminiContentThe data to append.
GetContent(string, Texture2D, GeminiRole)
Creates a new GeminiContent from a role, message and Texture2D.
public static GeminiContent GetContent(string message, Texture2D image, GeminiRole role = GeminiRole.Unspecified)
Parameters
message
stringThe message.
image
Texture2DThe image texture.
role
GeminiRoleThe role of the content creator.
Returns
- GeminiContent
A new GeminiContent object.
GetContent(string, GeminiFile, GeminiRole)
Creates a new GeminiContent from a role, message and GeminiFile.
public static GeminiContent GetContent(string message, GeminiFile file, GeminiRole role = GeminiRole.Unspecified)
Parameters
message
stringThe message.
file
GeminiFileThe GeminiFile.
role
GeminiRoleThe role of the content creator.
Returns
- GeminiContent
A new GeminiContent object.
GetContent(string, GeminiRole)
Creates a new GeminiContent from a role and message.
public static GeminiContent GetContent(string message, GeminiRole role = GeminiRole.Unspecified)
Parameters
message
stringThe message.
role
GeminiRoleThe role of the content creator.
Returns
- GeminiContent
A new GeminiContent object.
GetContent(GeminiFunctionCall)
Creates a new GeminiContent from a GeminiFunctionCall.
public static GeminiContent GetContent(GeminiFunctionCall functionCall)
Parameters
functionCall
GeminiFunctionCallThe function call.
Returns
- GeminiContent
A new GeminiContent object.
GetContent(GeminiFunctionResponse)
Creates a new GeminiContent from a GeminiFunctionResponse.
public static GeminiContent GetContent(GeminiFunctionResponse functionResponse)
Parameters
functionResponse
GeminiFunctionResponseThe function response.
Returns
- GeminiContent
A new GeminiContent object.