Class: OpenAI::Models::Live::DelegationCreatedEvent::Delegation

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/live/delegation_created_event.rb,
sig/openai/models/live/delegation_created_event.rbs

Overview

See Also:

  • OpenAI::Models::Live::DelegationCreatedEvent#delegation

Defined Under Namespace

Modules: Target

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_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:, target:, response_id: nil, type: :delegation) ⇒ Object

The delegated work identifier and destination. This object contains metadata, not the task text.

Parameters:

  • id (String)

    The unique ID of the delegation. Use this as delegation_id when replying to client-owned work or correlating Responses events.

  • target (Symbol, OpenAI::Models::Live::DelegationCreatedEvent::Delegation::Target)

    Where the Live model delegated the work: client for your application, or responses for the configured Responses backend.

  • response_id (String) (defaults to: nil)

    The ID of the Responses API response associated with a Responses delegation. Omitted for client delegations.

  • type (Symbol, :delegation) (defaults to: :delegation)

    The object type, always delegation.



# File 'lib/openai/models/live/delegation_created_event.rb', line 92

Instance Attribute Details

#idString

The unique ID of the delegation. Use this as delegation_id when replying to client-owned work or correlating Responses events.

Parameters:

  • value (String)

Returns:

  • (String)


70
# File 'lib/openai/models/live/delegation_created_event.rb', line 70

required :id, String

#response_idString?

The ID of the Responses API response associated with a Responses delegation. Omitted for client delegations.

Parameters:

  • (String)

Returns:

  • (String, nil)


90
# File 'lib/openai/models/live/delegation_created_event.rb', line 90

optional :response_id, String

#targetSymbol, OpenAI::Models::Live::DelegationCreatedEvent::Delegation::Target

Where the Live model delegated the work: client for your application, or responses for the configured Responses backend.

Parameters:

  • value (OpenAI::Models::Live::DelegationCreatedEvent::Delegation::target)

Returns:



77
# File 'lib/openai/models/live/delegation_created_event.rb', line 77

required :target, union: -> { OpenAI::Live::DelegationCreatedEvent::Delegation::Target }

#typeSymbol, :delegation

The object type, always delegation.

Parameters:

  • value (:delegation)

Returns:

  • (Symbol, :delegation)


83
# File 'lib/openai/models/live/delegation_created_event.rb', line 83

required :type, const: :delegation

Instance Method Details

#to_hash{

Returns:

  • ({)


68
# File 'sig/openai/models/live/delegation_created_event.rbs', line 68

def to_hash: -> {