Table of Contents

Class Weighted<T>

Namespace
Glitch9.AIDevKit

A weighted prompt that can be used to pass a prompt with a specific weight.
This is useful for tasks where you want to pass multiple prompts with different weights.
The weight can be used to control the influence of the prompt on the model's output.

public class Weighted<T> : PromptBase, IPrompt

Type Parameters

T
Inheritance
object
Weighted<T>
Implements
Inherited Members

Constructors

Weighted(T, float?)

public Weighted(T prompt, float? weight = null)

Parameters

prompt T
weight float?

Fields

prompt

public T prompt

Field Value

T

weight

public float? weight

Field Value

float?

Methods

GetText()

public override string GetText()

Returns

string

Operators

implicit operator T(Weighted<T>)

public static implicit operator T(Weighted<T> weightedPrompt)

Parameters

weightedPrompt Weighted<T>

Returns

T

implicit operator Weighted<T>(T)

public static implicit operator Weighted<T>(T prompt)

Parameters

prompt T

Returns

Weighted<T>