Class MultimodalInput<T>
- Namespace
- AiDotNet.Interfaces
- Assembly
- AiDotNet.dll
Represents an input item for unified multimodal models.
public class MultimodalInput<T>
Type Parameters
TThe numeric type used for calculations.
- Inheritance
-
MultimodalInput<T>
- Inherited Members
Properties
Metadata
Optional metadata about the input.
public Dictionary<string, object>? Metadata { get; set; }
Property Value
Modality
The modality type of this input.
public ModalityType Modality { get; set; }
Property Value
SequenceIndex
Temporal ordering for sequential inputs.
public int SequenceIndex { get; set; }
Property Value
TextContent
Optional text content (for text modality).
public string? TextContent { get; set; }
Property Value
Methods
FromAudio(Vector<T>, int, int)
Creates an audio input from waveform samples.
public static MultimodalInput<T> FromAudio(Vector<T> samples, int sampleRate, int sequenceIndex = 0)
Parameters
samplesVector<T>Audio samples.
sampleRateintSample rate in Hz.
sequenceIndexintOptional sequence ordering.
Returns
FromImage(Vector<T>, int, int, int, int)
Creates an image input from pixel data.
public static MultimodalInput<T> FromImage(Vector<T> pixels, int channels, int height, int width, int sequenceIndex = 0)
Parameters
pixelsVector<T>Pixel values.
channelsintNumber of color channels.
heightintImage height in pixels.
widthintImage width in pixels.
sequenceIndexintOptional sequence ordering.
Returns
FromText(string, int)
Creates a text input for the multimodal model.
public static MultimodalInput<T> FromText(string text, int sequenceIndex = 0)
Parameters
Returns
FromVideo(Vector<T>, int, int, int, int, double, int)
Creates a video input from frame data.
public static MultimodalInput<T> FromVideo(Vector<T> frames, int numFrames, int channels, int height, int width, double frameRate, int sequenceIndex = 0)
Parameters
framesVector<T>Frame pixel data.
numFramesintNumber of frames.
channelsintNumber of color channels.
heightintFrame height in pixels.
widthintFrame width in pixels.
frameRatedoubleFrame rate in fps.
sequenceIndexintOptional sequence ordering.