Search Results for

    Show / Hide Table of Contents

    Class ContentPart<T>

    Base class for different types of content parts in a message. Each content part has a defined type, such as Text, Image(Url/Base64/FileId), Audio(Base64), or File(Base64/FileId).

    Inheritance
    object
    ContentPart
    ContentPart<T>
    AudioPart
    DocumentPart
    FilePart
    ImagePart
    ReferencePart
    TextPart
    ThinkingPart
    VideoPart
    Inherited Members
    ContentPart.Type
    ContentPart.Format
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Glitch9.AIDevKit
    Assembly: Glitch9.AIDevKit.dll
    Syntax
    public abstract class ContentPart<T> : ContentPart where T : IContentData
    Type Parameters
    Name Description
    T

    Constructors

    | Edit this page View Source

    ContentPart()

    Declaration
    public ContentPart()
    | Edit this page View Source

    ContentPart(ContentType, ContentFormat, T)

    Declaration
    protected ContentPart(ContentType type, ContentFormat dataType, T value)
    Parameters
    Type Name Description
    ContentType type
    ContentFormat dataType
    T value

    Properties

    | Edit this page View Source

    Value

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

    Methods

    | Edit this page View Source

    ToString()

    Indicates if the content part is in base64 format. This is true if the content part is a base64 encoded image, file, or audio.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Operators

    | Edit this page View Source

    implicit operator T(ContentPart<T>)

    Declaration
    public static implicit operator T(ContentPart<T> content)
    Parameters
    Type Name Description
    ContentPart<T> content
    Returns
    Type Description
    T

    Extension Methods

    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation