You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

HistoryTransform.cs 447 B

1234567891011121314151617
  1. using LLama.Common;
  2. using System.Text;
  3. using static LLama.LLamaTransforms;
  4. namespace LLamaSharp.SemanticKernel.ChatCompletion;
  5. /// <summary>
  6. /// Default HistoryTransform Patch
  7. /// </summary>
  8. public class HistoryTransform : DefaultHistoryTransform
  9. {
  10. /// <inheritdoc/>
  11. public override string HistoryToText(global::LLama.Common.ChatHistory history)
  12. {
  13. return base.HistoryToText(history) + $"{AuthorRole.Assistant}: ";
  14. }
  15. }