Class: OpenAI::Models::Chat::CompletionCreateParams::Function Deprecated

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/chat/completion_create_params.rb,
sig/openai/models/chat/completion_create_params.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:

  • name —

    The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.

  • description —

    A description of what the function does, used by the model to choose when and how to call the function.

  • parameters —

    The parameters the functions accepts, described as a JSON Schema object. See the guide for examples, and the JSON Schema reference for documentation about the format.

    Omitting parameters defines a function with an empty parameter list.



838
# File 'sig/openai/models/chat/completion_create_params.rbs', line 838

def initialize: (

Instance Attribute Details

#description ⇒ String?

A description of what the function does, used by the model to choose when and how to call the function.

Returns:

  • (String, nil)


806
# File 'lib/openai/models/chat/completion_create_params.rb', line 806

optional :description, String

#name ⇒ String

The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.

Returns:

  • (String)


799
# File 'lib/openai/models/chat/completion_create_params.rb', line 799

required :name, String

#parameters ⇒ OpenAI::Models::function_parameters?

The parameters the functions accepts, described as a JSON Schema object. See the guide for examples, and the JSON Schema reference for documentation about the format.

Omitting parameters defines a function with an empty parameter list.

Returns:

  • (OpenAI::Models::function_parameters, nil)


818
# File 'lib/openai/models/chat/completion_create_params.rb', line 818

optional :parameters, OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown]

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


844
# File 'sig/openai/models/chat/completion_create_params.rbs', line 844

def to_hash: -> {