Search Results for

    Show / Hide Table of Contents

    Class ModerationResponse

    Given some input Text, outputs if the model classifies it as potentially harmful across several categories. Related guide: https://platform.openai.com/docs/guides/moderation POST https://api.openai.com/v1/moderations

    Inheritance
    object
    OpenAIObject
    ModerationResponse
    Inherited Members
    OpenAIObject.Id
    OpenAIObject.Object
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Glitch9.AIDevKit.OpenAI
    Assembly: Glitch9.AIDevKit.dll
    Syntax
    public class ModerationResponse : OpenAIObject

    Properties

    | Edit this page View Source

    Results

    A list of moderation objects.

    Declaration
    [JsonProperty("results")]
    public List<ModerationResult> Results { get; set; }
    Property Value
    Type Description
    List<ModerationResult>

    Methods

    | Edit this page View Source

    IsFlagged(out List<SafetyRating>)

    Declaration
    public bool IsFlagged(out List<SafetyRating> results)
    Parameters
    Type Name Description
    List<SafetyRating> results
    Returns
    Type Description
    bool
    | Edit this page View Source

    ToModeration()

    Converts an OpenAI ModerationResponse to a Moderation asset. Returns null if the response is not flagged.

    Declaration
    public Moderation ToModeration()
    Returns
    Type Description
    Moderation
    | Edit this page View Source

    ToString()

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

    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