Set the
OPENAI_API_KEY environment variable before calling any factory function below.
The key is read at UDF creation time and serialized with the UDF — no cluster-level
env_vars configuration is needed.Embeddings
Compare models by adding multiple embedding columns at once:Generation
Generate text from OpenAI chat completion models. Supports both text and binary (image) input columns. See the API reference for all parameters. Add a summary and an image caption in one call, using different models:API Reference
- OpenAI —
openai_udf()andopenai_embedding_udf()— all parameters includingcolumn,prompt,model,mime_type,dimensions, andnormalize