Table of Contents

Class Run

Represents an execution run on a Thread.

Renamed from RunObject to Run (2024.06.14)

public class Run : RunBase
Inheritance
object
Run
Inherited Members

Properties

IncompleteDetails

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

public IncompleteDetails IncompleteDetails { get; set; }

Property Value

IncompleteDetails

Instructions

The instructions that the AssistantObject used for this run.

public string Instructions { get; set; }

Property Value

string

MaxCompletionTokens

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

public int? MaxCompletionTokens { get; set; }

Property Value

int?

MaxPromptTokens

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

public int? MaxPromptTokens { get; set; }

Property Value

int?

Model

ID of the model.

public string Model { get; set; }

Property Value

string

RequiredAction

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

public RequiredAction RequiredAction { get; set; }

Property Value

RequiredAction

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.

public ResponseFormat ResponseFormat { get; set; }

Property Value

ResponseFormat

Temperature

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

public float? Temperature { get; set; }

Property Value

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.
public StringOr<ToolChoice> ToolChoice { get; set; }

Property Value

StringOr<ToolChoice>

Tools

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

public ToolCall[] Tools { get; set; }

Property Value

ToolCall[]

TopP

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

public float? TopP { get; set; }

Property Value

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.

public TruncationStrategy TruncationStrategy { get; set; }

Property Value

TruncationStrategy