Class: RubyLLM::SemanticRouter::Strategies::Semantic::InMemoryMatch
- Inherits:
-
Object
- Object
- RubyLLM::SemanticRouter::Strategies::Semantic::InMemoryMatch
- Defined in:
- lib/rubyllm/semantic_router/strategies/semantic.rb
Overview
Wrapper for in-memory matches to provide a consistent interface
Instance Attribute Summary collapse
-
#distance ⇒ Object
readonly
Returns the value of attribute distance.
-
#example ⇒ Object
readonly
Returns the value of attribute example.
Instance Method Summary collapse
- #agent_name ⇒ Object
- #example_text ⇒ Object
-
#initialize(example, distance) ⇒ InMemoryMatch
constructor
A new instance of InMemoryMatch.
- #neighbor_distance ⇒ Object
Constructor Details
#initialize(example, distance) ⇒ InMemoryMatch
Returns a new instance of InMemoryMatch.
179 180 181 182 |
# File 'lib/rubyllm/semantic_router/strategies/semantic.rb', line 179 def initialize(example, distance) @example = example @distance = distance end |
Instance Attribute Details
#distance ⇒ Object (readonly)
Returns the value of attribute distance.
177 178 179 |
# File 'lib/rubyllm/semantic_router/strategies/semantic.rb', line 177 def distance @distance end |
#example ⇒ Object (readonly)
Returns the value of attribute example.
177 178 179 |
# File 'lib/rubyllm/semantic_router/strategies/semantic.rb', line 177 def example @example end |
Instance Method Details
#agent_name ⇒ Object
184 185 186 |
# File 'lib/rubyllm/semantic_router/strategies/semantic.rb', line 184 def agent_name example.agent_name end |
#example_text ⇒ Object
188 189 190 |
# File 'lib/rubyllm/semantic_router/strategies/semantic.rb', line 188 def example_text example.example_text end |
#neighbor_distance ⇒ Object
192 193 194 |
# File 'lib/rubyllm/semantic_router/strategies/semantic.rb', line 192 def neighbor_distance distance end |