Module: OllamaChat::Tools
- Defined in:
- lib/ollama_chat/tools.rb
Overview
A module that provides tool registration and management for OllamaChat.
The Tools module serves as a registry for available tools that can be invoked during chat conversations. It maintains a collection of registered tools and provides methods for registering new tools and accessing the complete set of available tools for use in chat interactions.
Defined Under Namespace
Classes: CVE, DirectoryStructure, EndOfLife, FileContext, Grep, Location, Weather
Class Attribute Summary collapse
-
.registered ⇒ Hash
The registered attribute reader.
Class Method Summary collapse
-
.register(tool) ⇒ OllamaChat::Tools
The register method adds a new tool to the registry.
Class Attribute Details
.registered ⇒ Hash
The registered attribute reader
14 15 16 |
# File 'lib/ollama_chat/tools.rb', line 14 def registered @registered end |
Class Method Details
.register(tool) ⇒ OllamaChat::Tools
The register method adds a new tool to the registry.
20 21 22 23 24 |
# File 'lib/ollama_chat/tools.rb', line 20 def register(tool) tool = tool.new registered[tool.name] = tool self end |