Table of Contents

Class GENTextGenerationTask<TSelf, TResult>

Namespace
Glitch9.AIDevKit

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

TSelf
TResult
Inheritance
object
TaskBase<TSelf, TResult>
GENTextGenerationTask<TSelf, TResult>
Implements
Derived
Inherited Members

Constructors

GENTextGenerationTask(TextPrompt)

protected GENTextGenerationTask(TextPrompt prompt)

Parameters

prompt TextPrompt

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

ModerationOptions

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

TextProcessor

Tools

public List<ToolCall> Tools { get; set; }

Property Value

List<ToolCall>

Methods

AddFunctions(params FunctionCall[])

public TSelf AddFunctions(params FunctionCall[] functions)

Parameters

functions FunctionCall[]

Returns

TSelf

AddMessages(params ChatMessage[])

public TSelf AddMessages(params ChatMessage[] messages)

Parameters

messages ChatMessage[]

Returns

TSelf

AddTools(params ToolCall[])

public TSelf AddTools(params ToolCall[] tools)

Parameters

tools ToolCall[]

Returns

TSelf

Attach(params AudioClip[])

public TSelf Attach(params AudioClip[] audioClips)

Parameters

audioClips AudioClip[]

Returns

TSelf

Attach(params IFile[])

public TSelf Attach(params IFile[] files)

Parameters

files IFile[]

Returns

TSelf

Attach(params FileInfo[])

public TSelf Attach(params FileInfo[] fileInfos)

Parameters

fileInfos FileInfo[]

Returns

TSelf

Attach(params string[])

public TSelf Attach(params string[] filePaths)

Parameters

filePaths string[]

Returns

TSelf

Attach(params Texture2D[])

public TSelf Attach(params Texture2D[] textures)

Parameters

textures Texture2D[]

Returns

TSelf

SetFunctions(params FunctionCall[])

public TSelf SetFunctions(params FunctionCall[] functions)

Parameters

functions FunctionCall[]

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

instructions string

Returns

TSelf

SetJsonSchema(IJsonSchema)

public TSelf SetJsonSchema(IJsonSchema jsonSchema)

Parameters

jsonSchema IJsonSchema

Returns

TSelf

SetJsonSchema(Type)

public TSelf SetJsonSchema(Type type)

Parameters

type Type

Returns

TSelf

SetMaxTokens(int)

public TSelf SetMaxTokens(int maxTokens)

Parameters

maxTokens int

Returns

TSelf

SetMessages(params ChatMessage[])

public TSelf SetMessages(params ChatMessage[] messages)

Parameters

messages ChatMessage[]

Returns

TSelf

SetModeration(ModerationOptions)

public TSelf SetModeration(ModerationOptions options)

Parameters

options ModerationOptions

Returns

TSelf

SetSeed(uint)

public TSelf SetSeed(uint seed)

Parameters

seed uint

Returns

TSelf

SetStartingMessage(string)

public TSelf SetStartingMessage(string startingMessage)

Parameters

startingMessage string

Returns

TSelf

SetStopSequences(params string[])

public TSelf SetStopSequences(params string[] stopSequences)

Parameters

stopSequences string[]

Returns

TSelf

SetSystemInstructions(string)

Redirects to SetInstructions(string) for setting system instructions.

public TSelf SetSystemInstructions(string systemInstructions)

Parameters

systemInstructions string

Returns

TSelf

SetTemperature(float)

public TSelf SetTemperature(float temperature)

Parameters

temperature float

Returns

TSelf

SetTools(params ToolCall[])

public TSelf SetTools(params ToolCall[] tools)

Parameters

tools ToolCall[]

Returns

TSelf