Browse Source

Make AntipromptProcessor public

tags/v0.8.1
sa_ddam213 2 years ago
parent
commit
153e61a81f
Failed to extract signature
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      LLama/AntipromptProcessor.cs

+ 9
- 1
LLama/AntipromptProcessor.cs 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)


Loading…
Cancel
Save