Class: OpenAI::Models::Beta::AgentSession
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Beta::AgentSession
- Defined in:
- lib/openai/models/beta/agent_session.rb,
sig/openai/models/beta/agent_session.rbs
Defined Under Namespace
Modules: RequiredAction, Status Classes: Agent
Instance Attribute Summary collapse
-
#agent ⇒ OpenAI::Models::Beta::AgentSession::Agent
The agent running in the session.
-
#created_at ⇒ Integer
The Unix timestamp, in seconds, when the session was created.
-
#environment ⇒ OpenAI::Models::Beta::Environment::None, ...
The execution environment for the session.
-
#error ⇒ String?
The error that caused the session to fail, if any.
-
#id ⇒ String
The ID of the session.
-
#last_active_at ⇒ Integer
The Unix timestamp, in seconds, when the session was last active.
-
#metadata ⇒ Hash{Symbol=>String}
Custom string key-value pairs attached to the session.
-
#object ⇒ Symbol, :"agent.session"
The object type.
-
#required_actions ⇒ Array<OpenAI::Models::Beta::AgentSession::RequiredAction::FunctionCall, OpenAI::Models::Beta::AgentSession::RequiredAction::EnvironmentConnection>
Actions that must be completed before the session can continue.
-
#status ⇒ Symbol, OpenAI::Models::Beta::AgentSession::Status
The current status of the session.
-
#usage ⇒ OpenAI::Models::Beta::TokenUsage?
Recorded token usage for a session or turn.
-
#vault_ids ⇒ Array<String>
The IDs of vaults made available to the session.
Attributes inherited from Internal::Type::BaseModel
Class Method Summary collapse
- .values ⇒ Array<Symbol>
- .variants ⇒ Array(OpenAI::Models::Beta::AgentSession::RequiredAction::FunctionCall, OpenAI::Models::Beta::AgentSession::RequiredAction::EnvironmentConnection)
Instance Method Summary collapse
-
#initialize(environment_id:, type: :environment_connection) ⇒ Object
constructor
Reconnect a session environment.
- #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(environment_id:, type: :environment_connection) ⇒ Object
Reconnect a session environment.
|
|
# File 'lib/openai/models/beta/agent_session.rb', line 82
|
Instance Attribute Details
#agent ⇒ OpenAI::Models::Beta::AgentSession::Agent
The agent running in the session.
17 |
# File 'lib/openai/models/beta/agent_session.rb', line 17 required :agent, -> { OpenAI::Beta::AgentSession::Agent } |
#created_at ⇒ Integer
The Unix timestamp, in seconds, when the session was created.
23 |
# File 'lib/openai/models/beta/agent_session.rb', line 23 required :created_at, Integer |
#environment ⇒ OpenAI::Models::Beta::Environment::None, ...
The execution environment for the session.
29 |
# File 'lib/openai/models/beta/agent_session.rb', line 29 required :environment, union: -> { OpenAI::Beta::Environment } |
#error ⇒ String?
The error that caused the session to fail, if any.
35 |
# File 'lib/openai/models/beta/agent_session.rb', line 35 required :error, String, nil?: true |
#id ⇒ String
The ID of the session.
11 |
# File 'lib/openai/models/beta/agent_session.rb', line 11 required :id, String |
#last_active_at ⇒ Integer
The Unix timestamp, in seconds, when the session was last active.
41 |
# File 'lib/openai/models/beta/agent_session.rb', line 41 required :last_active_at, Integer |
#metadata ⇒ Hash{Symbol=>String}
Custom string key-value pairs attached to the session.
47 |
# File 'lib/openai/models/beta/agent_session.rb', line 47 required :metadata, OpenAI::Internal::Type::HashOf[String] |
#object ⇒ Symbol, :"agent.session"
The object type. Always agent.session.
53 |
# File 'lib/openai/models/beta/agent_session.rb', line 53 required :object, const: :"agent.session" |
#required_actions ⇒ Array<OpenAI::Models::Beta::AgentSession::RequiredAction::FunctionCall, OpenAI::Models::Beta::AgentSession::RequiredAction::EnvironmentConnection>
Actions that must be completed before the session can continue.
59 60 61 62 |
# File 'lib/openai/models/beta/agent_session.rb', line 59 required( :required_actions, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::AgentSession::RequiredAction] } ) |
#status ⇒ Symbol, OpenAI::Models::Beta::AgentSession::Status
The current status of the session.
68 |
# File 'lib/openai/models/beta/agent_session.rb', line 68 required :status, enum: -> { OpenAI::Beta::AgentSession::Status } |
#usage ⇒ OpenAI::Models::Beta::TokenUsage?
Recorded token usage for a session or turn. Usage is best effort and may change.
74 |
# File 'lib/openai/models/beta/agent_session.rb', line 74 required :usage, -> { OpenAI::Beta::TokenUsage }, nil?: true |
#vault_ids ⇒ Array<String>
The IDs of vaults made available to the session.
80 |
# File 'lib/openai/models/beta/agent_session.rb', line 80 required :vault_ids, OpenAI::Internal::Type::ArrayOf[String] |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/openai/models/beta/agent_session.rb', line 221
|
.variants ⇒ Array(OpenAI::Models::Beta::AgentSession::RequiredAction::FunctionCall, OpenAI::Models::Beta::AgentSession::RequiredAction::EnvironmentConnection)
|
|
# File 'lib/openai/models/beta/agent_session.rb', line 311
|
Instance Method Details
#to_hash ⇒ {
60 |
# File 'sig/openai/models/beta/agent_session.rbs', line 60
def to_hash: -> {
|