Expand description
Route prompts to different handlers based on content and intent.
Rules are evaluated in descending priority order; the first matching rule
determines the RouteTarget. If no rule matches, a built-in default
rule that always routes to DirectModel("default") is used.
Structs§
- Prompt
Router - Routes prompts to targets by evaluating a sorted list of
RoutingRules. - Prompt
Router Builder - Fluent builder for
PromptRouter. - Routing
Decision - The result of routing a prompt.
- Routing
Rule - A single routing rule with priority and conditions.
Enums§
- Route
Target - Where a matched prompt should be sent.
- Routing
Condition - A condition that can be tested against a prompt string and optional intent.
Functions§
- evaluate_
condition - Evaluate a single condition; returns
(matched, description).