Make AntipromptProcessor public

This commit is contained in:
sa_ddam213 2023-11-14 21:41:12 +13:00
parent b44e780b0f
commit 153e61a81f
No known key found for this signature in database
1 changed files with 9 additions and 1 deletions

View File

@ -3,13 +3,21 @@ using System.Collections.Generic;
namespace LLama namespace LLama
{ {
internal sealed class AntipromptProcessor /// <summary>
/// AntipromptProcessor keeps track of past tokens looking for any set Anti-Prompts
/// </summary>
public sealed class AntipromptProcessor
{ {
private int _longestAntiprompt; private int _longestAntiprompt;
private readonly List<string> _antiprompts = new(); private readonly List<string> _antiprompts = new();
private string? _string; private string? _string;
/// <summary>
/// Initializes a new instance of the <see cref="AntipromptProcessor"/> class.
/// </summary>
/// <param name="antiprompts">The antiprompts.</param>
public AntipromptProcessor(IEnumerable<string>? antiprompts = null) public AntipromptProcessor(IEnumerable<string>? antiprompts = null)
{ {
if (antiprompts != null) if (antiprompts != null)