class
OpenRouter::Tool
- OpenRouter::Tool
- Reference
- Object
Included Modules
- JSON::Serializable
Defined in:
openrouter/types/tool.crConstructors
- .new(parser : JSON::PullParser)
- .new(function : Function)
- .new(name : String, description : String | Nil = nil, parameters : Array(FunctionParameter) = [] of FunctionParameter)
Class Method Summary
-
.from_json(string_or_io)
Custom deserialization to handle complex function structure
Instance Method Summary
- #function : Function
- #function=(function : Function)
-
#to_json(json : JSON::Builder)
Custom serialization for complex structure
- #type : String
- #type=(type : String)
Constructor Detail
def self.new(name : String, description : String | Nil = nil, parameters : Array(FunctionParameter) = [] of FunctionParameter)
#