Class: OpenAI::Models::Realtime::RealtimeFunctionTool

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

Defined Under Namespace

Modules: Type

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(description: nil, name: nil, parameters: nil, type: nil) ⇒ Object

Parameters:

  • description (defaults to: nil)

    The description of the function, including guidance on when and how to call it, and guidance about what to tell the user when calling (if anything).

  • name (defaults to: nil)

    The name of the function.

  • parameters (defaults to: nil)

    Parameters of the function in JSON Schema.

  • type (defaults to: nil)

    The type of the tool, i.e. function.



# File 'lib/openai/models/realtime/realtime_function_tool.rb', line 32

Instance Attribute Details

#descriptionString?

The description of the function, including guidance on when and how to call it, and guidance about what to tell the user when calling (if anything).

Returns:

  • (String, nil)


12
# File 'lib/openai/models/realtime/realtime_function_tool.rb', line 12

optional :description, String

#nameString?

The name of the function.

Returns:

  • (String, nil)


18
# File 'lib/openai/models/realtime/realtime_function_tool.rb', line 18

optional :name, String

#parameterstop?

Parameters of the function in JSON Schema.

Returns:

  • (top, nil)


24
# File 'lib/openai/models/realtime/realtime_function_tool.rb', line 24

optional :parameters, OpenAI::Internal::Type::Unknown

#typeOpenAI::Models::Realtime::RealtimeFunctionTool::type_?

The type of the tool, i.e. function.

Returns:

  • (OpenAI::Models::Realtime::RealtimeFunctionTool::type_, nil)


30
# File 'lib/openai/models/realtime/realtime_function_tool.rb', line 30

optional :type, enum: -> { OpenAI::Realtime::RealtimeFunctionTool::Type }

Instance Method Details

#to_hash{

Returns:

  • ({)


57
# File 'sig/openai/models/realtime/realtime_function_tool.rbs', line 57

def to_hash: -> {