Samples
Generate a single embedding
Create a vector embedding:Specify input type for queries
Optimize embeddings for search queries:Specify input type for documents
Optimize embeddings for documents:Generate embeddings for multiple texts
Process multiple texts in one API call:Store embeddings in a table
Generate and store embeddings for your data:Use domain-specific models
Use specialized models for your domain:Arguments
Returns
For single text input:vector: A pgvector compatible vector containing the embedding
TABLE(index INT, embedding vector): A table with an index and embedding for each input text
Related functions
cohere_embed(): alternative with Cohere modelsopenai_embed(): alternative with OpenAI models