class

OpenAI::CreateRunRequestWithoutStream

Inherits JSON::Serializable < Reference < Object

Constructors

new(assistant_id : String = "", model : CreateRunRequestWithoutStreamModel | Nil = nil, reasoning_effort : ReasoningEffort | Nil = nil, instructions : String | Nil = nil, additional_instructions : String | Nil = nil, additional_messages : Array(CreateMessageRequest) | Nil = nil, tools : Array(AssistantTool) | Nil = nil, metadata : Metadata | Nil = nil, temperature : Float64 | Nil = nil, top_p : Float64 | Nil = nil, max_prompt_tokens : Int64 | Nil = nil, max_completion_tokens : Int64 | Nil = nil, truncation_strategy : CreateRunRequestWithoutStreamTruncationStrategy | Nil = nil, tool_choice : CreateRunRequestWithoutStreamToolChoice | Nil = nil, parallel_tool_calls : ParallelToolCalls | Nil = nil, response_format : AssistantsApiResponseFormatOption | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

additional_instructions

Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.

Source
additional_instructions=(additional_instructions : String | Nil)

Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.

Source
additional_messages

Adds additional messages to the thread before creating the run.

Source
additional_messages=(additional_messages : Array(CreateMessageRequest) | Nil)

Adds additional messages to the thread before creating the run.

Source
assistant_id

The ID of the assistant to use to execute this run.

Source
assistant_id=(assistant_id : String)

The ID of the assistant to use to execute this run.

Source
instructions

Overrides the instructions of the assistant. This is useful for modifying the behavior on a per-run basis.

Source
instructions=(instructions : String | Nil)

Overrides the instructions of the assistant. This is useful for modifying the behavior on a per-run basis.

Source
max_completion_tokens

The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status incomplete. See incomplete_details for more info.

Source
max_completion_tokens=(max_completion_tokens : Int64 | Nil)

The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status incomplete. See incomplete_details for more info.

Source
max_prompt_tokens

The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status incomplete. See incomplete_details for more info.

Source
max_prompt_tokens=(max_prompt_tokens : Int64 | Nil)

The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status incomplete. See incomplete_details for more info.

Source
metadata
Source
metadata=(metadata : Metadata | Nil)
Source
model

The ID of the Model to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.

Source
model=(model : CreateRunRequestWithoutStreamModel | Nil)

The ID of the Model to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.

Source
parallel_tool_calls
Source
parallel_tool_calls=(parallel_tool_calls : ParallelToolCalls | Nil)
Source
reasoning_effort
Source
reasoning_effort=(reasoning_effort : ReasoningEffort | Nil)
Source
response_format
Source
response_format=(response_format : AssistantsApiResponseFormatOption | Nil)
Source
temperature

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

Source
temperature=(temperature : Float64 | Nil)

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

Source
tool_choice
Source
tool_choice=(tool_choice : CreateRunRequestWithoutStreamToolChoice | Nil)
Source
tools

Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.

Source
tools=(tools : Array(AssistantTool) | Nil)

Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.

Source
top_p

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

We generally recommend altering this or temperature but not both.

Source
top_p=(top_p : Float64 | Nil)

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

We generally recommend altering this or temperature but not both.

Source
truncation_strategy
Source
truncation_strategy=(truncation_strategy : CreateRunRequestWithoutStreamTruncationStrategy | Nil)
Source