AI DevKit
Search Results for

    Show / Hide Table of Contents

    Class TaskBase<TSelf, TResult>

    Inheritance
    object
    TaskBase<TSelf, TResult>
    DeleteFileTask
    DeleteModelTask
    DownloadFileTask
    GENTask<TSelf, TOptions, TPrompt, TResult>
    GetModelTask
    ListCustomModelsTask
    ListCustomVoicesTask
    ListFilesTask
    ListModelsTask
    ListVoicesTask
    UploadFileTask
    Namespace: Glitch9.AIDevKit
    Assembly: .dll
    Syntax
    public abstract class TaskBase<TSelf, TResult> where TSelf : TaskBase<TSelf, TResult>
    Type Parameters
    Name Description
    TSelf
    TResult

    Properties

    Api

    Declaration
    public virtual Api Api { get; set; }
    Property Value
    Type Description
    Api

    Cts

    Declaration
    public CancellationTokenSource Cts { get; }
    Property Value
    Type Description
    CancellationTokenSource

    IgnoreLogs

    Declaration
    public bool IgnoreLogs { get; }
    Property Value
    Type Description
    bool

    IsCanceled

    Declaration
    public bool IsCanceled { get; }
    Property Value
    Type Description
    bool

    IsWrapperTask

    Declaration
    public virtual bool IsWrapperTask { get; }
    Property Value
    Type Description
    bool

    Method

    Declaration
    public abstract string Method { get; }
    Property Value
    Type Description
    string

    RequestMimeType

    Declaration
    public virtual MIMEType RequestMimeType { get; set; }
    Property Value
    Type Description
    MIMEType

    ResponseMimeType

    Declaration
    public virtual MIMEType ResponseMimeType { get; set; }
    Property Value
    Type Description
    MIMEType

    Sender

    Declaration
    public string Sender { get; }
    Property Value
    Type Description
    string

    Token

    Declaration
    public CancellationToken Token { get; set; }
    Property Value
    Type Description
    CancellationToken

    Methods

    CancelTask()

    Cancels the current GENTask.

    Declaration
    public void CancelTask()

    ExecuteAsync()

    Executes the task and returns the output of type TResult. This is the main entry point for executing the task.

    Declaration
    public virtual UniTask<TResult> ExecuteAsync()
    Returns
    Type Description
    UniTask<TResult>

    ExecuteAsyncINTERNAL()

    Declaration
    protected abstract UniTask<TResult> ExecuteAsyncINTERNAL()
    Returns
    Type Description
    UniTask<TResult>

    ExecuteAsync<T>()

    Interface method to execute the task and return a specific type. This is useful for tasks that return a specific type of output. Mainly used internally for GENSequence.

    Declaration
    public UniTask<T> ExecuteAsync<T>()
    Returns
    Type Description
    UniTask<T>
    Type Parameters
    Name Description
    T
    Exceptions
    Type Condition
    InvalidOperationException

    SetCancellationToken(CancellationToken)

    Sets a custom cancellation token for this task.

    Declaration
    public TSelf SetCancellationToken(CancellationToken token)
    Parameters
    Type Name Description
    CancellationToken token
    Returns
    Type Description
    TSelf

    SetIgnoreLogs(bool)

    Ignores logs for this task. This is useful for tasks that are not intended to produce logs or when you want to suppress logs.

    Declaration
    public TSelf SetIgnoreLogs(bool ignoreLogs)
    Parameters
    Type Name Description
    bool ignoreLogs
    Returns
    Type Description
    TSelf

    SetSender(string)

    Sets the sender ID for tracking or attribution purposes.

    Declaration
    public TSelf SetSender(string sender)
    Parameters
    Type Name Description
    string sender
    Returns
    Type Description
    TSelf
    In this article
    Back to top Generated by DocFX