Embedding
Wisej.AI.Embeddings.Embedding
Namespace: Wisej.AI.Embeddings
Assembly: Wisej.AI (3.5.0.0)
Represents an embedding which contains chunks of data, their associated vectors, and the model used for embedding.
public class Embedding : ICloneablePublic Class Embedding
Inherits ICloneableConstructors
Embedding(chunks, vectors, model)
Initializes a new instance of the Embedding class with specified chunks, vectors, and model.
This constructor initializes the Embedding class by setting the provided data chunks, their corresponding vectors, and the embedding model. The chunks parameter is used to input the raw data which will be embedded. The vectors parameter provides the associated vector representations for these chunks. The model specifies the model name used in the embedding process. Here is an example of how to create an instance of the Embedding class:
string[] chunks = { "data1", "data2" };
float[][] vectors = { new float[] { 1.0f, 2.0f }, new float[] { 3.0f, 4.0f } };
string model = "exampleModel";
Embedding embedding = new Embedding(chunks, vectors, model);
Properties
Chunks
String[]: Gets the chunks of data that were embedded.
Model
String: Gets the model name used for embedding.
Vectors
Single[][]: Gets the vectors associated with the data chunks.
Methods
Add(embedding)
Adds the vectors and chunks from embedding .
Returns: Embedding.
Clone()
Creates a deep copy of the current Embedding instance.
Returns: Embedding. A new Embedding instance that is a deep copy of the current instance.
Last updated
