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

Returns a new instance of AgentSessionInputMessageParam.

Parameters:

  • content —

    The content of the message.

  • type (defaults to: nil) —

    The type of the input item. Always message.

  • role (defaults to: :user) —

    The role of the message author. Always user.

  • content: (::Array[OpenAI::Models::Beta::input_content_param])
  • type: (OpenAI::Models::Beta::AgentSessionInputMessageParam::type_) (defaults to: nil)
  • role: (:user) (defaults to: :user)


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

Instance Attribute Details

#content ⇒ ::Array[OpenAI::Models::Beta::input_content_param]

The content of the message.

Returns:

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


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

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

#role ⇒ :user

The role of the message author. Always user.

Returns:

  • (:user)


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

required :role, const: :user

#type ⇒ OpenAI::Models::Beta::AgentSessionInputMessageParam::type_?

The type of the input item. Always message.

Returns:

  • (OpenAI::Models::Beta::AgentSessionInputMessageParam::type_, nil)


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 ⇒ { content: ::Array[OpenAI::Models::Beta::input_content_param], ?role: :user, ?type: OpenAI::Models::Beta::AgentSessionInputMessageParam::type_ }

Returns:

  • ({ content: ::Array[OpenAI::Models::Beta::input_content_param], ?role: :user, ?type: OpenAI::Models::Beta::AgentSessionInputMessageParam::type_ })


38
39
40
41
42
# File 'sig/openai/models/beta/agent_session_input_message_param.rbs', line 38

def to_hash: -> {
  content: ::Array[OpenAI::Models::Beta::input_content_param],
  ?role: :user,
  ?type: OpenAI::Models::Beta::AgentSessionInputMessageParam::type_
}