AI Dev Kit
Search Results for

    Show / Hide Table of Contents

    Class Run

    Represents an execution run on a Thread.

    Renamed from RunObject to Run (2024.06.14)

    Inheritance
    object
    ModelResponse
    RunBase
    Run
    Inherited Members
    RunBase.AssistantId
    RunBase.ThreadId
    RunBase.Status
    RunBase.ExpiresAt
    RunBase.StartedAt
    RunBase.CancelledAt
    RunBase.CompletedAt
    RunBase.FailedAt
    RunBase.LastError
    ModelResponse.Id
    ModelResponse.Object
    ModelResponse.Model
    ModelResponse.CreatedAt
    ModelResponse.Metadata
    ModelResponse.Usage
    Namespace: Glitch9.AIDevKit.OpenAI
    Assembly: .dll
    Syntax
    public class Run : RunBase

    Properties

    ActionRequest

    Details on the action required to continue the run. Will be null if no action is required.

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

    IncompleteDetails

    Details on why the run is incomplete. Will be null if the run is not incomplete.

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

    Instructions

    The instructions that the AssistantObject used for this run.

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

    MaxCompletionTokens

    The maximum number of completion tokens specified to have been used over the course of the run.

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

    MaxPromptTokens

    The maximum number of prompt tokens specified to have been used over the course of the run.

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

    ResponseFormat

    Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 Turbo, and all GPT-3.5 Turbo models since gpt-3.5-turbo-1106. Setting to { "type": "json_object" } enables JSON mode, which guarantees the message the model generates is valid JSON.

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

    Temperature

    The sampling temperature used for this run. If not set, defaults to 1.

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

    ToolChoice

    Controls which (if any) tool is called by the model.

    • none: the model will not call any tools and instead generates a message.
    • auto: the model can pick between generating a message or calling one or more tools.
    • required: the model must call one or more tools before responding to the user. Specifying a particular tool like {"type": "file_search"} or {"type": "function", "function": {"name": "my_function"}} forces the model to call that tool.
    Declaration
    public StringOr<ToolChoice> ToolChoice { get; set; }
    Property Value
    Type Description
    StringOr<ToolChoice>

    Tools

    The list of tools that the AssistantObject used for this run.

    Declaration
    public ToolCall[] Tools { get; set; }
    Property Value
    Type Description
    ToolCall[]

    TopP

    The nucleus sampling value used for this run. If not set, defaults to 1.

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

    TruncationStrategy

    Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run.

    Declaration
    public TruncationStrategy TruncationStrategy { get; set; }
    Property Value
    Type Description
    TruncationStrategy
    In this article
    Back to top Generated by DocFX