Table of Contents

Class ContentPart<T>

Namespace
Glitch9.AIDevKit

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).

public abstract class ContentPart<T> : ContentPart

Type Parameters

T
Inheritance
object
ContentPart<T>
Derived
Inherited Members

Constructors

ContentPart()

public ContentPart()

ContentPart(string, ContentFormat, T)

protected ContentPart(string type, ContentFormat dataType, T data)

Parameters

type string
dataType ContentFormat
data T

Properties

Data

public T Data { get; set; }

Property Value

T

Methods

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.

public override string ToString()

Returns

string

Operators

implicit operator T(ContentPart<T>)

public static implicit operator T(ContentPart<T> content)

Parameters

content ContentPart<T>

Returns

T