Class: OpenAI::Models::Live::FunctionTool
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Live::FunctionTool
- Defined in:
- lib/openai/models/live/function_tool.rb,
sig/openai/models/live/function_tool.rbs
Instance Attribute Summary collapse
-
#description ⇒ String?
What the function does and when the delegated Responses model should call it.
-
#name ⇒ String
The name the delegated Responses model uses when calling this function.
-
#parameters ⇒ Hash{Symbol=>Object}?
A JSON Schema object describing the arguments accepted by the function.
-
#strict ⇒ Boolean?
Whether the delegated Responses model must follow the function’s parameter schema exactly.
-
#type ⇒ Symbol, :function
The tool type.
Attributes inherited from Internal::Type::BaseModel
Instance Method Summary collapse
-
#initialize(name:, description: nil, parameters: nil, strict: nil, type: :function) ⇒ Object
constructor
A function tool available to the Responses backend when the Live model delegates a task.
- #to_hash ⇒ {
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(name:, description: nil, parameters: nil, strict: nil, type: :function) ⇒ Object
A function tool available to the Responses backend when the Live model delegates a task.
|
|
# File 'lib/openai/models/live/function_tool.rb', line 38
|
Instance Attribute Details
#description ⇒ String?
What the function does and when the delegated Responses model should call it.
23 |
# File 'lib/openai/models/live/function_tool.rb', line 23 optional :description, String, nil?: true |
#name ⇒ String
The name the delegated Responses model uses when calling this function.
11 |
# File 'lib/openai/models/live/function_tool.rb', line 11 required :name, String |
#parameters ⇒ Hash{Symbol=>Object}?
A JSON Schema object describing the arguments accepted by the function.
29 |
# File 'lib/openai/models/live/function_tool.rb', line 29 optional :parameters, OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown], nil?: true |
#strict ⇒ Boolean?
Whether the delegated Responses model must follow the function’s parameter schema exactly.
36 |
# File 'lib/openai/models/live/function_tool.rb', line 36 optional :strict, OpenAI::Internal::Type::Boolean, nil?: true |
#type ⇒ Symbol, :function
The tool type. Always function.
17 |
# File 'lib/openai/models/live/function_tool.rb', line 17 required :type, const: :function |
Instance Method Details
#to_hash ⇒ {
32 |
# File 'sig/openai/models/live/function_tool.rbs', line 32
def to_hash: -> {
|