Enha: stricter stop string

This commit is contained in:
Grail Finder
2026-02-04 12:47:54 +03:00
parent 79861e7c2b
commit 7187df509f
3 changed files with 9 additions and 26 deletions

View File

@@ -382,9 +382,12 @@ func (cb *ChatBody) MakeStopSliceExcluding(
continue
}
// Add multiple variations to catch different formatting
ss = append(ss, role+":\n") // Most common: role with newline
ss = append(ss, role+":") // Role with colon but no newline
ss = append(ss, role+": ") // Role with colon and space
ss = append(ss, role+":\n") // Most common: role with newline
ss = append(ss, role+":") // Role with colon but no newline
ss = append(ss, role+": ") // Role with colon and single space
ss = append(ss, role+": ") // Role with colon and double space (common tokenization)
ss = append(ss, role+": \n") // Role with colon and double space (common tokenization)
ss = append(ss, role+": ") // Role with colon and triple space
}
return ss
}