Table of Contents

Class GENChatTask

Task for generating text using an LLM model. Supports instructions and role-based prompts.

public class GENChatTask : GENResponseTask, IGENTextTask, IStreamingChatTask<GENResponseTask>, IGENTask
Inheritance
object
GENChatTask
Implements
Inherited Members
Extension Methods

Constructors

GENChatTask(ChatSession, ChatMessage)

public GENChatTask(ChatSession chatSession, ChatMessage chatMessage)

Parameters

chatSession ChatSession
chatMessage ChatMessage

Properties

IsWrapperTask

public override bool IsWrapperTask { get; }

Property Value

bool

Method

public override string Method { get; }

Property Value

string

Methods

CreateEditTask(ChatSession, int, string)

public static GENChatTask CreateEditTask(ChatSession chatSession, int index, string editedContent)

Parameters

chatSession ChatSession
index int
editedContent string

Returns

GENChatTask

ExecuteAsyncINTERNAL()

Executes the text generation and returns the full response as a string.

protected override UniTask<ChatCompletion> ExecuteAsyncINTERNAL()

Returns

UniTask<ChatCompletion>

SetChatbotProfile(LocalChatbotProfileInstruct)

public GENChatTask SetChatbotProfile(LocalChatbotProfileInstruct profile)

Parameters

profile LocalChatbotProfileInstruct

Returns

GENChatTask

StreamAsync(ChatStreamHandler)

Streams text generation output in real time as it's received from the model.

public override UniTask StreamAsync(ChatStreamHandler streamHandler = null)

Parameters

streamHandler ChatStreamHandler

Returns

UniTask