Module: OllamaChat::Tools::Concern
- Extended by:
- Tins::Concern
- Defined in:
- lib/ollama_chat/tools/concern.rb
Overview
A module that provides common functionality for OllamaChat tools.
This module serves as a base class for all tool implementations in the OllamaChat application, providing shared behavior and methods that tools can inherit from. It includes delegation to the tool name and registration functionality to integrate tools into the chat system’s tool registry.
Instance Method Summary collapse
-
#name ⇒ String
The name method returns the registered name of the tool.
-
#to_hash ⇒ Hash
The to_hash method converts the tool to a hash representation.
Instance Method Details
#name ⇒ String
The name method returns the registered name of the tool.
33 34 35 |
# File 'lib/ollama_chat/tools/concern.rb', line 33 def name self.class.register_name end |
#to_hash ⇒ Hash
The to_hash method converts the tool to a hash representation.
40 41 42 |
# File 'lib/ollama_chat/tools/concern.rb', line 40 def to_hash tool.to_hash end |