Namespace: LLama
AntipromptProcessor keeps track of past tokens looking for any set Anti-Prompts
public sealed class AntipromptProcessor
Inheritance Object → AntipromptProcessor
Initializes a new instance of the AntipromptProcessor class.
public AntipromptProcessor(IEnumerable<string> antiprompts)
antiprompts IEnumerable<String>
The antiprompts.
Add an antiprompt to the collection
public void AddAntiprompt(string antiprompt)
antiprompt String
Overwrite all current antiprompts with a new set
public void SetAntiprompts(IEnumerable<string> antiprompts)
antiprompts IEnumerable<String>
Add some text and check if the buffer now ends with any antiprompt
public bool Add(string text)
text String
Boolean
true if the text buffer ends with any antiprompt