struct
AI::Provider::LanguageModel::FunctionTool
- AI::Provider::LanguageModel::FunctionTool
- Struct
- Value
- Object
Overview
A function tool definition.
Included Modules
- JSON::Serializable
Defined in:
ai/provider/language_model/types.crConstructors
- .new(name : String, input_schema : JSON::Any, description : String | Nil = nil, input_examples : Array(JSON::Any) | Nil = nil, strict : Bool | Nil = nil, provider_options : Shared::ProviderOptions | Nil = nil)
- .new(pull : JSON::PullParser)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
Instance Method Summary
-
#description : String | Nil
A description of the tool.
-
#input_examples : Array(JSON::Any) | Nil
Example inputs for the tool.
-
#input_schema : JSON::Any
The JSON schema for the tool's input parameters.
-
#name : String
The name of the tool.
-
#provider_options : Shared::ProviderOptions | Nil
Provider-specific options.
-
#strict : Bool | Nil
Whether strict mode is enabled.
-
#type : String
Always "function" for function tools.