Class: OpenAI::Models::Beta::Threads::Run
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Beta::Threads::Run
- Defined in:
- lib/openai/models/beta/threads/run.rb
Overview
Defined Under Namespace
Classes: IncompleteDetails, LastError, RequiredAction, TruncationStrategy, Usage
Instance Attribute Summary collapse
-
#assistant_id ⇒ String
The ID of the [assistant](platform.openai.com/docs/api-reference/assistants) used for execution of this run.
-
#cancelled_at ⇒ Integer?
The Unix timestamp (in seconds) for when the run was cancelled.
-
#completed_at ⇒ Integer?
The Unix timestamp (in seconds) for when the run was completed.
-
#created_at ⇒ Integer
The Unix timestamp (in seconds) for when the run was created.
-
#expires_at ⇒ Integer?
The Unix timestamp (in seconds) for when the run will expire.
-
#failed_at ⇒ Integer?
The Unix timestamp (in seconds) for when the run failed.
-
#id ⇒ String
The identifier, which can be referenced in API endpoints.
-
#incomplete_details ⇒ OpenAI::Models::Beta::Threads::Run::IncompleteDetails?
Details on why the run is incomplete.
-
#instructions ⇒ String
The instructions that the [assistant](platform.openai.com/docs/api-reference/assistants) used for this run.
-
#last_error ⇒ OpenAI::Models::Beta::Threads::Run::LastError?
The last error associated with this run.
-
#max_completion_tokens ⇒ Integer?
The maximum number of completion tokens specified to have been used over the course of the run.
-
#max_prompt_tokens ⇒ Integer?
The maximum number of prompt tokens specified to have been used over the course of the run.
-
#metadata ⇒ Hash{Symbol=>String}?
Set of 16 key-value pairs that can be attached to an object.
-
#model ⇒ String
The model that the [assistant](platform.openai.com/docs/api-reference/assistants) used for this run.
-
#object ⇒ Symbol, :"thread.run"
The object type, which is always ‘thread.run`.
-
#parallel_tool_calls ⇒ Boolean
Whether to enable [parallel function calling](platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use.
-
#required_action ⇒ OpenAI::Models::Beta::Threads::Run::RequiredAction?
Details on the action required to continue the run.
-
#response_format ⇒ Symbol, ...
Specifies the format that the model must output.
-
#started_at ⇒ Integer?
The Unix timestamp (in seconds) for when the run was started.
-
#status ⇒ Symbol, OpenAI::Models::Beta::Threads::RunStatus
The status of the run, which can be either ‘queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`.
-
#temperature ⇒ Float?
The sampling temperature used for this run.
-
#thread_id ⇒ String
The ID of the [thread](platform.openai.com/docs/api-reference/threads) that was executed on as a part of this run.
-
#tool_choice ⇒ Symbol, ...
Controls which (if any) tool is called by the model.
-
#tools ⇒ Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::FileSearchTool, OpenAI::Models::Beta::FunctionTool>
The list of tools that the [assistant](platform.openai.com/docs/api-reference/assistants) used for this run.
-
#top_p ⇒ Float?
The nucleus sampling value used for this run.
-
#truncation_strategy ⇒ OpenAI::Models::Beta::Threads::Run::TruncationStrategy?
Controls for how a thread will be truncated prior to the run.
-
#usage ⇒ OpenAI::Models::Beta::Threads::Run::Usage?
Usage statistics related to the run.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(tool_calls: ) ⇒ Object
constructor
Details on the tool outputs needed for this run to continue.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(tool_calls: ) ⇒ Object
Details on the tool outputs needed for this run to continue.
|
# File 'lib/openai/models/beta/threads/run.rb', line 222
|
Instance Attribute Details
#assistant_id ⇒ String
The ID of the [assistant](platform.openai.com/docs/api-reference/assistants) used for execution of this run.
23 |
# File 'lib/openai/models/beta/threads/run.rb', line 23 required :assistant_id, String |
#cancelled_at ⇒ Integer?
The Unix timestamp (in seconds) for when the run was cancelled.
29 |
# File 'lib/openai/models/beta/threads/run.rb', line 29 required :cancelled_at, Integer, nil?: true |
#completed_at ⇒ Integer?
The Unix timestamp (in seconds) for when the run was completed.
35 |
# File 'lib/openai/models/beta/threads/run.rb', line 35 required :completed_at, Integer, nil?: true |
#created_at ⇒ Integer
The Unix timestamp (in seconds) for when the run was created.
41 |
# File 'lib/openai/models/beta/threads/run.rb', line 41 required :created_at, Integer |
#expires_at ⇒ Integer?
The Unix timestamp (in seconds) for when the run will expire.
47 |
# File 'lib/openai/models/beta/threads/run.rb', line 47 required :expires_at, Integer, nil?: true |
#failed_at ⇒ Integer?
The Unix timestamp (in seconds) for when the run failed.
53 |
# File 'lib/openai/models/beta/threads/run.rb', line 53 required :failed_at, Integer, nil?: true |
#id ⇒ String
The identifier, which can be referenced in API endpoints.
15 |
# File 'lib/openai/models/beta/threads/run.rb', line 15 required :id, String |
#incomplete_details ⇒ OpenAI::Models::Beta::Threads::Run::IncompleteDetails?
Details on why the run is incomplete. Will be ‘null` if the run is not incomplete.
60 |
# File 'lib/openai/models/beta/threads/run.rb', line 60 required :incomplete_details, -> { OpenAI::Beta::Threads::Run::IncompleteDetails }, nil?: true |
#instructions ⇒ String
The instructions that the [assistant](platform.openai.com/docs/api-reference/assistants) used for this run.
68 |
# File 'lib/openai/models/beta/threads/run.rb', line 68 required :instructions, String |
#last_error ⇒ OpenAI::Models::Beta::Threads::Run::LastError?
The last error associated with this run. Will be ‘null` if there are no errors.
74 |
# File 'lib/openai/models/beta/threads/run.rb', line 74 required :last_error, -> { OpenAI::Beta::Threads::Run::LastError }, nil?: true |
#max_completion_tokens ⇒ Integer?
The maximum number of completion tokens specified to have been used over the course of the run.
81 |
# File 'lib/openai/models/beta/threads/run.rb', line 81 required :max_completion_tokens, Integer, nil?: true |
#max_prompt_tokens ⇒ Integer?
The maximum number of prompt tokens specified to have been used over the course of the run.
88 |
# File 'lib/openai/models/beta/threads/run.rb', line 88 required :max_prompt_tokens, Integer, nil?: true |
#metadata ⇒ Hash{Symbol=>String}?
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
99 |
# File 'lib/openai/models/beta/threads/run.rb', line 99 required :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true |
#model ⇒ String
The model that the [assistant](platform.openai.com/docs/api-reference/assistants) used for this run.
107 |
# File 'lib/openai/models/beta/threads/run.rb', line 107 required :model, String |
#object ⇒ Symbol, :"thread.run"
The object type, which is always ‘thread.run`.
113 |
# File 'lib/openai/models/beta/threads/run.rb', line 113 required :object, const: :"thread.run" |
#parallel_tool_calls ⇒ Boolean
Whether to enable [parallel function calling](platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling) during tool use.
121 |
# File 'lib/openai/models/beta/threads/run.rb', line 121 required :parallel_tool_calls, OpenAI::Internal::Type::Boolean |
#required_action ⇒ OpenAI::Models::Beta::Threads::Run::RequiredAction?
Details on the action required to continue the run. Will be ‘null` if no action is required.
128 |
# File 'lib/openai/models/beta/threads/run.rb', line 128 required :required_action, -> { OpenAI::Beta::Threads::Run::RequiredAction }, nil?: true |
#response_format ⇒ Symbol, ...
Specifies the format that the model must output. Compatible with [GPT-4o](platform.openai.com/docs/models#gpt-4o), [GPT-4 Turbo](platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since ‘gpt-3.5-turbo-1106`.
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](platform.openai.com/docs/guides/structured-outputs).
Setting to ‘{ “type”: “json_object” }` enables JSON mode, which ensures the message the model generates is valid JSON.
Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly “stuck” request. Also note that the message content may be partially cut off if ‘finish_reason=“length”`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.
153 |
# File 'lib/openai/models/beta/threads/run.rb', line 153 required :response_format, union: -> { OpenAI::Beta::AssistantResponseFormatOption }, nil?: true |
#started_at ⇒ Integer?
The Unix timestamp (in seconds) for when the run was started.
159 |
# File 'lib/openai/models/beta/threads/run.rb', line 159 required :started_at, Integer, nil?: true |
#status ⇒ Symbol, OpenAI::Models::Beta::Threads::RunStatus
The status of the run, which can be either ‘queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, `incomplete`, or `expired`.
167 |
# File 'lib/openai/models/beta/threads/run.rb', line 167 required :status, enum: -> { OpenAI::Beta::Threads::RunStatus } |
#temperature ⇒ Float?
The sampling temperature used for this run. If not set, defaults to 1.
214 |
# File 'lib/openai/models/beta/threads/run.rb', line 214 optional :temperature, Float, nil?: true |
#thread_id ⇒ String
The ID of the [thread](platform.openai.com/docs/api-reference/threads) that was executed on as a part of this run.
174 |
# File 'lib/openai/models/beta/threads/run.rb', line 174 required :thread_id, String |
#tool_choice ⇒ Symbol, ...
Controls which (if any) tool is called by the model. ‘none` means the model will not call any tools and instead generates a message. `auto` is the default value and means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools before responding to the user. Specifying a particular tool like `“file_search”` or `“function”, “function”: {“name”: “my_function”}` forces the model to call that tool.
186 |
# File 'lib/openai/models/beta/threads/run.rb', line 186 required :tool_choice, union: -> { OpenAI::Beta::AssistantToolChoiceOption }, nil?: true |
#tools ⇒ Array<OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::FileSearchTool, OpenAI::Models::Beta::FunctionTool>
The list of tools that the [assistant](platform.openai.com/docs/api-reference/assistants) used for this run.
194 |
# File 'lib/openai/models/beta/threads/run.rb', line 194 required :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::AssistantTool] } |
#top_p ⇒ Float?
The nucleus sampling value used for this run. If not set, defaults to 1.
220 |
# File 'lib/openai/models/beta/threads/run.rb', line 220 optional :top_p, Float, nil?: true |
#truncation_strategy ⇒ OpenAI::Models::Beta::Threads::Run::TruncationStrategy?
Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.
201 |
# File 'lib/openai/models/beta/threads/run.rb', line 201 required :truncation_strategy, -> { OpenAI::Beta::Threads::Run::TruncationStrategy }, nil?: true |
#usage ⇒ OpenAI::Models::Beta::Threads::Run::Usage?
Usage statistics related to the run. This value will be ‘null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).
208 |
# File 'lib/openai/models/beta/threads/run.rb', line 208 required :usage, -> { OpenAI::Beta::Threads::Run::Usage }, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
# File 'lib/openai/models/beta/threads/run.rb', line 311
|