Class: RubyLLM::SemanticRouter::Strategies::Base
- Inherits:
-
Object
- Object
- RubyLLM::SemanticRouter::Strategies::Base
- Defined in:
- lib/rubyllm/semantic_router/strategies/base.rb
Overview
Base class for routing strategies
Subclasses must implement the #route method which receives:
-
message: The user’s message to route
-
agents: Hash of agent_name => Agent objects
-
examples: The routing examples (ActiveRecord relation or array)
-
current_agent: The currently active agent name (symbol)
-
config: RouterConfig with threshold, fallback, etc.
The #route method should return a RoutingDecision object
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#route(message, agents:, examples:, current_agent:, config:) ⇒ Object
17 18 19 |
# File 'lib/rubyllm/semantic_router/strategies/base.rb', line 17 def route(, agents:, examples:, current_agent:, config:) raise NotImplementedError, "Subclasses must implement #route" end |