class Ollama::Tool::Function::Parameters::Property
)
enum: %w[celsius fahrenheit]
description: ‘Temperature unit’,
type: ‘string’,
property = Ollama::Tool::Function::Parameters::Property.new(
@example Creating a property with an enumeration of valid values
)
description: ‘The location to get weather for’
type: ‘string’,
property = Ollama::Tool::Function::Parameters::Property.new(
@example Creating a property with type and description
valid inputs.
its data type, descriptive text, and optional enumeration values that define
This class encapsulates the definition of an individual parameter, including
for a tool function.
A class that represents a single property within the parameters specification
def initialize(type:, description:, enum: nil)
-
enum(Array) -- an optional array of valid values that the property can take, nil -
description(String) -- a detailed explanation of what the property represents -
type(String) -- the data type of the property
def initialize(type:, description:, enum: nil) @type, @description, @enum = type, description, Array(enum) end