An "embedding" is a vector representation of text that captures semantic meanings of the words or phrases. These vectors are generated by deep learning models and can be used in machine learning applications to compare texts, search for similar content, or feed into other machine learning models for tasks like classification or clustering. Each component of the vector represents a dimension of the text's meaning, allowing the model to understand and process text similarly to how humans do but in a numerical form.
Usage of EmbeddingGenerator\OpenAI This section covers the different classes available for generating embeddings using OpenAI models. Below is a table summarizing the key details of each available class.
use EasyAI\Embeddings\EmbeddingGenerator\OpenAI\OpenAI3SmallEmbeddingGenerator;// Using OpenAI3SmallEmbeddingGenerator// Embedding$embeddingGenerator =new OpenAI3SmallEmbeddingGenerator();$embedding =$embeddingGenerator->embedText('Your text string to embed');