Search Results for

    Show / Hide Table of Contents

    Class OpenAIRequest

    Inheritance
    object
    OpenAIRequest
    BatchRequest
    FineTuningRequest
    OpenAISpeechGenerationRequest
    OpenAITranscriptionRequest
    OpenAITranslationRequest
    OpenAIVectorStoreRequest
    RunRequest
    ThreadMessageRequest
    ToolOutputSubmissionRequest
    VectorStoreFileRequest
    VectorStoreFilesBatchRequest
    Implements
    IJsonRequest
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit.OpenAI
    Assembly: Glitch9.AIDevKit.Provider.OpenAI.dll
    Syntax
    public abstract class OpenAIRequest : IJsonRequest

    Properties

    | Edit this page View Source

    Metadata

    Optional (OpenAI only). Custom metadata in key-value format (max 16 pairs). Keys: max 64 characters. Values: max 512 characters. Useful for storing additional structured data.

    Declaration
    [JsonProperty("metadata")]
    public ServerDictionary Metadata { get; set; }
    Property Value
    Type Description
    ServerDictionary
    | Edit this page View Source

    Model

    The AI model to use for the request.

    Declaration
    [JsonProperty("model")]
    public string Model { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    N

    The number of responses to generate. Defaults to 1.

    Declaration
    [JsonProperty("n")]
    public int? N { get; set; }
    Property Value
    Type Description
    int?
    | Edit this page View Source

    SafetyIdentifier

    A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers

    Declaration
    [JsonProperty("safety_identifier")]
    public SafetyIdentifier SafetyIdentifier { get; set; }
    Property Value
    Type Description
    SafetyIdentifier
    | Edit this page View Source

    User

    Optional. A unique identifier for the end user. Helps OpenAI monitor and prevent abuse.

    Declaration
    [Obsolete("Use SafetyIdentifier instead. 'user' is deprecated by OpenAI.")]
    [JsonProperty("user")]
    public SafetyIdentifier User { get; set; }
    Property Value
    Type Description
    SafetyIdentifier

    Implements

    IJsonRequest

    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