Search Results for

    Show / Hide Table of Contents

    Class GenerativeControllerBase<TDelta, TOutput, TService, TSettings>

    Base class for generative controllers (TTS, STT, Image) that support both REST and Streaming modes. Provides common infrastructure for service management and error handling.

    Inheritance
    object
    GenerativeControllerBase<TDelta, TOutput, TService, TSettings>
    ImageGenerationController
    SpeechToTextController
    TextToSpeechController
    Implements
    IStreamVisitor<TDelta, Generated<TOutput>>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit.Agents
    Assembly: Glitch9.AIDevKit.dll
    Syntax
    public abstract class GenerativeControllerBase<TDelta, TOutput, TService, TSettings> : IStreamVisitor<TDelta, Generated<TOutput>> where TOutput : class where TService : class where TSettings : class
    Type Parameters
    Name Description
    TDelta

    The delta type for streaming updates

    TOutput

    The final output type

    TService

    The base service interface type

    TSettings

    The settings type

    Fields

    | Edit this page View Source

    m_Service

    Declaration
    protected readonly TService m_Service
    Field Value
    Type Description
    TService
    | Edit this page View Source

    m_Settings

    Declaration
    protected readonly TSettings m_Settings
    Field Value
    Type Description
    TSettings

    Methods

    | Edit this page View Source

    OnComplete(Generated<TOutput>)

    Handle completion of generation. Must be implemented by derived classes.

    Declaration
    public abstract void OnComplete(Generated<TOutput> result)
    Parameters
    Type Name Description
    Generated<TOutput> result
    | Edit this page View Source

    OnDelta(TDelta)

    Handle streaming delta updates. Must be implemented by derived classes.

    Declaration
    public abstract void OnDelta(TDelta delta)
    Parameters
    Type Name Description
    TDelta delta
    | Edit this page View Source

    OnError(Exception)

    Handle errors during generation. Default implementation dispatches to agent control.

    Declaration
    public virtual void OnError(Exception error)
    Parameters
    Type Name Description
    Exception error

    Implements

    IStreamVisitor<TDelta, TResult>

    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.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation