Learn how to work with vector embeddings in Polyglot.
Embeddings
class as the primary interface for generating and working with vector embeddings.
Embeddings
class provides several important methods:
create()
: Generates embeddings for input textusing()
: Specifies which connection preset to usewithConfig()
: Sets a custom configurationwithHttpClient()
: Specifies a custom HTTP clientwithModel()
: Overrides the default modelfindSimilar()
: Finds documents similar to a queryEmbeddings
class is to transform text into vector representations.
create()
method returns an EmbeddingsResponse
object with several useful methods:
Vector
object with its own methods: