Class: OpenAI::Models::Live::ResponsesDelegationConfig

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

Defined Under Namespace

Modules: ServiceTier, Tool, ToolChoice Classes: Reasoning, Text

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

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(model:, instructions: nil, max_output_tokens: nil, parallel_tool_calls: nil, reasoning: nil, service_tier: nil, text: nil, tool_choice: nil, tools: nil) ⇒ ResponsesDelegationConfig

Returns a new instance of ResponsesDelegationConfig.

Parameters:

  • model —

    The model used for server-owned Responses delegations.

  • instructions (defaults to: nil) —

    Instructions for the delegated Responses model, separate from Live instructions. See backend prompting.

  • max_output_tokens (defaults to: nil) —

    Maximum number of output tokens for each delegated response.

  • parallel_tool_calls (defaults to: nil) —

    Whether the delegated Responses model may request multiple tool calls in a single response.

  • reasoning (defaults to: nil) —

    Reasoning settings passed to each delegated Responses request.

  • service_tier (defaults to: nil) —

    Service tier for delegated Responses requests.

  • text (defaults to: nil) —

    Text generation settings passed to each delegated Responses request.

  • tool_choice (defaults to: nil) —

    Controls which tool the Responses backend uses when handling a task delegated by the Live model.

  • tools (defaults to: nil) —

    Tools available to the Responses backend while it handles tasks delegated by the Live model.

  • model: (String)
  • instructions: (String, nil) (defaults to: nil)
  • max_output_tokens: (Integer, nil) (defaults to: nil)
  • parallel_tool_calls: (Boolean, nil) (defaults to: nil)
  • reasoning: (OpenAI::Live::ResponsesDelegationConfig::Reasoning, nil) (defaults to: nil)
  • service_tier: (OpenAI::Models::Live::ResponsesDelegationConfig::service_tier, nil) (defaults to: nil)
  • text: (OpenAI::Live::ResponsesDelegationConfig::Text, nil) (defaults to: nil)
  • tool_choice: (OpenAI::Models::Live::ResponsesDelegationConfig::tool_choice) (defaults to: nil)
  • tools: (::Array[OpenAI::Models::Live::ResponsesDelegationConfig::tool]) (defaults to: nil)


# File 'lib/openai/models/live/responses_delegation_config.rb', line 69

Instance Attribute Details

#instructions ⇒ String?

Instructions for the delegated Responses model, separate from Live instructions. See backend prompting.

Returns:

  • (String, nil)


19
# File 'lib/openai/models/live/responses_delegation_config.rb', line 19

optional :instructions, String, nil?: true

#max_output_tokens ⇒ Integer?

Maximum number of output tokens for each delegated response.

Returns:

  • (Integer, nil)


25
# File 'lib/openai/models/live/responses_delegation_config.rb', line 25

optional :max_output_tokens, Integer, nil?: true

#model ⇒ String

The model used for server-owned Responses delegations.

Returns:

  • (String)


11
# File 'lib/openai/models/live/responses_delegation_config.rb', line 11

required :model, String

#parallel_tool_calls ⇒ Boolean?

Whether the delegated Responses model may request multiple tool calls in a single response.

Returns:



32
# File 'lib/openai/models/live/responses_delegation_config.rb', line 32

optional :parallel_tool_calls, OpenAI::Internal::Type::Boolean, nil?: true

#reasoning ⇒ OpenAI::Live::ResponsesDelegationConfig::Reasoning?

Reasoning settings passed to each delegated Responses request.

Returns:

  • (OpenAI::Live::ResponsesDelegationConfig::Reasoning, nil)


38
# File 'lib/openai/models/live/responses_delegation_config.rb', line 38

optional :reasoning, -> { OpenAI::Live::ResponsesDelegationConfig::Reasoning }, nil?: true

#service_tier ⇒ OpenAI::Models::Live::ResponsesDelegationConfig::service_tier?

