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
-
objectGENChatTask
- Implements
- Inherited Members
- Extension Methods
Constructors
GENChatTask(ChatSession, ChatMessage)
public GENChatTask(ChatSession chatSession, ChatMessage chatMessage)
Parameters
chatSessionChatSessionchatMessageChatMessage
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
chatSessionChatSessionindexinteditedContentstring
Returns
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
profileLocalChatbotProfileInstruct
Returns
StreamAsync(ChatStreamHandler)
Streams text generation output in real time as it's received from the model.
public override UniTask StreamAsync(ChatStreamHandler streamHandler = null)
Parameters
streamHandlerChatStreamHandler
Returns
- UniTask