Namespace: LLama.Abstractions
Transform history to plain text and vice versa.
public interface IHistoryTransform
Convert a ChatHistory instance to plain text.
string HistoryToText(ChatHistory history)
history ChatHistory
The ChatHistory instance
Converts plain text to a ChatHistory instance.
ChatHistory TextToHistory(AuthorRole role, string text)
role AuthorRole
The role for the author.
text String
The chat history as plain text.
ChatHistory
The updated history.
Copy the transform.
IHistoryTransform Clone()