Class ContentPart
A datatype containing media that is part of a multi-part Content message.
A ContentPart consists of data which has an associated datatype.A ContentPart can only contain one of the accepted types in ContentPart.Data.
A ContentPart 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 ContentPart
- Inheritance
-
objectContentPart
Constructors
ContentPart()
public ContentPart()
ContentPart(FunctionResponse)
public ContentPart(FunctionResponse response)
Parameters
responseFunctionResponse
Properties
FileData
URI based data.
public GoogleFileData FileData { get; set; }
Property Value
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
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
ImageContent
public File<Texture2D> ImageContent { get; set; }
Property Value
- File<Texture2D>
InlineData
Inline media bytes.
public Blob InlineData { get; set; }
Property Value
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 ContentPart FromBase64(string base64File, MIMEType mimeType)
Parameters
base64FilestringmimeTypeMIMEType
Returns
FromText(string)
public static ContentPart FromText(string text)
Parameters
textstring
Returns
FromUrl(string)
public static ContentPart FromUrl(string fileUrl)
Parameters
fileUrlstring