closesBlock method

bool closesBlock(
  1. int token, {
  2. required bool isFinal,
})

Implementation

bool closesBlock(int token, {required bool isFinal}) =>
    token == textEnd ||
    (isFinal &&
        [
          '<|im_end|>',
          '<|endoftext|>',
          '<|im_start|>',
        ].any((n) => token == markers[n]));