Class Utils

java.lang.Object
com.hw.langchain.llms.Utils

public class Utils extends Object
Author:
HamaWhite
  • Method Details

    • enforceStopTokens

      public static String enforceStopTokens(String text, List<String> stop)
      Cuts off the text as soon as any stop words occur.
      Parameters:
      text - The input text to be processed.
      stop - List of stop words to identify cut-off points.
      Returns:
      The processed text after enforcing stop tokens.