Class: OpenAI::Models::Beta::Agents::Automations::AutomationInvocation

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/agents/automations/automation_invocation.rb,
sig/openai/models/beta/agents/automations/automation_invocation.rbs

Overview

See Also:

  • OpenAI::Resources::Beta::Agents::Automations::Invocations#create

Defined Under Namespace

Modules: Status Classes: Error

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

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_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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(code:, message:) ⇒ AutomationInvocation

Returns a new instance of AutomationInvocation.

Parameters:

  • id —

    The invocation ID.

  • automation_id —

    The automation that owns the invocation.

  • created_at —

    The creation time as a Unix timestamp in seconds.

  • error —

    The permanent delivery failure, or null when no failure occurred.

  • scheduled_at —

    The intended occurrence as a Unix timestamp in seconds, or null for manual runs.

  • session_id —

    The target or newly created session ID, or null before one is available.

  • source —

    Whether the invocation was manual or scheduled.

  • status —

    Delivery status; completed does not mean the agent's work has finished.

  • object —

    Always agent.automation.invocation.

  • skip_reason —

    Why an occurrence was skipped, or null when it was not skipped.

  • id: (String)
  • automation_id: (String)
  • created_at: (Integer)
  • error: (OpenAI::Beta::Agents::Automations::AutomationInvocation::Error, nil)
  • scheduled_at: (Integer, nil)
  • session_id: (String, nil)
  • source: (OpenAI::Models::Beta::Agents::Automations::automation_invocation_source)
  • status: (OpenAI::Models::Beta::Agents::Automations::AutomationInvocation::status)
  • object: (:"agent.automation.invocation")
  • skip_reason: (:pending_delivery, nil)


# File 'lib/openai/models/beta/agents/automations/automation_invocation.rb', line 70


Instance Attribute Details

#automation_id ⇒ String

The automation that owns the invocation.

Returns:

  • (String)


20
# File 'lib/openai/models/beta/agents/automations/automation_invocation.rb', line 20

required :automation_id, String

#created_at ⇒ Integer

The creation time as a Unix timestamp in seconds.

Returns:

  • (Integer)


26
# File 'lib/openai/models/beta/agents/automations/automation_invocation.rb', line 26

required :created_at, Integer

#error ⇒ OpenAI::Beta::Agents::Automations::AutomationInvocation::Error?

The permanent delivery failure, or null when no failure occurred.

Returns:

  • (OpenAI::Beta::Agents::Automations::AutomationInvocation::Error, nil)


32
# File 'lib/openai/models/beta/agents/automations/automation_invocation.rb', line 32

required :error, -> { OpenAI::Beta::Agents::Automations::AutomationInvocation::Error }, nil?: true

#id ⇒ String

The invocation ID.

Returns:

  • (String)


14
# File 'lib/openai/models/beta/agents/automations/automation_invocation.rb', line 14

required :id, String

#object ⇒ :"agent.automation.invocation"

Always agent.automation.invocation.

Returns:

  • (:"agent.automation.invocation")


38
# File 'lib/openai/models/beta/agents/automations/automation_invocation.rb', line 38

required :object, const: :"agent.automation.invocation"

#scheduled_at ⇒ Integer?

The intended occurrence as a Unix timestamp in seconds, or null for manual runs.

Returns:

  • (Integer, nil)


44
# File 'lib/openai/models/beta/agents/automations/automation_invocation.rb', line 44

required :scheduled_at, Integer, nil?: true

#session_id ⇒ String?

The target or newly created session ID, or null before one is available.

Returns:

  • (String, nil)


50
# File 'lib/openai/models/beta/agents/automations/automation_invocation.rb', line 50

required :session_id, String, nil?: true

#skip_reason ⇒ :pending_delivery?

Why an occurrence was skipped, or null when it was not skipped.

Returns:

  • (:pending_delivery, nil)


56
# File 'lib/openai/models/beta/agents/automations/automation_invocation.rb', line 56

required :skip_reason, const: :pending_delivery, nil?: true

#source ⇒ OpenAI::Models::Beta::Agents::Automations::automation_invocation_source

Whether the invocation was manual or scheduled.

Returns:

  • (OpenAI::Models::Beta::Agents::Automations::automation_invocation_source)


62
# File 'lib/openai/models/beta/agents/automations/automation_invocation.rb', line 62

required :source, union: -> { OpenAI::Beta::Agents::Automations::AutomationInvocationSource }

#status ⇒ OpenAI::Models::Beta::Agents::Automations::AutomationInvocation::status

Delivery status; completed does not mean the agent's work has finished.

Returns:

  • (OpenAI::Models::Beta::Agents::Automations::AutomationInvocation::status)


68
# File 'lib/openai/models/beta/agents/automations/automation_invocation.rb', line 68

required :status, enum: -> { OpenAI::Beta::Agents::Automations::AutomationInvocation::Status }

Instance Method Details

#to_hash ⇒ { id: String, automation_id: String, created_at: Integer, error: OpenAI::Beta::Agents::Automations::AutomationInvocation::Error?, ?object: :"agent.automation.invocation", scheduled_at: Integer?, session_id: String?, ?skip_reason: :pending_delivery?, source: OpenAI::Models::Beta::Agents::Automations::automation_invocation_source, status: OpenAI::Models::Beta::Agents::Automations::AutomationInvocation::status }

Returns:

  • ({ id: String, automation_id: String, created_at: Integer, error: OpenAI::Beta::Agents::Automations::AutomationInvocation::Error?, ?object: :"agent.automation.invocation", scheduled_at: Integer?, session_id: String?, ?skip_reason: :pending_delivery?, source: OpenAI::Models::Beta::Agents::Automations::automation_invocation_source, status: OpenAI::Models::Beta::Agents::Automations::AutomationInvocation::status })


86
87
88
89
90
91
92
93
94
95
96
97
# File 'sig/openai/models/beta/agents/automations/automation_invocation.rbs', line 86

def to_hash: -> {
  id: String,
  automation_id: String,
  created_at: Integer,
  error: OpenAI::Beta::Agents::Automations::AutomationInvocation::Error?,
  ?object: :"agent.automation.invocation",
  scheduled_at: Integer?,
  session_id: String?,
  ?skip_reason: :pending_delivery?,
  source: OpenAI::Models::Beta::Agents::Automations::automation_invocation_source,
  status: OpenAI::Models::Beta::Agents::Automations::AutomationInvocation::status
}