Class GENTextGenerationTask<TSelf, TResult>
Base class for GENTasks which utilize a CompletionRequest or a ChatCompletionRequest.
public abstract class GENTextGenerationTask<TSelf, TResult> : GENTask<TSelf, ICompletionOptions, TextPrompt, TResult>, IGENTextTask, IGENTask where TSelf : GENTextGenerationTask<TSelf, TResult> where TResult : IGeneratedResult
Type Parameters
TSelfTResult
- Inheritance
-
objectTaskBase<TSelf, TResult>GENTextGenerationTask<TSelf, TResult>
- Implements
- Derived
- Inherited Members
Constructors
GENTextGenerationTask(TextPrompt)
protected GENTextGenerationTask(TextPrompt prompt)
Parameters
promptTextPrompt
Properties
AttachedFiles
public List<IFile> AttachedFiles { get; set; }
Property Value
- List<IFile>
Instructions
public string Instructions { get; set; }
Property Value
- string
JsonSchema
public IJsonSchema JsonSchema { get; set; }
Property Value
- IJsonSchema
MaxTokens
public int? MaxTokens { get; set; }
Property Value
- int?
Messages
public List<ChatMessage> Messages { get; set; }
Property Value
- List<ChatMessage>
ModerationOptions
public ModerationOptions ModerationOptions { get; set; }
Property Value
Seed
public uint? Seed { get; set; }
Property Value
- uint?
StartingMessage
public string StartingMessage { get; set; }
Property Value
- string
StopSequences
public List<string> StopSequences { get; set; }
Property Value
- List<string>
Temperature
public float? Temperature { get; set; }
Property Value
- float?
TextProcessor
public TextProcessor TextProcessor { get; set; }
Property Value
Tools
public List<ToolCall> Tools { get; set; }
Property Value
- List<ToolCall>
Methods
AddFunctions(params FunctionCall[])
public TSelf AddFunctions(params FunctionCall[] functions)
Parameters
functionsFunctionCall[]
Returns
- TSelf
AddMessages(params ChatMessage[])
public TSelf AddMessages(params ChatMessage[] messages)
Parameters
messagesChatMessage[]
Returns
- TSelf
AddTools(params ToolCall[])
public TSelf AddTools(params ToolCall[] tools)
Parameters
toolsToolCall[]
Returns
- TSelf
Attach(params AudioClip[])
public TSelf Attach(params AudioClip[] audioClips)
Parameters
audioClipsAudioClip[]
Returns
- TSelf
Attach(params IFile[])
public TSelf Attach(params IFile[] files)
Parameters
filesIFile[]
Returns
- TSelf
Attach(params FileInfo[])
public TSelf Attach(params FileInfo[] fileInfos)
Parameters
fileInfosFileInfo[]
Returns
- TSelf
Attach(params string[])
public TSelf Attach(params string[] filePaths)
Parameters
filePathsstring[]
Returns
- TSelf
Attach(params Texture2D[])
public TSelf Attach(params Texture2D[] textures)
Parameters
texturesTexture2D[]
Returns
- TSelf
SetFunctions(params FunctionCall[])
public TSelf SetFunctions(params FunctionCall[] functions)
Parameters
functionsFunctionCall[]
Returns
- TSelf
SetInstructions(string)
Sets the instruction for the task. This is a specific command or request for the model to follow.
public TSelf SetInstructions(string instructions)
Parameters
instructionsstring
Returns
- TSelf
SetJsonSchema(IJsonSchema)
public TSelf SetJsonSchema(IJsonSchema jsonSchema)
Parameters
jsonSchemaIJsonSchema
Returns
- TSelf
SetJsonSchema(Type)
public TSelf SetJsonSchema(Type type)
Parameters
typeType
Returns
- TSelf
SetMaxTokens(int)
public TSelf SetMaxTokens(int maxTokens)
Parameters
maxTokensint
Returns
- TSelf
SetMessages(params ChatMessage[])
public TSelf SetMessages(params ChatMessage[] messages)
Parameters
messagesChatMessage[]
Returns
- TSelf
SetModeration(ModerationOptions)
public TSelf SetModeration(ModerationOptions options)
Parameters
optionsModerationOptions
Returns
- TSelf
SetSeed(uint)
public TSelf SetSeed(uint seed)
Parameters
seeduint
Returns
- TSelf
SetStartingMessage(string)
public TSelf SetStartingMessage(string startingMessage)
Parameters
startingMessagestring
Returns
- TSelf
SetStopSequences(params string[])
public TSelf SetStopSequences(params string[] stopSequences)
Parameters
stopSequencesstring[]
Returns
- TSelf
SetSystemInstructions(string)
Redirects to SetInstructions(string) for setting system instructions.
public TSelf SetSystemInstructions(string systemInstructions)
Parameters
systemInstructionsstring
Returns
- TSelf
SetTemperature(float)
public TSelf SetTemperature(float temperature)
Parameters
temperaturefloat
Returns
- TSelf
SetTools(params ToolCall[])
public TSelf SetTools(params ToolCall[] tools)
Parameters
toolsToolCall[]
Returns
- TSelf