Class: OpenAI::Models::Beta::Agents::SessionCreateParams::Agent
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Beta::Agents::SessionCreateParams::Agent
- Defined in:
- lib/openai/models/beta/agents/session_create_params.rb,
sig/openai/models/beta/agents/session_create_params.rbs
Defined Under Namespace
Modules: ServiceTier
Instance Attribute Summary collapse
-
#instructions ⇒ String?
Additional instructions appended to the agent's default base instructions.
-
#model ⇒ String?
The model to use for the agent.
-
#multi_agent ⇒ OpenAI::Beta::MultiAgentConfigParam?
Configuration for creating and coordinating subagents.
-
#reasoning ⇒ OpenAI::Beta::AgentReasoningParam?
Configuration for model reasoning.
-
#service_tier ⇒ OpenAI::Models::Beta::Agents::SessionCreateParams::Agent::service_tier?
The service tier used for model requests.
-
#text ⇒ OpenAI::Beta::AgentTextParam?
Configuration for text generated by the agent.
-
#tools ⇒ ::Array[OpenAI::Models::Beta::agent_tool_param]?
Tools available to the agent.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
- #initialize(instructions: nil, model: nil, multi_agent: nil, reasoning: nil, service_tier: nil, text: nil, tools: nil) ⇒ Object constructor
- #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(instructions: nil, model: nil, multi_agent: nil, reasoning: nil, service_tier: nil, text: nil, tools: nil) ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 83 class Agent < OpenAI::Internal::Type::BaseModel # @!attribute instructions # Additional instructions appended to the agent's default base instructions. Omit # to leave unchanged. # # @return [String, nil] optional :instructions, String, nil?: true # @!attribute model # The model to use for the agent. The requested model name is preserved. # # @return [String, nil] optional :model, String # @!attribute multi_agent # Configuration for creating and coordinating subagents. # # @return [OpenAI::Models::Beta::MultiAgentConfigParam, nil] optional :multi_agent, -> { OpenAI::Beta::MultiAgentConfigParam }, nil?: true # @!attribute reasoning # Configuration for model reasoning. Omit to keep the current settings; pass # `null` to reset to the model's default effort. # # @return [OpenAI::Models::Beta::AgentReasoningParam, nil] optional :reasoning, -> { OpenAI::Beta::AgentReasoningParam }, nil?: true # @!attribute service_tier # The service tier used for model requests. # # @return [Symbol, OpenAI::Models::Beta::Agents::SessionCreateParams::Agent::ServiceTier, nil] optional( :service_tier, enum: -> { OpenAI::Beta::Agents::SessionCreateParams::Agent::ServiceTier }, nil?: true ) # @!attribute text # Configuration for text generated by the agent. # # @return [OpenAI::Models::Beta::AgentTextParam, nil] optional :text, -> { OpenAI::Beta::AgentTextParam }, nil?: true # @!attribute tools # Tools available to the agent. Omit to inherit, or pass null to clear them. # # @return [Array<OpenAI::Models::Beta::AgentToolParam::Function, OpenAI::Models::Beta::AgentToolParam::ToolSearch, OpenAI::Models::Beta::AgentToolParam::ProgrammaticToolCalling, OpenAI::Models::Beta::AgentToolParam::Mcp, OpenAI::Models::Beta::AgentToolParam::WebSearch>, nil] optional( :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::AgentToolParam] }, nil?: true ) # @!method initialize(instructions: nil, model: nil, multi_agent: nil, reasoning: nil, service_tier: nil, text: nil, tools: nil) # Agent configuration. With `agent_id`, supplied fields override the saved agent # for this session. Without `agent_id`, `model` is required. # # @param instructions [String, nil] # Additional instructions appended to the agent's default base instructions. Omit # to leave unchanged. # # @param model [String] # The model to use for the agent. The requested model name is preserved. # # @param multi_agent [OpenAI::Models::Beta::MultiAgentConfigParam, nil] # Configuration for creating and coordinating subagents. # # @param reasoning [OpenAI::Models::Beta::AgentReasoningParam, nil] # Configuration for model reasoning. Omit to keep the current settings; pass # `null` to reset to the model's default effort. # # @param service_tier [Symbol, OpenAI::Models::Beta::Agents::SessionCreateParams::Agent::ServiceTier, nil] # The service tier used for model requests. # # @param text [OpenAI::Models::Beta::AgentTextParam, nil] # Configuration for text generated by the agent. # # @param tools [Array<OpenAI::Models::Beta::AgentToolParam::Function, OpenAI::Models::Beta::AgentToolParam::ToolSearch, OpenAI::Models::Beta::AgentToolParam::ProgrammaticToolCalling, OpenAI::Models::Beta::AgentToolParam::Mcp, OpenAI::Models::Beta::AgentToolParam::WebSearch>, nil] # Tools available to the agent. Omit to inherit, or pass null to clear them. # The service tier used for model requests. # # @see OpenAI::Models::Beta::Agents::SessionCreateParams::Agent#service_tier module ServiceTier extend OpenAI::Internal::Type::Enum # Selects the service tier automatically. AUTO = :auto # Uses the default service tier. DEFAULT = :default # Uses the flex service tier. FLEX = :flex # Uses the priority service tier. PRIORITY = :priority # Uses the fast service tier. FAST = :fast # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#instructions ⇒ String?
Additional instructions appended to the agent's default base instructions. Omit to leave unchanged.
89 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 89 optional :instructions, String, nil?: true |
#model ⇒ String?
The model to use for the agent. The requested model name is preserved.
95 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 95 optional :model, String |
#multi_agent ⇒ OpenAI::Beta::MultiAgentConfigParam?
Configuration for creating and coordinating subagents.
101 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 101 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.
108 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 108 optional :reasoning, -> { OpenAI::Beta::AgentReasoningParam }, nil?: true |
#service_tier ⇒ OpenAI::Models::Beta::Agents::SessionCreateParams::Agent::service_tier?
The service tier used for model requests.
114 115 116 117 118 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 114 optional( :service_tier, enum: -> { OpenAI::Beta::Agents::SessionCreateParams::Agent::ServiceTier }, nil?: true ) |
#text ⇒ OpenAI::Beta::AgentTextParam?
Configuration for text generated by the agent.
124 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 124 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.
130 131 132 133 134 135 136 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 130 optional( :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::AgentToolParam] }, nil?: true ) |
Instance Method Details
#to_hash ⇒ {
156 |
# File 'sig/openai/models/beta/agents/session_create_params.rbs', line 156
def to_hash: -> {
|