Table of Contents

Method Set

Namespace
LMKit.TextGeneration.Prompts
Assembly
LM-Kit.NET.dll

Set(string, object)

Sets a variable and returns this context for method chaining.

public PromptTemplateContext Set(string name, object value)

Parameters

name string

The variable name.

value object

The variable value.

Returns

PromptTemplateContext

This context instance.

Examples

var context = new PromptTemplateContext()
    .Set("name", "Alice")
    .Set("role", "admin")
    .Set("active", true);

Exceptions

ArgumentNullException

Thrown when name is null.