Search Results for

    Show / Hide Table of Contents

    Class MessageContent

    Text:

    • ChatCompletion > ChatChoice[] > Message[] > MessageContent > StringOrPart > Text
      MessageContentPart:
    • ChatCompletion > ChatChoice[] > Message[] > MessageContent > StringOrPart > MessageContentPart[]
    Inheritance
    object
    MessageContent
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Glitch9.AIDevKit
    Assembly: Glitch9.AIDevKit.dll
    Syntax
    [JsonConverter(typeof(MessageContentConverter))]
    public sealed class MessageContent

    Constructors

    | Edit this page View Source

    MessageContent()

    Declaration
    [JsonConstructor]
    public MessageContent()
    | Edit this page View Source

    MessageContent(StringOr<ContentPart>[])

    Declaration
    public MessageContent(StringOr<ContentPart>[] parts)
    Parameters
    Type Name Description
    StringOr<ContentPart>[] parts
    | Edit this page View Source

    MessageContent(string)

    Declaration
    public MessageContent(string text)
    Parameters
    Type Name Description
    string text
    | Edit this page View Source

    MessageContent(string[])

    Declaration
    public MessageContent(string[] texts)
    Parameters
    Type Name Description
    string[] texts

    Properties

    | Edit this page View Source

    Count

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    HasParts

    Declaration
    public bool HasParts { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    HasValue

    Declaration
    public bool HasValue { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    IsEmpty

    Declaration
    public bool IsEmpty { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    IsString

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

    Methods

    | Edit this page View Source

    AddRange<T>(IEnumerable<T>)

    Declaration
    public void AddRange<T>(IEnumerable<T> parts) where T : ContentPart
    Parameters
    Type Name Description
    IEnumerable<T> parts
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    Add<T>(T)

    Declaration
    public void Add<T>(T part) where T : ContentPart
    Parameters
    Type Name Description
    T part
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    Append(MessageContent)

    Declaration
    public void Append(MessageContent content)
    Parameters
    Type Name Description
    MessageContent content
    | Edit this page View Source

    FromParts(IEnumerable<ContentPart>)

    Declaration
    public static MessageContent FromParts(IEnumerable<ContentPart> parts)
    Parameters
    Type Name Description
    IEnumerable<ContentPart> parts
    Returns
    Type Description
    MessageContent
    | Edit this page View Source

    GetOutputText()

    Declaration
    public string GetOutputText()
    Returns
    Type Description
    string
    | Edit this page View Source

    GetParts()

    Declaration
    public IEnumerable<ContentPart> GetParts()
    Returns
    Type Description
    IEnumerable<ContentPart>
    | Edit this page View Source

    GetReasoning()

    Declaration
    public string GetReasoning()
    Returns
    Type Description
    string
    | Edit this page View Source

    GetRefusal()

    Declaration
    public string GetRefusal()
    Returns
    Type Description
    string
    | Edit this page View Source

    Remove(ContentPart)

    Declaration
    public void Remove(ContentPart part)
    Parameters
    Type Name Description
    ContentPart part
    | Edit this page View Source

    SetOutputText(string, params Annotation[])

    Declaration
    public void SetOutputText(string text, params Annotation[] annotations)
    Parameters
    Type Name Description
    string text
    Annotation[] annotations
    | Edit this page View Source

    SetReasoning(string)

    Declaration
    public void SetReasoning(string reasoningText)
    Parameters
    Type Name Description
    string reasoningText
    | Edit this page View Source

    SetRefusal(string)

    Declaration
    public void SetRefusal(string refusalText)
    Parameters
    Type Name Description
    string refusalText
    | Edit this page View Source

    ToList()

    Declaration
    public List<StringOr<ContentPart>> ToList()
    Returns
    Type Description
    List<StringOr<ContentPart>>
    | Edit this page View Source

    ToString()

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

    Operators

    | Edit this page View Source

    implicit operator string(MessageContent)

    Declaration
    public static implicit operator string(MessageContent content)
    Parameters
    Type Name Description
    MessageContent content
    Returns
    Type Description
    string
    | Edit this page View Source

    implicit operator MessageContent(StringOr<ContentPart>[])

    Declaration
    public static implicit operator MessageContent(StringOr<ContentPart>[] parts)
    Parameters
    Type Name Description
    StringOr<ContentPart>[] parts
    Returns
    Type Description
    MessageContent
    | Edit this page View Source

    implicit operator MessageContent(string)

    Declaration
    public static implicit operator MessageContent(string text)
    Parameters
    Type Name Description
    string text
    Returns
    Type Description
    MessageContent

    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