ES | EN
AI

Use an open-source LLM (via HuggingFace)

LLM ChainLm Open Hugging Face Inference
Nodes 2
Complexity Basic
Category AI
n8n popularity 37,276 views in n8n library

This workflow demonstrates how to connect an open-source model to a Basic LLM node. The workflow is triggered when a new manual chat message appears. The message is then run through a Language Model Chain that is set up to process text with a specific prompt to guide the model's responses. Note that open-source LLMs with a small number of parameters require slightly different prompting with more guidance to the model. You can change the default Mistral-7B-Instruct-v0.1 model to any other LLM supported by HuggingFace. You can also connect other nodes, such as Ollama. Note that to use this template, you need to be on n8n version 1.19.4 or later.

Apps and nodes included

Step-by-Step Implementation Guide

Usar LLM de código abierto (HuggingFace)

Esta plantilla demuestra cómo conectar un modelo de lenguaje de código abierto alojado en Hugging Face a un flujo de trabajo de n8n. Es ideal para quienes desean experimentar con modelos de lenguaje de código abierto.

Nodos Utilizados

  • Langchain Chain LLM: Facilita la interacción con el modelo de lenguaje.
  • Langchain LM OpenHuggingFaceInference: Conecta con los modelos de lenguaje en Hugging Face.

Configuración Paso a Paso

  • Paso 1: Configura el nodo Langchain LM OpenHuggingFaceInference con el nombre del modelo de Hugging Face y tu clave API (si es necesaria).
  • Paso 2: Ajusta el 'prompt' en el nodo Langchain Chain LLM para definir la tarea que realizará el modelo.
  • Paso 3: Ejecuta el flujo de trabajo para probar la conexión con el modelo de lenguaje de código abierto.
⚡ Open and edit in Scriflow ← Browse all n8n templates

Scriflow builds and adapts n8n workflows with AI. Open this template in the editor to get the import-ready JSON.