Class: OpenAI::Models::Chat::ChatCompletionToolMessageParam

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/chat/chat_completion_tool_message_param.rb

Defined Under Namespace

Modules: Content

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #dump, dump, #inspect, inspect, 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: , tool_call_id: , role: :tool) ⇒ Object

Parameters:

  • content (String, Array<OpenAI::Models::Chat::ChatCompletionContentPartText>) (defaults to: )

    The contents of the tool message.

  • tool_call_id (String) (defaults to: )

    Tool call that this message is responding to.

  • role (Symbol, :tool) (defaults to: :tool)

    The role of the messages author, in this case ‘tool`.



# File 'lib/openai/models/chat/chat_completion_tool_message_param.rb', line 25

Instance Attribute Details

#contentString, Array<OpenAI::Models::Chat::ChatCompletionContentPartText>

The contents of the tool message.



11
# File 'lib/openai/models/chat/chat_completion_tool_message_param.rb', line 11

required :content, union: -> { OpenAI::Chat::ChatCompletionToolMessageParam::Content }

#roleSymbol, :tool

The role of the messages author, in this case ‘tool`.

Returns:

  • (Symbol, :tool)


17
# File 'lib/openai/models/chat/chat_completion_tool_message_param.rb', line 17

required :role, const: :tool

#tool_call_idString

Tool call that this message is responding to.

Returns:

  • (String)


23
# File 'lib/openai/models/chat/chat_completion_tool_message_param.rb', line 23

required :tool_call_id, String