struct
OpenAI::Embedding
- OpenAI::Embedding
- Struct
- Value
- Object
Overview
Embedding is a special format of data representation that can be easily utilized by machine learning models and algorithms. The embedding is an information dense representation of the semantic meaning of a piece of text. Each embedding is a vector of floating point numbers, such that the distance between two embeddings in the vector space is correlated with semantic similarity between two inputs in the original format. For example, if two texts are similar, then their vector representations should also be similar.
Included Modules
- JSON::Serializable
Extended Modules
- JSON::Schema
Defined in:
openai/api/embeddings.crConstructors
Instance Method Summary
-
#embedding : Array(Float32)
The embedding vector, which is a list of floats.
-
#index : Int32
The index of the embedding in the list of embeddings.
-
#object : String
The object type, which is always "embedding".
Constructor Detail
Instance Method Detail
The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the embedding guide.