Class GENChatTask
Task for generating text using an LLM model. Supports instructions and role-based prompts.
Inheritance
object
GENChatTask
Assembly: .dll
Syntax
public class GENChatTask : GENResponseTask, IGENTextTask, IStreamingChatTask<GENResponseTask>, IGENTask
Constructors
GENChatTask(ChatSession, ChatMessage)
Declaration
public GENChatTask(ChatSession chatSession, ChatMessage chatMessage)
Parameters
Properties
IsWrapperTask
Declaration
public override bool IsWrapperTask { get; }
Property Value
Overrides
Method
Declaration
public override string Method { get; }
Property Value
Overrides
Methods
CreateEditTask(ChatSession, int, string)
Declaration
public static GENChatTask CreateEditTask(ChatSession chatSession, int index, string editedContent)
Parameters
Type |
Name |
Description |
ChatSession |
chatSession |
|
int |
index |
|
string |
editedContent |
|
Returns
ExecuteAsyncINTERNAL()
Executes the text generation and returns the full response as a string.
Declaration
protected override UniTask<ChatCompletion> ExecuteAsyncINTERNAL()
Returns
Overrides
SetChatbotProfile(LocalChatbotProfileInstruct)
Declaration
public GENChatTask SetChatbotProfile(LocalChatbotProfileInstruct profile)
Parameters
Returns
StreamAsync(ChatStreamHandler)
Streams text generation output in real time as it's received from the model.
Declaration
public override UniTask StreamAsync(ChatStreamHandler streamHandler = null)
Parameters
Returns
Overrides
Implements
Extension Methods