Class: OpenAI::Models::Responses::FunctionTool
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- OpenAI::Models::Responses::FunctionTool
- Defined in:
- lib/openai/models/responses/function_tool.rb,
sig/openai/models/responses/function_tool.rbs
Defined Under Namespace
Modules: AllowedCaller
Instance Attribute Summary collapse
-
#allowed_callers ⇒ Array<Symbol, OpenAI::Models::Responses::FunctionTool::AllowedCaller>?
The tool invocation context(s).
-
#defer_loading ⇒ Boolean?
Whether this function is deferred and loaded via tool search.
-
#description ⇒ String?
A description of the function.
-
#name ⇒ String
The name of the function to call.
-
#output_schema ⇒ Hash{Symbol=>Object}?
A JSON schema object describing the JSON value encoded in string outputs for this function.
-
#parameters ⇒ Hash{Symbol=>Object}?
A JSON schema object describing the parameters of the function.
-
#strict ⇒ Boolean?
Whether strict parameter validation is enforced for this function tool.
-
#type ⇒ Symbol, :function
The type of the function tool.
Instance Method Summary collapse
- #initialize ⇒ Object constructor
- #to_hash ⇒ {
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 ⇒ Object
35 |
# File 'sig/openai/models/responses/function_tool.rbs', line 35
def initialize: (
|
Instance Attribute Details
#allowed_callers ⇒ Array<Symbol, OpenAI::Models::Responses::FunctionTool::AllowedCaller>?
The tool invocation context(s).
40 41 42 |
# File 'lib/openai/models/responses/function_tool.rb', line 40 optional :allowed_callers, -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Responses::FunctionTool::AllowedCaller] }, nil?: true |
#defer_loading ⇒ Boolean?
Whether this function is deferred and loaded via tool search.
48 |
# File 'lib/openai/models/responses/function_tool.rb', line 48 optional :defer_loading, OpenAI::Internal::Type::Boolean |
#description ⇒ String?
A description of the function. Used by the model to determine whether or not to call the function.
55 |
# File 'lib/openai/models/responses/function_tool.rb', line 55 optional :description, String, nil?: true |
#name ⇒ String
The name of the function to call.
11 |
# File 'lib/openai/models/responses/function_tool.rb', line 11 required :name, String |
#output_schema ⇒ Hash{Symbol=>Object}?
A JSON schema object describing the JSON value encoded in string outputs for this function.
62 |
# File 'lib/openai/models/responses/function_tool.rb', line 62 optional :output_schema, OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown], nil?: true |
#parameters ⇒ Hash{Symbol=>Object}?
A JSON schema object describing the parameters of the function.
17 18 19 20 21 22 |
# File 'lib/openai/models/responses/function_tool.rb', line 17 required :parameters, union: OpenAI::UnionOf[ OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown], OpenAI::StructuredOutput::JsonSchemaConverter ], nil?: true |
#strict ⇒ Boolean?
Whether strict parameter validation is enforced for this function tool.
28 |
# File 'lib/openai/models/responses/function_tool.rb', line 28 required :strict, OpenAI::Internal::Type::Boolean, nil?: true |
#type ⇒ Symbol, :function
The type of the function tool. Always function.
34 |
# File 'lib/openai/models/responses/function_tool.rb', line 34 required :type, const: :function |
Instance Method Details
#to_hash ⇒ {
46 |
# File 'sig/openai/models/responses/function_tool.rbs', line 46
def to_hash: -> {
|