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

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

Overview

Deprecated.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, 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

This class inherits a constructor from OpenAI::Internal::Type::BaseModel

Instance Attribute Details

#descriptionString?

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

Returns:

  • (String, nil)


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

optional :description, String

#nameString

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)


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

required :name, String

#parametersHash{Symbol=>Object}?

The parameters the functions accepts, described as a JSON Schema object. See the [guide](platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](json-schema.org/understanding-json-schema/) for documentation about the format.

Omitting ‘parameters` defines a function with an empty parameter list.

Returns:

  • (Hash{Symbol=>Object}, nil)


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

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