npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

n8n-nodes-embeddings-local-api

v1.0.0

Published

N8N Community Node for local text embeddings - use your own models instead of cloud APIs

Downloads

27

Readme

N8N Nodes: Embeddings Local API

Community node для n8n, позволяющий использовать локальные embedding модели вместо облачных провайдеров.

🚀 Описание

Эта нода позволяет интегрировать собственные embedding модели, запущенные локально, в ваши n8n workflow. Вместо использования платных API (OpenAI, Cohere, etc.) вы можете использовать свои модели для генерации векторных представлений текста.

✨ Возможности

  • Локальная обработка: Данные не покидают вашу инфраструктуру
  • Экономия: Нет затрат на API calls к внешним сервисам
  • Гибкость: Поддержка любых моделей через HTTP API
  • Производительность: Оптимизированные локальные модели
  • Безопасность: Полный контроль над данными

📦 Установка

Через npm (рекомендуется)

npm install @n8n-community/n8n-nodes-embeddings-local-api

Локальная установка

# Скачайте репозиторий
git clone https://github.com/your-repo/n8n-nodes-embeddings-local-api.git
cd n8n-nodes-embeddings-local-api

# Установите зависимости
npm install

# Соберите
npm run build

# Установите в n8n
cd /path/to/n8n
npm install /path/to/n8n-nodes-embeddings-local-api

🔧 Настройка

1. Запуск локального embedding API

Используйте предоставленный embedding API:

cd embedding-api
pip install -r requirements.txt
python app.py

API будет доступен по адресу: http://localhost:8080

2. Настройка ноды в n8n

  1. Добавьте ноду "Embeddings Local API" в workflow
  2. Укажите Base URL: http://localhost:8080
  3. Настройте параметры (опционально):
    • Normalize: true
    • Batch Size: 32

3. Подключение к Vector Store

Embeddings Local API → Postgres PGVector Store

📚 Использование

Базовый пример

{
  "nodes": [
    {
      "name": "Local Embeddings",
      "type": "@n8n-community/n8n-nodes-embeddings-local-api.embeddingsLocalAPI",
      "parameters": {
        "baseURL": "http://localhost:8080",
        "options": {
          "normalize": true,
          "batchSize": 32
        }
      }
    }
  ]
}

С Vector Store

{
  "nodes": [
    {
      "name": "Document Input",
      "type": "n8n-nodes-base.manualTrigger"
    },
    {
      "name": "Local Embeddings",
      "type": "@n8n-community/n8n-nodes-embeddings-local-api.embeddingsLocalAPI",
      "parameters": {
        "baseURL": "http://localhost:8080"
      }
    },
    {
      "name": "Vector Store",
      "type": "n8n-nodes-langchain.vectorStorePGVector",
      "parameters": {
        "mode": "insert",
        "tableName": "documents"
      }
    }
  ],
  "connections": {
    "Document Input": { "main": [[{ "node": "Local Embeddings" }]] },
    "Local Embeddings": { "ai_embedding": [[{ "node": "Vector Store" }]] }
  }
}

🔌 API спецификация

Endpoint: POST /embed

Запрос:

{
  "input": "Текст для векторизации",
  "normalize": true
}

Ответ:

{
  "embeddings": [[0.123, 0.456, ...]],
  "count": 1,
  "dimensions": 312,
  "processing_time": 0.234,
  "cached": false
}

Batch обработка

{
  "input": ["Текст 1", "Текст 2", "Текст 3"],
  "normalize": true
}

⚙️ Параметры

| Параметр | Тип | По умолчанию | Описание | |----------|-----|-------------|----------| | Base URL | string | http://localhost:8080 | URL API сервера | | Normalize Embeddings | boolean | true | Нормализация векторов | | Batch Size | number | 32 | Размер пакета |

🐛 Устранение неполадок

"Connection refused"

# Проверьте статус API
curl http://localhost:8080/health

# Проверьте порт
netstat -tlnp | grep :8080

"Invalid response format"

  • Убедитесь, что API возвращает правильный JSON
  • Проверьте логи embedding сервера

"Timeout"

  • Увеличьте timeout в настройках n8n
  • Проверьте производительность API

🔒 Безопасность

  • Используйте HTTPS в продакшене
  • Ограничьте доступ к API endpoint
  • Регулярно обновляйте зависимости
  • Мониторьте логи доступа

📊 Производительность

  • Модель: RuBERT-tiny2
  • Размерность: 312 измерений
  • Время обработки: ~0.2-0.5 сек на текст
  • Batch processing: До 1000 текстов за раз

🤝 Совместимость

  • n8n: >= 1.0.0
  • Node.js: >= 18.0.0
  • Python: >= 3.8 (для API сервера)

📄 Лицензия

MIT License - см. файл LICENSE для деталей.

🆘 Поддержка


Примечание: Эта нода не заменяет встроенные embedding ноды n8n, а дополняет их, предоставляя возможность использования локальных моделей.