Class: OpenAI::Models::Beta::Agents::Sessions::Turn
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Beta::Agents::Sessions::Turn
- Defined in:
- lib/openai/models/beta/agents/sessions/turn.rb,
sig/openai/models/beta/agents/sessions/turn.rbs
Overview
Defined Under Namespace
Modules: Status
Instance Attribute Summary collapse
-
#agent_id ⇒ String
The ID of the agent that ran the turn.
-
#completed_at ⇒ Integer?
The Unix timestamp, in seconds, when the turn reached a terminal state.
-
#created_at ⇒ Integer
The Unix timestamp, in seconds, used to order the turn by creation time.
-
#error ⇒ OpenAI::Beta::SessionTurnError?
A customer-safe error.
-
#id ⇒ String
The ID of the turn.
-
#object ⇒ :"agent.session.turn"
The object type.
-
#session_id ⇒ String
The ID of the session that owns the turn.
-
#started_at ⇒ Integer?
The Unix timestamp, in seconds, when the turn started.
-
#status ⇒ OpenAI::Models::Beta::Agents::Sessions::Turn::status
The current status of the turn.
-
#subagent_id ⇒ String?
The ID of the subagent that ran the turn, if applicable.
-
#usage ⇒ OpenAI::Beta::TokenUsage?
Best-effort token usage for the turn, or null if unknown.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
- #initialize(id:, agent_id:, completed_at:, created_at:, error:, session_id:, started_at:, status:, subagent_id:, usage:, object: :"agent.session.turn") ⇒ Object constructor
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, 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(id:, agent_id:, completed_at:, created_at:, error:, session_id:, started_at:, status:, subagent_id:, usage:, object: :"agent.session.turn") ⇒ Object
|
|
# File 'lib/openai/models/beta/agents/sessions/turn.rb', line 79
|
Instance Attribute Details
#agent_id ⇒ String
The ID of the agent that ran the turn.
20 |
# File 'lib/openai/models/beta/agents/sessions/turn.rb', line 20 required :agent_id, String |
#completed_at ⇒ Integer?
The Unix timestamp, in seconds, when the turn reached a terminal state.
26 |
# File 'lib/openai/models/beta/agents/sessions/turn.rb', line 26 required :completed_at, Integer, nil?: true |
#created_at ⇒ Integer
The Unix timestamp, in seconds, used to order the turn by creation time. Subagent turns use their start time, falling back to completion time or the subagent opening time when the preceding timestamps are unavailable.
34 |
# File 'lib/openai/models/beta/agents/sessions/turn.rb', line 34 required :created_at, Integer |
#error ⇒ OpenAI::Beta::SessionTurnError?
A customer-safe error. Non-null only for a failed turn.
40 |
# File 'lib/openai/models/beta/agents/sessions/turn.rb', line 40 required :error, -> { OpenAI::Beta::SessionTurnError }, nil?: true |
#id ⇒ String
The ID of the turn.
14 |
# File 'lib/openai/models/beta/agents/sessions/turn.rb', line 14 required :id, String |
#object ⇒ :"agent.session.turn"
The object type. Always agent.session.turn.
46 |
# File 'lib/openai/models/beta/agents/sessions/turn.rb', line 46 required :object, const: :"agent.session.turn" |
#session_id ⇒ String
The ID of the session that owns the turn.
52 |
# File 'lib/openai/models/beta/agents/sessions/turn.rb', line 52 required :session_id, String |
#started_at ⇒ Integer?
The Unix timestamp, in seconds, when the turn started.
58 |
# File 'lib/openai/models/beta/agents/sessions/turn.rb', line 58 required :started_at, Integer, nil?: true |
#status ⇒ OpenAI::Models::Beta::Agents::Sessions::Turn::status
The current status of the turn.
64 |
# File 'lib/openai/models/beta/agents/sessions/turn.rb', line 64 required :status, enum: -> { OpenAI::Beta::Agents::Sessions::Turn::Status } |
#subagent_id ⇒ String?
The ID of the subagent that ran the turn, if applicable.
70 |
# File 'lib/openai/models/beta/agents/sessions/turn.rb', line 70 required :subagent_id, String, nil?: true |
#usage ⇒ OpenAI::Beta::TokenUsage?
Best-effort token usage for the turn, or null if unknown. Recorded usage may change.
77 |
# File 'lib/openai/models/beta/agents/sessions/turn.rb', line 77 required :usage, -> { OpenAI::Beta::TokenUsage }, nil?: true |
Instance Method Details
#to_hash ⇒ {
97 |
# File 'sig/openai/models/beta/agents/sessions/turn.rbs', line 97
def to_hash: -> {
|