Class: OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent

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

Overview

See Also:

  • OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession#agent

Defined Under Namespace

Modules: ServiceTier Classes: Compaction, Experimental

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(time_awareness: nil) ⇒ Agent

Returns a new instance of Agent.

Parameters:

  • compaction —

    Context compaction settings. Omit to keep the current settings. A supplied object replaces the settings; null or an empty object uses blocking compaction.

  • experimental —

    Experimental settings to merge by key. Omitted settings keep their current values.

  • instructions —

    Additional instructions appended to the agent's default base instructions. Omit to leave unchanged.

  • model —

    The model to use for the agent. The requested model name is preserved.

  • multi_agent —

    Configuration for creating and coordinating subagents.

  • reasoning —

    Configuration for model reasoning. Omit to keep the current settings; pass null to reset to the model's default effort.

  • service_tier —

    The service tier used for model requests.

  • text —

    Configuration for text generated by the agent.

  • tools —

    Tools available to the agent. Omit to inherit, or pass null to clear them. The resolved tool list must fit within 8 MiB (8,388,608 bytes) of compact UTF-8 JSON.

  • compaction: (OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction, nil)
  • experimental: (OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental)
  • instructions: (String, nil)
  • model: (String)
  • multi_agent: (OpenAI::Beta::MultiAgentConfigParam, nil)
  • reasoning: (OpenAI::Beta::AgentReasoningParam, nil)
  • service_tier: (OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent::service_tier, nil)
  • text: (OpenAI::Beta::AgentTextParam, nil)
  • tools: (::Array[OpenAI::Models::Beta::agent_tool_param], nil)


# File 'lib/openai/models/beta/agents/automation_target_param.rb', line 167

Instance Attribute Details

#compaction ⇒ OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction?

Context compaction settings. Omit to keep the current settings. A supplied object replaces the settings; null or an empty object uses blocking compaction.

Returns:

  • (OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction, nil)


93
94
95
96
97
# File 'lib/openai/models/beta/agents/automation_target_param.rb', line 93

optional(
  :compaction,
  -> { OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction },
  nil?: true
)

#experimental ⇒ OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental?

Experimental settings to merge by key. Omitted settings keep their current values.

Returns:

  • (OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental, nil)


104
105
106
107
# File 'lib/openai/models/beta/agents/automation_target_param.rb', line 104

optional(
  :experimental,
  -> { OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental }
)

#instructions ⇒ String?

Additional instructions appended to the agent's default base instructions. Omit to leave unchanged.

Returns:

  • (String, nil)


114
# File 'lib/openai/models/beta/agents/automation_target_param.rb', line 114

optional :instructions, String, nil?: true

#model ⇒ String?

The model to use for the agent. The requested model name is preserved.

Returns:

  • (String, nil)


120
# File 'lib/openai/models/beta/agents/automation_target_param.rb', line 120

optional :model, String

#multi_agent ⇒ OpenAI::Beta::MultiAgentConfigParam?

Configuration for creating and coordinating subagents.

Returns:

  • (OpenAI::Beta::MultiAgentConfigParam, nil)


126
# File 'lib/openai/models/beta/agents/automation_target_param.rb', line 126

optional :multi_agent, -> { OpenAI::Beta::MultiAgentConfigParam }, nil?: true

#reasoning ⇒ OpenAI::Beta::AgentReasoningParam?

Configuration for model reasoning. Omit to keep the current settings; pass null to reset to the model's default effort.

Returns:

  • (OpenAI::Beta::AgentReasoningParam, nil)


133
# File 'lib/openai/models/beta/agents/automation_target_param.rb', line 133

optional :reasoning, -> { OpenAI::Beta::AgentReasoningParam }, nil?: true

#service_tier ⇒ OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent::service_tier?

The service tier used for model requests.

Returns:

  • (OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent::service_tier, nil)


139
140
141
142
143
144
145
# File 'lib/openai/models/beta/agents/automation_target_param.rb', line 139

optional(
  :service_tier,
  enum: -> {
    OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::ServiceTier
  },
  nil?: true
)

#text ⇒ OpenAI::Beta::AgentTextParam?

Configuration for text generated by the agent.

Returns:

  • (OpenAI::Beta::AgentTextParam, nil)


151
# File 'lib/openai/models/beta/agents/automation_target_param.rb', line 151

optional :text, -> { OpenAI::Beta::AgentTextParam }, nil?: true

#tools ⇒ ::Array[OpenAI::Models::Beta::agent_tool_param]?

Tools available to the agent. Omit to inherit, or pass null to clear them. The resolved tool list must fit within 8 MiB (8,388,608 bytes) of compact UTF-8 JSON.

Returns:

  • (::Array[OpenAI::Models::Beta::agent_tool_param], nil)


159
160
161
162
163
164
165
# File 'lib/openai/models/beta/agents/automation_target_param.rb', line 159

optional(
  :tools,
  -> {
    OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::AgentToolParam]
  },
  nil?: true
)

Instance Method Details

#to_hash ⇒ { ?compaction: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction?, ?experimental: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental, ?instructions: String?, ?model: String, ?multi_agent: OpenAI::Beta::MultiAgentConfigParam?, ?reasoning: OpenAI::Beta::AgentReasoningParam?, ?service_tier: OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent::service_tier?, ?text: OpenAI::Beta::AgentTextParam?, ?tools: ::Array[OpenAI::Models::Beta::agent_tool_param]? }

Returns:

  • ({ ?compaction: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction?, ?experimental: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental, ?instructions: String?, ?model: String, ?multi_agent: OpenAI::Beta::MultiAgentConfigParam?, ?reasoning: OpenAI::Beta::AgentReasoningParam?, ?service_tier: OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent::service_tier?, ?text: OpenAI::Beta::AgentTextParam?, ?tools: ::Array[OpenAI::Models::Beta::agent_tool_param]? })


179
180
181
182
183
184
185
186
187
188
189
# File 'sig/openai/models/beta/agents/automation_target_param.rbs', line 179

def to_hash: -> {
  ?compaction: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction?,
  ?experimental: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental,
  ?instructions: String?,
  ?model: String,
  ?multi_agent: OpenAI::Beta::MultiAgentConfigParam?,
  ?reasoning: OpenAI::Beta::AgentReasoningParam?,
  ?service_tier: OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent::service_tier?,
  ?text: OpenAI::Beta::AgentTextParam?,
  ?tools: ::Array[OpenAI::Models::Beta::agent_tool_param]?
}