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.
Inheritance
object
Weighted<T>
Assembly: .dll
Syntax
public class Weighted<T> : PromptBase, IPrompt
Type Parameters
Constructors
Weighted(T, float?)
Declaration
public Weighted(T prompt, float? weight = null)
Parameters
Type |
Name |
Description |
T |
prompt |
|
float? |
weight |
|
Fields
prompt
Declaration
Field Value
weight
Declaration
Field Value
Methods
GetText()
Declaration
public override string GetText()
Returns
Overrides
Operators
implicit operator T(Weighted<T>)
Declaration
public static implicit operator T(Weighted<T> weightedPrompt)
Parameters
Type |
Name |
Description |
Weighted<T> |
weightedPrompt |
|
Returns
implicit operator Weighted<T>(T)
Declaration
public static implicit operator Weighted<T>(T prompt)
Parameters
Type |
Name |
Description |
T |
prompt |
|
Returns
Implements