Search Results for

    Show / Hide Table of Contents

    Interface IStreamingGenerativeService<TInput, TDelta, TOutput, TSettings>

    Represents a generative AI service that can stream incremental output.

    Inherited Members
    IDisposable.Dispose()
    Namespace: Glitch9.AIDevKit
    Assembly: Glitch9.AIDevKit.dll
    Syntax
    public interface IStreamingGenerativeService<TInput, TDelta, TOutput, in TSettings> : IDisposable where TOutput : class where TSettings : IGenerationOptions
    Type Parameters
    Name Description
    TInput

    The input type.

    TDelta

    The delta event type.

    TOutput

    The final output type.

    TSettings

    The request settings type.

    Methods

    | Edit this page View Source

    StreamAsync(TInput, TSettings, CancellationToken)

    Starts a streaming generation request asynchronously.

    Declaration
    UniTask<IGenerativeStream<TDelta, TOutput>> StreamAsync(TInput input, TSettings settings, CancellationToken ct = default)
    Parameters
    Type Name Description
    TInput input

    The input data.

    TSettings settings

    The generation settings.

    CancellationToken ct

    The cancellation token.

    Returns
    Type Description
    UniTask<IGenerativeStream<TDelta, TOutput>>

    A stream handle that emits deltas and eventually provides the final output.

    Extension Methods

    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.TryDispose(IDisposable)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation