Skip to main content
Use an OpenAI model to generate embeddings for your vectorizer. You use this function to:
  • Define which OpenAI embedding model to use
  • Specify the dimensionality of the embeddings
  • Configure optional parameters like user identifier for API calls
  • Set the name of the environment variable that holds your OpenAI API key

Samples

Basic OpenAI embedding

With custom API key name

With user tracking

With custom base URL

Arguments

Returns

A JSON configuration object for use in create_vectorizer().