AI DevKit
Search Results for

    Show / Hide Table of Contents

    Class CompletionRequest

    Inheritance
    object
    RESTRequestBody
    OpenAIRequest
    CompletionRequest
    ChatCompletionRequest
    Inherited Members
    OpenAIRequest.Model
    OpenAIRequest.N
    OpenAIRequest.Metadata
    OpenAIRequest.User
    Namespace: Glitch9.AIDevKit
    Assembly: .dll
    Syntax
    public class CompletionRequest : OpenAIRequest

    Properties

    AttachedFiles

    Declaration
    public List<IFile> AttachedFiles { get; set; }
    Property Value
    Type Description
    List<IFile>

    MaxTokens

    Declaration
    public int? MaxTokens { get; set; }
    Property Value
    Type Description
    int?

    Options

    Declaration
    public ICompletionOptions Options { get; set; }
    Property Value
    Type Description
    ICompletionOptions

    Prompt

    Required if using OpenAI legacy models. Required for OpenRouter completion requests. The text prompt to complete

    Declaration
    public string Prompt { get; set; }
    Property Value
    Type Description
    string

    ResponseFormat

    An object specifying the format that the model must output.

    Setting to { "type": "json_schema", "json_schema": { ...} }
    enables Structured Outputs which ensures the model will match your supplied JSON schema.Learn more in the Structured Outputs guide.

    Setting to { "type": "json_object" } enables the older JSON mode, which ensures the message the model generates is valid JSON.Using json_schema is preferred for models that support it.

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

    Seed

    Declaration
    public uint? Seed { get; set; }
    Property Value
    Type Description
    uint?

    Stop

    Declaration
    public List<string> Stop { get; set; }
    Property Value
    Type Description
    List<string>

    Stream

    Optional. Enable streaming of results. Defaults to false

    Declaration
    public bool? Stream { get; set; }
    Property Value
    Type Description
    bool?

    StreamOptions

    Optional. Whether to include usage information in the response

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

    SystemInstruction

    Optional. The system message to use for the model.

    Declaration
    public string SystemInstruction { get; set; }
    Property Value
    Type Description
    string

    Temperature

    Declaration
    public float? Temperature { get; set; }
    Property Value
    Type Description
    float?

    Extension Methods

    RequestExtensions.ExecuteAsync(CompletionRequest)
    RequestExtensions.StreamAsync(CompletionRequest)
    RequestExtensions.ExecuteAsync(CompletionRequest)
    RequestExtensions.StreamAsync(CompletionRequest)
    In this article
    Back to top Generated by DocFX