AI Dev Kit
Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    ContentPart
    Namespace: Glitch9.AIDevKit.Google
    Assembly: .dll
    Syntax
    public class ContentPart

    Constructors

    ContentPart()

    Declaration
    public ContentPart()

    ContentPart(FunctionResponse)

    Declaration
    public ContentPart(FunctionResponse response)
    Parameters
    Type Name Description
    FunctionResponse response

    Properties

    FileData

    URI based data.

    Declaration
    public FileData FileData { get; set; }
    Property Value
    Type Description
    FileData

    FunctionCall

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

    Declaration
    public FunctionCall FunctionCall { get; set; }
    Property Value
    Type Description
    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.

    Declaration
    public FunctionResponse FunctionResponse { get; set; }
    Property Value
    Type Description
    FunctionResponse

    ImageContent

    Declaration
    public UniImageFile ImageContent { get; set; }
    Property Value
    Type Description
    UniImageFile

    InlineData

    Inline media bytes.

    Declaration
    public Blob InlineData { get; set; }
    Property Value
    Type Description
    Blob

    IsImage

    Declaration
    public bool IsImage { get; }
    Property Value
    Type Description
    bool

    Text

    Inline text.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    string

    Methods

    FromBase64(string, MIMEType)

    Declaration
    public static ContentPart FromBase64(string base64File, MIMEType mimeType)
    Parameters
    Type Name Description
    string base64File
    MIMEType mimeType
    Returns
    Type Description
    ContentPart

    FromText(string)

    Declaration
    public static ContentPart FromText(string text)
    Parameters
    Type Name Description
    string text
    Returns
    Type Description
    ContentPart

    FromUrl(string)

    Declaration
    public static ContentPart FromUrl(string fileUrl)
    Parameters
    Type Name Description
    string fileUrl
    Returns
    Type Description
    ContentPart
    In this article
    Back to top Generated by DocFX