Another explanatory comment

This commit is contained in:
valadaptive
2023-12-12 16:36:47 -05:00
parent 87cbe361fc
commit 7732865e4c

View File

@ -2805,6 +2805,8 @@ class StreamingProcessor {
scrollLock = false;
}
// Stopping strings are expensive to calculate, especially with macros enabled. To remove stopping strings
// when streaming, we cache the result of getStoppingStrings instead of calling it once per token.
const isImpersonate = this.type == 'impersonate';
const isContinue = this.type == 'continue';
this.stoppingStrings = getStoppingStrings(isImpersonate, isContinue);