Actions6
- Chat Actions
- Embedding Actions
- Image Actions
- Speech Recognition Actions
- Text to Speech Actions
Overview
This node integrates with the DeepInfra API to generate vector embeddings from input text using various supported embedding models. It is useful for transforming textual data into numerical vectors that can be used in machine learning, semantic search, recommendation systems, or natural language processing tasks.
Typical use cases include:
- Converting sentences or documents into embeddings for similarity comparison.
- Preparing text data for clustering or classification.
- Enhancing search relevance by embedding queries and documents in the same vector space.
For example, you could embed product descriptions to later find similar products based on their semantic content.
Properties
| Name | Meaning |
|---|---|
| Model | The embedding model to use. Options include: BAAI Bge-Base-En-V1.5, Intfloat E5-Large-V2, Sentence-Transformers variants, Shibing624 Text2vec-Base-Chinese, Thenlper Gte-Base, etc. |
| Text | The text string to convert into an embedding vector. |
| Options (Truncate) | How to handle texts longer than the maximum token length. Options: None, Start, End. |
Output
The output JSON contains the response from the DeepInfra embeddings API call. This typically includes:
- The generated embedding vector(s) as floating-point numbers.
- Metadata about the embedding such as model used.
No binary data is output by this operation.
Example output structure (simplified):
{
"object": "list",
"data": [
{
"embedding": [0.123, -0.456, ...],
"index": 0,
"object": "embedding"
}
],
"model": "BAAI/bge-base-en-v1.5",
"usage": {
"prompt_tokens": 10,
"total_tokens": 10
}
}
Dependencies
- Requires a valid API key credential for the DeepInfra API.
- The node uses the official OpenAI-compatible client configured to communicate with DeepInfra's endpoint.
- Network access to
https://api.deepinfra.com/v1/openaiis required.
Troubleshooting
- Invalid API Key or Authentication Errors: Ensure the API key credential is correctly set up and has necessary permissions.
- Text Too Long Errors: If input text exceeds model limits, use the "Truncate" option to specify how to shorten the text.
- Model Not Found: Verify the selected model name is supported and spelled correctly.
- Network Issues: Check internet connectivity and firewall settings allowing access to DeepInfra API endpoints.
- Empty or Null Embeddings: Confirm that the input text is not empty and the API responded successfully.
If errors occur, enabling "Continue On Fail" will allow the workflow to proceed while capturing error messages in the output.