AI Dev Kit
Search Results for

    Show / Hide Table of Contents

    Class GENCompletionTask<TSelf, TPrompt, TOutput>

    Base class for GENTasks which utilize a CompletionRequest or a ChatCompletionRequest.

    Inheritance
    object
    GENTask<TSelf, TPrompt, TOutput>
    GENCompletionTask<TSelf, TPrompt, TOutput>
    GENContentTask
    GENObjectTask<T>
    GENTextTask
    Implements
    IGENTask
    Inherited Members
    GENTask<TSelf, TPrompt, TOutput>.token
    GENTask<TSelf, TPrompt, TOutput>.enableHistory
    GENTask<TSelf, TPrompt, TOutput>.isCanceled
    GENTask<TSelf, TPrompt, TOutput>.outputMimeType
    GENTask<TSelf, TPrompt, TOutput>.Cancel()
    GENTask<TSelf, TPrompt, TOutput>.SetOption(string, object)
    GENTask<TSelf, TPrompt, TOutput>.TryGetOption<T>(string, out T)
    GENTask<TSelf, TPrompt, TOutput>.SetModel(Model)
    GENTask<TSelf, TPrompt, TOutput>.SetCount(int)
    GENTask<TSelf, TPrompt, TOutput>.SetOutputPath(string)
    GENTask<TSelf, TPrompt, TOutput>.SetSender(string)
    GENTask<TSelf, TPrompt, TOutput>.SetIgnoreLogs(bool)
    GENTask<TSelf, TPrompt, TOutput>.EnablePromptHistory(bool)
    GENTask<TSelf, TPrompt, TOutput>.SetTextToTarget(GeneratedText)
    GENTask<TSelf, TPrompt, TOutput>.SetImageToTarget(GeneratedImage)
    GENTask<TSelf, TPrompt, TOutput>.SetAudioToTarget(GeneratedAudio)
    GENTask<TSelf, TPrompt, TOutput>.ExecuteAsync()
    Namespace: Glitch9.AIDevKit
    Assembly: .dll
    Syntax
    public abstract class GENCompletionTask<TSelf, TPrompt, TOutput> : GENTask<TSelf, TPrompt, TOutput>, IGENTask where TSelf : GENCompletionTask<TSelf, TPrompt, TOutput>
    Type Parameters
    Name Description
    TSelf
    TPrompt
    TOutput

    Constructors

    GENCompletionTask(TPrompt, Object)

    Declaration
    protected GENCompletionTask(TPrompt prompt, UnityEngine.Object target = null)
    Parameters
    Type Name Description
    TPrompt prompt
    Object target

    Fields

    streamHandler

    Declaration
    protected ChatStreamHandler streamHandler
    Field Value
    Type Description
    ChatStreamHandler

    Methods

    AddAttachment(AudioClip)

    Declaration
    public TSelf AddAttachment(AudioClip audioClip)
    Parameters
    Type Name Description
    AudioClip audioClip
    Returns
    Type Description
    TSelf

    AddAttachment(IUniFile)

    Declaration
    public TSelf AddAttachment(IUniFile file)
    Parameters
    Type Name Description
    IUniFile file
    Returns
    Type Description
    TSelf

    AddAttachment(string)

    Declaration
    public TSelf AddAttachment(string filePath)
    Parameters
    Type Name Description
    string filePath
    Returns
    Type Description
    TSelf

    AddAttachment(Texture2D)

    Declaration
    public TSelf AddAttachment(Texture2D texture)
    Parameters
    Type Name Description
    Texture2D texture
    Returns
    Type Description
    TSelf

    OnStreamDOne(Action<ChatCompletion>)

    Declaration
    public TSelf OnStreamDOne(Action<ChatCompletion> onComplete)
    Parameters
    Type Name Description
    Action<ChatCompletion> onComplete
    Returns
    Type Description
    TSelf

    OnStreamError(Action<string>)

    Declaration
    public TSelf OnStreamError(Action<string> onError)
    Parameters
    Type Name Description
    Action<string> onError
    Returns
    Type Description
    TSelf

    OnStreamText(Action<string>)

    Declaration
    public TSelf OnStreamText(Action<string> onTextReceived)
    Parameters
    Type Name Description
    Action<string> onTextReceived
    Returns
    Type Description
    TSelf

    OnStreamToolCalls(Action<ToolCall[]>)

    Declaration
    public TSelf OnStreamToolCalls(Action<ToolCall[]> onToolCalls)
    Parameters
    Type Name Description
    Action<ToolCall[]> onToolCalls
    Returns
    Type Description
    TSelf

    SetInstruction(string)

    Sets the instruction for the task. This is a specific command or request for the model to follow.

    Declaration
    public TSelf SetInstruction(string instruction)
    Parameters
    Type Name Description
    string instruction
    Returns
    Type Description
    TSelf

    SetModelOptions(ModelOptions)

    Sets the generation options for the task.

    Declaration
    public TSelf SetModelOptions(ModelOptions options)
    Parameters
    Type Name Description
    ModelOptions options
    Returns
    Type Description
    TSelf

    SetReasoningEffort(ReasoningEffort)

    Declaration
    public TSelf SetReasoningEffort(ReasoningEffort effort)
    Parameters
    Type Name Description
    ReasoningEffort effort
    Returns
    Type Description
    TSelf

    SetSpeechOutput(SpeechOutputOptions)

    Declaration
    public TSelf SetSpeechOutput(SpeechOutputOptions options = null)
    Parameters
    Type Name Description
    SpeechOutputOptions options
    Returns
    Type Description
    TSelf

    SetWebSearchOptions(WebSearchOptions)

    Declaration
    public TSelf SetWebSearchOptions(WebSearchOptions webSearchOptions)
    Parameters
    Type Name Description
    WebSearchOptions webSearchOptions
    Returns
    Type Description
    TSelf

    Implements

    IGENTask

    Extension Methods

    FluentAPIExtensions.SetAspectRatio<TTask>(TTask, AspectRatio)
    FluentAPIExtensions.SetPersonGeneration<TTask>(TTask, PersonGeneration)
    FluentAPIExtensions.SetSize<T>(T, ImageSize)
    In this article
    Back to top Generated by DocFX