Module: LLM::Tool::Param::Utils Private
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #fetch(properties, name) ⇒ Object private
- #resolve(schema, type) ⇒ Object private
- #setup(leaf, description, options) ⇒ Object private
Instance Method Details
#fetch(properties, name) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
91 92 93 |
# File 'lib/llm/tool/param.rb', line 91 def fetch(properties, name) properties[name] || properties.fetch(name.to_s) end |
#resolve(schema, type) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
76 77 78 |
# File 'lib/llm/tool/param.rb', line 76 def resolve(schema, type) LLM::Schema::Utils.resolve(schema, type) end |
#setup(leaf, description, options) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
80 81 82 83 84 85 86 87 88 89 |
# File 'lib/llm/tool/param.rb', line 80 def setup(leaf, description, ) required = .fetch(:required, false) default = .fetch(:default, nil) enum = .fetch(:enum, nil) leaf.required if required leaf.description(description) if description leaf.default(default) if default leaf.enum(*enum) if enum leaf end |