using LLama.Common; using System.Collections.Generic; using System.Text.Json.Serialization; namespace LLama.Abstractions { /// /// Takes a stream of tokens and transforms them. /// [JsonConverter(typeof(PolymorphicJSONConverter))] public interface ITextStreamTransform { /// /// Takes a stream of tokens and transforms them, returning a new stream of tokens asynchronously. /// /// /// IAsyncEnumerable TransformAsync(IAsyncEnumerable tokens); /// /// Copy the transform. /// /// ITextStreamTransform Clone(); } }