Skip to content

Match

pkgs/genx/match Compiles YAML rules into matchers and performs template, variable and optional model-assisted matching on genx.Message. It is suitable for declaratively identifying input intent or extracting rule results.

Go API References

Core structure and main function

SymbolFunction
RuleDefine matching rules, patterns, arguments and examples.
PatternDescribes a single matching pattern.
MatcherHolds the compiled rules and performs matching.
ResultReturns the hit rule and parsing parameters.
ParseRuleYAMLParse a single Rule from YAML.
CompileVerify and compile Rules into Matcher.
CollectCollect the results or errors of matcher iterator.

Match is only responsible for rule evaluation and does not own Agent routing, HTTP endpoints or workflow lifecycle. The caller decides subsequent product behavior based on the matching results.