Class Weighted<T>
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
-
objectWeighted<T>
- Implements
- Inherited Members
Constructors
Weighted(T, float?)
public Weighted(T prompt, float? weight = null)
Parameters
promptTweightfloat?
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
weightedPromptWeighted<T>
Returns
- T
implicit operator Weighted<T>(T)
public static implicit operator Weighted<T>(T prompt)
Parameters
promptT
Returns
- Weighted<T>