Class: OpenAI::Models::Chat::ChatCompletionFunctionMessageParam Deprecated

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

Overview

Deprecated.

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 ⇒ Object

Parameters:

  • content —

    The contents of the function message.

  • name —

    The name of the function to call.

  • role —

    The role of the messages author, in this case function.



25
# File 'sig/openai/models/chat/chat_completion_function_message_param.rbs', line 25

def initialize: (

Instance Attribute Details

#content ⇒ String?

The contents of the function message.

Returns:

  • (String, nil)


12
# File 'lib/openai/models/chat/chat_completion_function_message_param.rb', line 12

required :content, String, nil?: true

#name ⇒ String

The name of the function to call.

Returns:

  • (String)


18
# File 'lib/openai/models/chat/chat_completion_function_message_param.rb', line 18

required :name, String

#role ⇒ :function

The role of the messages author, in this case function.

Returns:

  • (:function)


24
# File 'lib/openai/models/chat/chat_completion_function_message_param.rb', line 24

required :role, const: :function

Instance Method Details

#to_hash ⇒ { content: String?, name: String, ?role: :function }

Returns:

  • ({ content: String?, name: String, ?role: :function })


31
# File 'sig/openai/models/chat/chat_completion_function_message_param.rbs', line 31

def to_hash: -> { content: String?, name: String, ?role: :function }