Package com.hw.langchain.llms
Class Utils
java.lang.Object
com.hw.langchain.llms.Utils
- Author:
- HamaWhite
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
enforceStopTokens
(String text, List<String> stop) Cuts off the text as soon as any stop words occur.
-
Method Details
-
enforceStopTokens
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.
-