Samples
Use OpenAI
Use Azure OpenAI
Embed with Azure OpenAI deployment:Use AWS Bedrock
Embed with Amazon Titan:Use Google Vertex AI
Embed with Vertex AI:Batch embeddings
Process multiple texts efficiently:Store embeddings in a table
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
Provider-specific configuration
Different providers require different configurations through theextra_options parameter:
Azure OpenAI
AWS Bedrock
Google Vertex AI
Related functions
openai_embed(): direct OpenAI integrationcohere_embed(): direct Cohere integrationvoyageai_embed(): direct Voyage AI integration