Class: OpenAI::Models::Chat::ChatCompletionAllowedToolChoice

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

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

Returns a new instance of ChatCompletionAllowedToolChoice.

Parameters:

  • allowed_tools —

    Constrains the tools available to the model to a pre-defined set.

  • type —

    Allowed tool configuration type. Always allowed_tools.

  • allowed_tools: (OpenAI::Chat::ChatCompletionAllowedTools)
  • type: (:allowed_tools)


23
24
25
26
# File 'sig/openai/models/chat/chat_completion_allowed_tool_choice.rbs', line 23

def initialize: (
  allowed_tools: OpenAI::Chat::ChatCompletionAllowedTools,
  ?type: :allowed_tools
) -> void

Instance Attribute Details

#allowed_tools ⇒ OpenAI::Chat::ChatCompletionAllowedTools

Constrains the tools available to the model to a pre-defined set.

Returns:

  • (OpenAI::Chat::ChatCompletionAllowedTools)


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

required :allowed_tools, -> { OpenAI::Chat::ChatCompletionAllowedTools }

#type ⇒ :allowed_tools

Allowed tool configuration type. Always allowed_tools.

Returns:

  • (:allowed_tools)


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

required :type, const: :allowed_tools

Instance Method Details

#to_hash ⇒ { allowed_tools: OpenAI::Chat::ChatCompletionAllowedTools, ?type: :allowed_tools }

Returns:

  • ({ allowed_tools: OpenAI::Chat::ChatCompletionAllowedTools, ?type: :allowed_tools })


28
29
30
31
# File 'sig/openai/models/chat/chat_completion_allowed_tool_choice.rbs', line 28

def to_hash: -> {
  allowed_tools: OpenAI::Chat::ChatCompletionAllowedTools,
  ?type: :allowed_tools
}