Class: Relay::Tools::RelayKnowledge
- Inherits:
-
LLM::Tool
- Object
- LLM::Tool
- Relay::Tools::RelayKnowledge
- Includes:
- Relay::Tool
- Defined in:
- app/tools/relay_knowledge.rb
Overview
The RelayKnowledge tool provides the LLM with knowledge about Relay through its README documentation. This helps inform the LLM what about Relay is and what it does, since it is unlikely to be heard of by an LLM.
Instance Method Summary collapse
-
#call(topic:) ⇒ Hash
Provides the Relay documentation.
Methods included from Relay::Tool
Instance Method Details
#call(topic:) ⇒ Hash
Provides the Relay documentation
20 21 22 23 24 25 26 27 |
# File 'app/tools/relay_knowledge.rb', line 20 def call(topic:) case topic when "relay" then {directions:, documentation: fetch(relay_resources)} when "llm.rb" then {directions:, documentation: fetch(llmrb_resources)} when "mruby-llm" then {directions:, documentation: fetch(mruby_llm_resources)} else {error: "unknown topic: #{topic}"} end end |