Class GeneratedBase<T>
You will never know if the AI generated result is a single or multiple values. So this class is used to represent both cases: a value or an array of values.
public abstract class GeneratedBase<T> : IGeneratedOutput
Type Parameters
T
- Inheritance
-
objectGeneratedBase<T>
- Implements
- Derived
Constructors
GeneratedBase(T, UsageMetadata)
protected GeneratedBase(T value, UsageMetadata usage)
Parameters
valueTusageUsageMetadata
GeneratedBase(T[], UsageMetadata)
protected GeneratedBase(T[] value, UsageMetadata usage)
Parameters
valueT[]usageUsageMetadata
Fields
data
protected readonly T[] data
Field Value
- T[]
Properties
Count
public int Count { get; }
Property Value
- int
Data
public T[] Data { get; }
Property Value
- T[]
IsEmpty
public bool IsEmpty { get; }
Property Value
- bool
this[int]
public T this[int index] { get; }
Parameters
indexint
Property Value
- T
Usage
public UsageMetadata Usage { get; set; }
Property Value
Methods
GetOutputTexts()
public abstract List<string> GetOutputTexts()
Returns
- List<string>
GetUsage()
public UsageMetadata GetUsage()