Class: OpenAI::Models::Responses::CustomTool
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Responses::CustomTool
- Defined in:
- lib/openai/models/responses/custom_tool.rb
Instance Attribute Summary collapse
-
#description ⇒ String?
Optional description of the custom tool, used to provide more context.
-
#format_ ⇒ OpenAI::Models::CustomToolInputFormat::Text, ...
The input format for the custom tool.
-
#name ⇒ String
The name of the custom tool, used to identify it in tool calls.
-
#type ⇒ Symbol, :custom
The type of the custom tool.
Instance Method Summary collapse
-
#initialize(name:, description: nil, format_: nil, type: :custom) ⇒ Object
constructor
A custom tool that processes input using a specified format.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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, #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, format_: nil, type: :custom) ⇒ Object
A custom tool that processes input using a specified format. Learn more about [custom tools](platform.openai.com/docs/guides/function-calling#custom-tools)
|
|
# File 'lib/openai/models/responses/custom_tool.rb', line 31
|
Instance Attribute Details
#description ⇒ String?
Optional description of the custom tool, used to provide more context.
23 |
# File 'lib/openai/models/responses/custom_tool.rb', line 23 optional :description, String |
#format_ ⇒ OpenAI::Models::CustomToolInputFormat::Text, ...
The input format for the custom tool. Default is unconstrained text.
29 |
# File 'lib/openai/models/responses/custom_tool.rb', line 29 optional :format_, union: -> { OpenAI::CustomToolInputFormat }, api_name: :format |
#name ⇒ String
The name of the custom tool, used to identify it in tool calls.
11 |
# File 'lib/openai/models/responses/custom_tool.rb', line 11 required :name, String |
#type ⇒ Symbol, :custom
The type of the custom tool. Always ‘custom`.
17 |
# File 'lib/openai/models/responses/custom_tool.rb', line 17 required :type, const: :custom |