Service tier for delegated Responses requests.

Returns:

  • (OpenAI::Models::Live::ResponsesDelegationConfig::service_tier, nil)


44
# File 'lib/openai/models/live/responses_delegation_config.rb', line 44

optional :service_tier, enum: -> { OpenAI::Live::ResponsesDelegationConfig::ServiceTier }, nil?: true

#text ⇒ OpenAI::Live::ResponsesDelegationConfig::Text?

Text generation settings passed to each delegated Responses request.

Returns:

  • (OpenAI::Live::ResponsesDelegationConfig::Text, nil)


50
# File 'lib/openai/models/live/responses_delegation_config.rb', line 50

optional :text, -> { OpenAI::Live::ResponsesDelegationConfig::Text }, nil?: true

#tool_choice ⇒ OpenAI::Models::Live::ResponsesDelegationConfig::tool_choice?

Controls which tool the Responses backend uses when handling a task delegated by the Live model.

Returns:

  • (OpenAI::Models::Live::ResponsesDelegationConfig::tool_choice, nil)


57
# File 'lib/openai/models/live/responses_delegation_config.rb', line 57

optional :tool_choice, union: -> { OpenAI::Live::ResponsesDelegationConfig::ToolChoice }

#tools ⇒ ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::tool]?

Tools available to the Responses backend while it handles tasks delegated by the Live model.

Returns:

  • (::Array[OpenAI::Models::Live::ResponsesDelegationConfig::tool], nil)


64
65
66
67
# File 'lib/openai/models/live/responses_delegation_config.rb', line 64

optional(
  :tools,
  -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Live::ResponsesDelegationConfig::Tool] }
)

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/live/responses_delegation_config.rb', line 173

.variants ⇒ Array(Symbol, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveToolChoiceEnum, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::Function, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::Mcp, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::FileSearch, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::WebSearch, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::WebSearchPreview, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::ImageGeneration, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::Computer, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::CodeInterpreter, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::ProgrammaticToolCalling, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::Shell, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::Custom, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::ApplyPatch, OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam)



# File 'lib/openai/models/live/responses_delegation_config.rb', line 792

Instance Method Details

#to_hash ⇒ { model: String, ?instructions: String?, ?max_output_tokens: Integer?, ?parallel_tool_calls: bool?, ?reasoning: OpenAI::Live::ResponsesDelegationConfig::Reasoning?, ?service_tier: OpenAI::Models::Live::ResponsesDelegationConfig::service_tier?, ?text: OpenAI::Live::ResponsesDelegationConfig::Text?, ?tool_choice: OpenAI::Models::Live::ResponsesDelegationConfig::tool_choice, ?tools: ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::tool] }

Returns:

  • ({ model: String, ?instructions: String?, ?max_output_tokens: Integer?, ?parallel_tool_calls: bool?, ?reasoning: OpenAI::Live::ResponsesDelegationConfig::Reasoning?, ?service_tier: OpenAI::Models::Live::ResponsesDelegationConfig::service_tier?, ?text: OpenAI::Live::ResponsesDelegationConfig::Text?, ?tool_choice: OpenAI::Models::Live::ResponsesDelegationConfig::tool_choice, ?tools: ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::tool] })


97
98
99
100
101
102
103
104
105
106
107
# File 'sig/openai/models/live/responses_delegation_config.rbs', line 97

def to_hash: -> {
  model: String,
  ?instructions: String?,
  ?max_output_tokens: Integer?,
  ?parallel_tool_calls: bool?,
  ?reasoning: OpenAI::Live::ResponsesDelegationConfig::Reasoning?,
  ?service_tier: OpenAI::Models::Live::ResponsesDelegationConfig::service_tier?,
  ?text: OpenAI::Live::ResponsesDelegationConfig::Text?,
  ?tool_choice: OpenAI::Models::Live::ResponsesDelegationConfig::tool_choice,
  ?tools: ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::tool]
}