You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* grammar : add support for std::regex_search() with trigger patterns
* common : update hermes2 pro trigger to search instead of match
* common : use regex_search with anchoring for partial matching
* common : adjust regex partial tests to use new pattern
* grammar : check pattern directly instead of adding a type
* common : adjust existing patterns to match new semantics
// Trigger on some common known "good bad" outputs (only from the start and with a json that's about a specific argument name to avoid false positives)
2400
2400
data.grammar_triggers.push_back({
2401
-
COMMON_GRAMMAR_TRIGGER_TYPE_PATTERN_FULL,
2401
+
COMMON_GRAMMAR_TRIGGER_TYPE_PATTERN,
2402
2402
// If thinking_forced_open, then we capture the </think> tag in the grammar,
2403
2403
// (important for required tool choice) and in the trigger's first capture (decides what is sent to the grammar)
The regex will match a reversed string fully, and the end of the first (And only) capturing group will indicate the reversed start of the original partial pattern
69
-
(i.e. just where the final .* starts in the inverted pattern; all other groups are turned into non-capturing groups, and reluctant quantifiers are ignored)
68
+
The regex will match a reversed string fully, and the end of the first (And only) capturing group will indicate the reversed start of the original partial pattern.
69
+
All other groups are turned into non-capturing groups, and reluctant quantifiers are ignored.
0 commit comments