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::Models::Beta::MultiAgentConfigParam?
Explicit configuration for creating and coordinating subagents.
-
#reasoning ⇒ OpenAI::Models::Beta::AgentReasoningParam?
Reasoning configuration for the agent.
-
#service_tier ⇒ Symbol, ...
The service tier used for model requests.
-
#text ⇒ OpenAI::Models::Beta::AgentTextParam?
Configuration for text generated by the agent.
-
#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>?
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
Agent configuration.
- #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
Agent configuration. With agent_id, supplied fields override the saved agent
for this session. Without agent_id, model is required.
77 78 79 80 81 82 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 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 77 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 # Explicit configuration for creating and coordinating subagents. # # @return [OpenAI::Models::Beta::MultiAgentConfigParam, nil] optional :multi_agent, -> { OpenAI::Beta::MultiAgentConfigParam }, nil?: true # @!attribute reasoning # Reasoning configuration for the agent. # # @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] # Explicit configuration for creating and coordinating subagents. # # @param reasoning [OpenAI::Models::Beta::AgentReasoningParam, nil] # Reasoning configuration for the agent. # # @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.
83 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 83 optional :instructions, String, nil?: true |
#model ⇒ String?
The model to use for the agent. The requested model name is preserved.
89 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 89 optional :model, String |
#multi_agent ⇒ OpenAI::Models::Beta::MultiAgentConfigParam?
Explicit configuration for creating and coordinating subagents.
95 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 95 optional :multi_agent, -> { OpenAI::Beta::MultiAgentConfigParam }, nil?: true |
#reasoning ⇒ OpenAI::Models::Beta::AgentReasoningParam?
Reasoning configuration for the agent.
101 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 101 optional :reasoning, -> { OpenAI::Beta::AgentReasoningParam }, nil?: true |
#service_tier ⇒ Symbol, ...
The service tier used for model requests.
107 108 109 110 111 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 107 optional( :service_tier, enum: -> { OpenAI::Beta::Agents::SessionCreateParams::Agent::ServiceTier }, nil?: true ) |
#text ⇒ OpenAI::Models::Beta::AgentTextParam?
Configuration for text generated by the agent.
117 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 117 optional :text, -> { OpenAI::Beta::AgentTextParam }, nil?: true |
#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>?
Tools available to the agent. Omit to inherit, or pass null to clear them.
123 124 125 126 127 128 129 |
# File 'lib/openai/models/beta/agents/session_create_params.rb', line 123 optional( :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::AgentToolParam] }, nil?: true ) |
Instance Method Details
#to_hash ⇒ {
96 |
# File 'sig/openai/models/beta/agents/session_create_params.rbs', line 96
def to_hash: -> {
|