Actions20
- Assistant Actions
- Embedding Actions
- File Actions
- Report Actions
- Text Actions
- Thread Actions
Embedding → Create
AI-generatedOverview
This node enables the creation of vector embeddings from text inputs using OpenAI's embedding models. Embeddings are numerical representations of text that capture semantic meaning, useful for tasks like similarity search, clustering, and classification.
Typical use cases include:
- Converting single or multiple text strings into embeddings for downstream machine learning or search applications.
- Generating embeddings to compare text similarity or to feed into recommendation systems.
- Preparing textual data for natural language processing workflows that require vectorized input.
For example, you can embed a product description to later find similar products by comparing their embeddings, or embed customer feedback texts to cluster them by topic.
Properties
| Name | Meaning |
|---|---|
| Authentication | Choose which API credentials to use: either dedicated OpenAI Analytics API credentials or existing OpenAI API credentials. |
| Input Type | Select whether to embed a single text string ("Single Text") or multiple text strings as an array ("Multiple Texts"). |
| Embedding Model | The specific embedding model to use, loaded dynamically from available OpenAI embedding models. Examples include "text-embedding-3-small", "text-embedding-3-large", and "text-embedding-ada-002". |
| Text | (Shown if Input Type is Single Text) The single text string to embed. |
| Texts | (Shown if Input Type is Multiple Texts) An array of text strings to embed. Each text is treated as a separate item. |
| Options | Additional optional parameters for embedding: |
| - Dimensions | Number of dimensions for the output embeddings. Only applicable to certain newer models (e.g., text-embedding-3). If not specified, the model’s default dimension count is used. |
| - Encoding Format | Format in which to return embeddings: either as floats ("Float") or Base64 encoded strings ("Base64"). |
| - User | A unique identifier representing the end-user, which helps OpenAI monitor and detect abuse. |
Output
The node outputs JSON data containing the generated embeddings corresponding to the input text(s). The structure typically includes:
- For each input text, an embedding vector represented as an array of numbers (if encoding format is float) or as a Base64 string.
- Metadata about the embedding such as the model used and possibly the dimensionality.
If binary data were involved (not in this operation), it would be summarized accordingly, but here the output is purely JSON with embedding vectors.
Dependencies
- Requires valid OpenAI API credentials, either via dedicated OpenAI Analytics API credentials or standard OpenAI API credentials.
- The node dynamically loads available embedding models from the OpenAI API.
- Network access to OpenAI endpoints is necessary.
- No additional external services beyond OpenAI are required.
Troubleshooting
- Invalid Credentials: Errors related to authentication usually mean the provided API key or organization ID is incorrect or missing. Verify your API credentials configuration.
- Model Not Found: If the selected embedding model is unavailable or deprecated, the node may fail. Refresh the model list or select a supported model.
- Input Validation: Ensure that the text inputs are non-empty strings. Empty or invalid inputs will cause errors.
- Dimension Option Misuse: Specifying dimensions for unsupported models will have no effect or cause errors. Use only with compatible models.
- API Rate Limits: Hitting OpenAI rate limits will result in errors; consider adding retry logic or reducing request frequency.
- Encoding Format Issues: If the output format is set incorrectly, downstream nodes expecting numeric arrays might fail.
Links and References
This summary is based solely on static analysis of the provided source code and property definitions.