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
    OpenAIObject
    RunBase
    Run
    Inherited Members
    RunBase.AssistantId
    RunBase.ThreadId
    RunBase.Status
    RunBase.ExpiresAt
    RunBase.StartedAt
    RunBase.CancelledAt
    RunBase.CompletedAt
    RunBase.FailedAt
    RunBase.LastError
    RunBase.Metadata
    RunBase.Usage
    OpenAIObject.Id
    OpenAIObject.Object
    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 class Run : RunBase

    Properties

    | Edit this page View Source

    IncompleteDetails

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

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

    Instructions

    The instructions that the AssistantObject used for this run.

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

    MaxCompletionTokens

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

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

    MaxPromptTokens

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

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

    Model

    ID of the model.

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

    RequiredAction

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

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

    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
    [JsonProperty("response_format")]
    public ResponseFormat ResponseFormat { get; set; }
    Property Value
    Type Description
    ResponseFormat
    | Edit this page View Source

    Temperature

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

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

    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
    [JsonProperty("tool_choice")]
    public StringOr<ToolChoice> ToolChoice { get; set; }
    Property Value
    Type Description
    StringOr<ToolChoice>
    | Edit this page View Source

    Tools

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

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

    TopP

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

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

    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
    [JsonProperty("truncation_strategy")]
    public TruncationStrategy TruncationStrategy { get; set; }
    Property Value
    Type Description
    TruncationStrategy

    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