EmbeddedDocument
Wisej.AI.Embeddings.EmbeddedDocument
Last updated
Wisej.AI.Embeddings.EmbeddedDocument
Last updated
Namespace: Wisej.AI.Embeddings
Assembly: Wisej.AI (3.5.0.0)
Represents a document that can be embedded with metadata and embedding data.
The class is designed to hold information about a document that can be embedded within a system. It contains properties for the document's name, metadata, and embedding data. This class provides constructors for initializing a document with or without embedding data. The embedded documents can be used in systems that require document similarity measures or need to store additional metadata for each document.
Initializes a new instance of the class with the specified name, metadata, and embedding.
name
The name of the document. Cannot be null.
metadata
embedding
Optional embedding data for the document.
Throws:
Thrown when name is null.
includeEmbedding
Whether to clone the embeddings.
Retrieves the embedding data associated with the document.
Sets the embedding data for the document.
embedding
The embedding data to set for the document.
Use this method to update the embedding data of an existing document. This might be necessary when the document's context or representation changes.
matches
Optional metadata associated with the document. If null, a new instance is created.
: Gets the metadata of the document.
: Gets the name of the document.
Creates a deep copy of the current instance.
Returns: . A new instance that is a deep copy of the current instance.
Returns: . The embedding data of the document.
Returns: .
Returns: . The current instance of with updated embedding data.
Returns: .