Class: Relay::Tools::RelayKnowledge

Inherits:
LLM::Tool
  • Object
show all
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

Methods included from Relay::Tool

#root

Instance Method Details

#call(topic:) ⇒ Hash

Provides the Relay documentation

Returns:

  • (Hash)


19
20
21
22
23
24
25
# File 'app/tools/relay_knowledge.rb', line 19

def call(topic:)
  case topic
  when "relay" then {directions:, documentation: relay_documentation}
  when "llm.rb" then {directions:, documentation: llmrb_documentation}
  else {error: "unknown topic: #{topic}"}
  end
end