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