Class: CircuitBreaker::Executors::LLM::SearchTool
- Defined in:
- lib/circuit_breaker/executors/llm/tools.rb
Overview
Example built-in tools
Instance Attribute Summary
Attributes inherited from Tool
#description, #name, #parameters
Instance Method Summary collapse
- #execute(query:) ⇒ Object
-
#initialize ⇒ SearchTool
constructor
A new instance of SearchTool.
Methods inherited from Tool
Constructor Details
#initialize ⇒ SearchTool
Returns a new instance of SearchTool.
58 59 60 61 62 63 64 65 66 |
# File 'lib/circuit_breaker/executors/llm/tools.rb', line 58 def initialize super( name: 'search', description: 'Search for information on a given topic', parameters: { query: { type: 'string', description: 'The search query' } } ) end |
Instance Method Details
#execute(query:) ⇒ Object
68 69 70 71 |
# File 'lib/circuit_breaker/executors/llm/tools.rb', line 68 def execute(query:) # Implement actual search logic here { results: "Search results for: #{query}" } end |