Class: OpenAI::Models::Beta::AgentSessionInputMessageParam

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

Defined Under Namespace

Modules: Type

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_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(content:, type: nil, role: :user) ⇒ Object

A user message submitted to a session.

Parameters:



# File 'lib/openai/models/beta/agent_session_input_message_param.rb', line 25

Instance Attribute Details

#contentArray<OpenAI::Models::Beta::InputContentParam::InputText, OpenAI::Models::Beta::InputContentParam::InputImage>

The content of the message.

Parameters:

  • value (::Array[OpenAI::Models::Beta::input_content_param])

Returns:



11
# File 'lib/openai/models/beta/agent_session_input_message_param.rb', line 11

required :content, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::InputContentParam] }

#roleSymbol, :user

The role of the message author. Always user.

Parameters:

  • value (:user)

Returns:

  • (Symbol, :user)


17
# File 'lib/openai/models/beta/agent_session_input_message_param.rb', line 17

required :role, const: :user

#typeSymbol, ...

The type of the input item. Always message.



23
# File 'lib/openai/models/beta/agent_session_input_message_param.rb', line 23

optional :type, enum: -> { OpenAI::Beta::AgentSessionInputMessageParam::Type }

Instance Method Details

#to_hash{

Returns:

  • ({)


28
# File 'sig/openai/models/beta/agent_session_input_message_param.rbs', line 28

def to_hash: -> {