Prefixes

To get the most out of IntelliSense when using the AI Dev Kit, the following prefixes are designed to make autocomplete clean, fast, and intuitive.

Try to remember and follow these naming conventions:


GEN — Prefix for All Task Creators

These are extension methods that can be called directly on known objects to start an AI generation task.

Prompt Type
Usage

string

Text/Content Generation Image Generation Speech Generation (TTS) Sound FX Generation Video Generation

AudioClip

Transcript Generation (STT) Voice Change Audio Isolation

Texture2D, Sprite

Text/Content Generation (Vision) Image Edit (Inpaint) Image Variation

ChatSession

Chat

string aiJoke = await "Tell me a joke."
    .GENText()
    .SetModel(OpenAIModel.GPT4o)
    .ExecuteAsync();

string transcript = await audioClip
    .GENTranscript()
    .ExecuteAsync();
    
Texture2D aiImage = await "A cyberpunk city at night"
    .GENImage()
    .ExecuteAsync();

Set — Prefix for All Configuration Options

Use this to configure task parameters such as model, output count, output path, and advanced options like reasoning, web search, or voice settings.

task
    .SetModel(OpenAIModel.GPT4o)
    .SetCount(3)
    .SetReasoningEffort(ReasoningEffort.High);

On — Prefix for All Streaming Callbacks

Use these methods to attach real-time callbacks for streamed results, such as receiving text tokens, tool calls, or error handling.

task
    .OnStreamText(Debug.Log)
    .OnStreamError(HandleError)
    .OnStreamDone(OnGenerationComplete);

Append — Prefix for Task Sequences

Used with GENSequence to compose a sequence of tasks or insert delays between steps.

new GENSequence()
    .AppendText("Generate story".GENText())
    .AppendInterval(2.0f)
    .AppendTextToImage(text => text.GENImage())
    .ExecuteAsync();

These prefixes follow a consistent pattern to maximize IntelliSense usability and make task flows easy to read and construct.

Last updated