Package Information
Documentation
n8n Tei Embeddings Node
n8n Tei Embeddings Node - embedding provider for n8n AI nodes that proxies requests to your Tei embeddings service.
โจ Features
- ๐ Tei Embeddings sub-node - provides embeddings for AI models and Vector Store nodes
- ๐ Custom API Integration - point the node to your Tei instance
- ๐ก Single
/embeddingsPOST endpoint - send one string or an array of strings via theinputfield - ๐ Streaming-friendly output parsing - handles Tei list responses automatically
- โ๏ธ Configurable Host and Port through Credentials
- ๐ Logging and Error Handling
- ๐จ Modern UI with conditional parameter display
๐ฏ Node Type
Tei Embeddings Node (Sub-node)
- Purpose: Embedding provider for AI models and Vector Store nodes
- Type:
embedding(special type for n8n AI integration) - Inputs: None (sub-node)
- Outputs:
ai_embedding(for AI integration) - Method:
supplyData()- provides embedding functionality to parent nodes
๐ Installation
For n8n 1.0+
Install the package:
npm install n8n-nodes-tei-embeddingsRestart n8n
Configure Credentials (see Credentials section below)
For Development
Clone the repository:
git clone https://github.com/AgnimaGocran/n8n-nodes-tei-embeddings.git cd n8n-nodes-tei-embeddingsInstall dependencies:
npm installBuild the project:
npm run build
๐ Credentials
EmbeddingApi
Configure connection to your API service:
- Host (required) - address of your API server (default:
http://10.24.10.153) - Port (required) - port of API server (default:
8081) - API Key (optional) - key for authentication
๐ Node Parameters
Tei Embeddings Node
This node has no configurable parameters as it's designed to work as an embedding provider for other nodes.
๐ก Usage Examples
Example 1: Using the Tei Embeddings Node with a Vector Store
- Add a Vector Store node (e.g., Supabase Vector Store).
- In the Vector Store node, look for the Embedding connection.
- Select Tei Embeddings Node from the dropdown.
- Configure your credentials.
- The Vector Store will automatically use your Tei Embeddings service.
Example 2: Single Text Request to /embeddings
curl -X POST http://10.24.10.153:8081/embeddings \
-H "Content-Type: application/json" \
-d '{"input": "Hello, world!"}'
Response:
[
{
"object": "list",
"data": [
{
"object": "embedding",
"embedding": [
0.02621444,
-0.014602257,
-0.07529701,
-0.057053782,
0.07777279,
-0.03792118,
-0.003740206,
0.10274578,
0.07138724
],
"index": 0
}
],
"model": "intfloat/multilingual-e5-small",
"usage": {
"prompt_tokens": 4,
"total_tokens": 4
}
}
]
Embedding array truncated for brevity.
Example 3: Multiple Texts Request to /embeddings
curl -X POST http://10.24.10.153:8081/embeddings \
-H "Content-Type: application/json" \
-d '{"input": ["First document", "Second document"]}'
Response Highlights:
- The API returns a top-level array with
object: "list"entries. - Each entry contains a
dataarray withembeddingobjects for each provided text. usage.prompt_tokensreflects the total tokens used for the batch.
๐๏ธ Project Structure
n8n-nodes-tei-embeddings/
โโโ nodes/
โ โโโ Embedding/ # Tei Embeddings sub-node
โ โโโ Embedding.node.ts # Sub-node implementation
โ โโโ embedding.svg # Node icon
โโโ credentials/
โ โโโ EmbeddingApi.credentials.ts # API credentials
โโโ dist/ # Compiled JavaScript files
โโโ examples/ # Usage examples
โโโ package.json # Project configuration
โโโ tsconfig.json # TypeScript configuration
โโโ README.md # This file
๐ง Development
Building the Project
# Install dependencies
npm install
# Build the project
npm run build
# Build with icon copying
npm run build
Project Architecture
The project centers around a single Tei Embeddings node that implements the INodeType interface with type: 'embedding'. The node provides its embedding implementation through supplyData() so it can be reused by AI and Vector Store nodes without additional configuration.
API Endpoint
POST /embeddings
Generates embeddings for one or more texts via the Tei service.
Request Body:
{
"input": "Single text or an array of texts"
}
Response:
[
{
"object": "list",
"data": [
{
"object": "embedding",
"embedding": [0.026, -0.014, -0.075, -0.057, 0.077],
"index": 0
}
],
"model": "intfloat/multilingual-e5-small",
"usage": {
"prompt_tokens": 4,
"total_tokens": 4
}
}
]
Embedding array truncated for brevity.
๐งช Testing
API Testing
Check API availability:
curl -X GET http://10.24.10.153:8081/healthTest embedding generation:
curl -X POST http://10.24.10.153:8081/embeddings \ -H "Content-Type: application/json" \ -d '{"input": ["hello", "hi"]}'
Testing in n8n
- Create a new workflow
- Add "Tei Embeddings Node"
- Configure Credentials
- Test with simple text
๐ง Troubleshooting
Common Issues
"Host and port are required"
- Check Credentials settings
- Ensure Host and Port are specified
"Connection refused"
- Check API server availability
- Ensure port is open
"Invalid response from API"
- Check API response format
- Ensure API returns correct structure
Logs
Enable logging in n8n for debugging:
n8n start --log-level debug
Useful Links
- n8n 1.0 Migration Guide
- Custom Nodes Documentation
- README_local.md - Local API documentation
- INSTALL.md - Detailed installation instructions
๐ค Contributing
We welcome contributions to the project! Please:
- Fork the repository
- Create a branch for new feature
- Make changes
- Create Pull Request
๐ License
MIT License - see LICENSE file for details.
โ Author
24auru - GitHub
Version: 0.1.2
Last Updated: December 2025