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::Models::Beta::SessionTurnError?
A customer-safe error describing why a session request failed.
-
#id ⇒ String
The ID of the turn.
-
#object ⇒ Symbol, :"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 ⇒ Symbol, 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::Models::Beta::TokenUsage?
Recorded token usage for a session or turn.
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
The canonical public representation of a session turn.
- #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
The canonical public representation of a session turn.
|
|
# File 'lib/openai/models/beta/agents/sessions/turn.rb', line 78
|
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::Models::Beta::SessionTurnError?
A customer-safe error describing why a session request failed.
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 ⇒ Symbol, :"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 ⇒ Symbol, 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::Models::Beta::TokenUsage?
Recorded token usage for a session or turn. Usage is best effort and may change.
76 |
# File 'lib/openai/models/beta/agents/sessions/turn.rb', line 76 required :usage, -> { OpenAI::Beta::TokenUsage }, nil?: true |
Instance Method Details
#to_hash ⇒ {
58 |
# File 'sig/openai/models/beta/agents/sessions/turn.rbs', line 58
def to_hash: -> {
|