Class: OpenAI::Models::Beta::Agents::AutomationTarget::NewSession::Input
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Beta::Agents::AutomationTarget::NewSession::Input
- Defined in:
- lib/openai/models/beta/agents/automation_target.rb,
sig/openai/models/beta/agents/automation_target.rbs
Instance Attribute Summary collapse
-
#content ⇒ ::Array[OpenAI::Models::Beta::input_content]
The content of the message.
-
#role ⇒ :user
The role of the message author.
-
#type ⇒ :message
The type of the input item.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(agent:, agent_id:, environment:, input:, metadata:, vault_ids:, type: :new_session) ⇒ Input
constructor
A new instance of Input.
- #to_hash ⇒ { content: ::Array[OpenAI::Models::Beta::input_content], ?role: :user, ?type: :message }
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(agent:, agent_id:, environment:, input:, metadata:, vault_ids:, type: :new_session) ⇒ Input
Returns a new instance of Input.
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 |
# File 'lib/openai/models/beta/agents/automation_target.rb', line 84 class Input < OpenAI::Internal::Type::BaseModel # @!attribute content # The content of the message. # # @return [Array<OpenAI::Models::Beta::InputContent::InputText, OpenAI::Models::Beta::InputContent::InputImage>] required :content, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::InputContent] } # @!attribute role # The role of the message author. Always `user`. # # @return [Symbol, :user] required :role, const: :user # @!attribute type # The type of the input item. Always `message`. # # @return [Symbol, :message] required :type, const: :message # @!method initialize(content:, role: :user, type: :message) # A user message recorded in a session. # # @param content [Array<OpenAI::Models::Beta::InputContent::InputText, OpenAI::Models::Beta::InputContent::InputImage>] # The content of the message. # # @param role [Symbol, :user] # The role of the message author. Always `user`. # # @param type [Symbol, :message] # The type of the input item. Always `message`. end |
Instance Attribute Details
#content ⇒ ::Array[OpenAI::Models::Beta::input_content]
The content of the message.
89 |
# File 'lib/openai/models/beta/agents/automation_target.rb', line 89 required :content, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::InputContent] } |
#role ⇒ :user
The role of the message author. Always user.
95 |
# File 'lib/openai/models/beta/agents/automation_target.rb', line 95 required :role, const: :user |
#type ⇒ :message
The type of the input item. Always message.
101 |
# File 'lib/openai/models/beta/agents/automation_target.rb', line 101 required :type, const: :message |
Instance Method Details
#to_hash ⇒ { content: ::Array[OpenAI::Models::Beta::input_content], ?role: :user, ?type: :message }
108 109 110 111 112 |
# File 'sig/openai/models/beta/agents/automation_target.rbs', line 108
def to_hash: -> {
content: ::Array[OpenAI::Models::Beta::input_content],
?role: :user,
?type: :message
}
|