Search Results for

    Show / Hide Table of Contents

    Class InstructionsUpdaterBase<TSettings>

    Inheritance
    object
    InstructionsUpdaterBase<TSettings>
    AdaptiveInstructionsUpdater
    DefaultInstructionsUpdater
    Implements
    IInstructionsUpdater
    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 InstructionsUpdaterBase<TSettings> : IInstructionsUpdater where TSettings : class, IInstructionsUpdaterSettings
    Type Parameters
    Name Description
    TSettings

    Constructors

    | Edit this page View Source

    InstructionsUpdaterBase(TSettings, ILogger)

    Declaration
    protected InstructionsUpdaterBase(TSettings settings = null, ILogger logger = null)
    Parameters
    Type Name Description
    TSettings settings
    ILogger logger

    Fields

    | Edit this page View Source

    DefaultMinMessageLength

    Declaration
    public const int DefaultMinMessageLength = 10
    Field Value
    Type Description
    int
    | Edit this page View Source

    DefaultMinQuestionLength

    Declaration
    public const int DefaultMinQuestionLength = 14
    Field Value
    Type Description
    int
    | Edit this page View Source

    m_Logger

    Declaration
    protected readonly ILogger m_Logger
    Field Value
    Type Description
    ILogger
    | Edit this page View Source

    m_Settings

    Declaration
    protected readonly TSettings m_Settings
    Field Value
    Type Description
    TSettings

    Methods

    | Edit this page View Source

    ShouldSkip(string)

    Returns true if the message is trivially short or meaningless and should skip instruction update. Override in subclasses to add additional skip conditions; call base.ShouldSkip() first.

    Declaration
    public virtual bool ShouldSkip(string lastUserMessage)
    Parameters
    Type Name Description
    string lastUserMessage
    Returns
    Type Description
    bool
    | Edit this page View Source

    UpdateInstructionsAsync(string, CancellationToken)

    Returns updated system instructions for the next request. Called automatically before every SendAsync(string, int, CancellationToken) call. Return null to keep the current instructions unchanged.

    Declaration
    public abstract UniTask<string> UpdateInstructionsAsync(string lastUserMessage, CancellationToken ct = default)
    Parameters
    Type Name Description
    string lastUserMessage

    The user's message that triggered this request.

    CancellationToken ct

    Cancellation token.

    Returns
    Type Description
    UniTask<string>

    Implements

    IInstructionsUpdater

    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