N
n8n Store
Workflow Market
Zsxkib Canary Qwen 2.5b Text Generator

Zsxkib Canary Qwen 2.5b Text Generator

by yaron-nofluff0 views

説明

Categories

🤖 AI & Machine Learning

Nodes Used

n8n-nodes-base.ifn8n-nodes-base.setn8n-nodes-base.coden8n-nodes-base.coden8n-nodes-base.waitn8n-nodes-base.stickyNoten8n-nodes-base.httpRequestn8n-nodes-base.httpRequestn8n-nodes-base.manualTrigger
Price無料
Views0
最終更新11/28/2025
workflow.json
{
  "id": "wRLKhqUiZr5LUfJr",
  "meta": {
    "instanceId": "6200c8a3bb4b33a470de8038f3ac6dde523cbcd4c78ce87d817a034e96ed5532"
  },
  "name": "Zsxkib Canary Qwen 2.5b Text Generator",
  "tags": [
    {
      "id": "JnEqJJmJ9wvCFwLu",
      "name": "AI"
    },
    {
      "id": "K4UWXFkxSidQvvkR",
      "name": "Text"
    }
  ],
  "nodes": [
    {
      "id": "93a834d4-283b-4591-863d-36d92f99248d",
      "name": "On clicking 'execute'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        720,
        380
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "3f36e2fc-a51e-4727-a049-7c826f3e7e3b",
      "name": "Set API Key",
      "type": "n8n-nodes-base.set",
      "position": [
        940,
        380
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "64cd57c7-2224-48a6-88df-c37b310f8eb3",
              "name": "replicate_api_key",
              "type": "string",
              "value": "YOUR_REPLICATE_API_KEY"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "c5c1e12f-39d5-4b9b-88f0-2f60d732de81",
      "name": "Create Prediction",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1160,
        380
      ],
      "parameters": {
        "url": "https://api.replicate.com/v1/predictions",
        "method": "POST",
        "options": {
          "timeout": 60000
        },
        "jsonBody": "{\n  \"version\": \"afba731fc7a4082730943a246233b09c7fa3dfb2c24b07fe199c1408a7c8cb2f\",\n  \"input\": {\n    \"audio\": \"https://example.com/input.text\",\n    \"include_timestamps\": true\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "={{ 'Bearer ' + $('Set API Key').item.json.replicate_api_key }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "d8a5e6e1-8e95-49f3-83d5-4729c8f3b91a",
      "name": "Extract Prediction ID",
      "type": "n8n-nodes-base.code",
      "position": [
        1380,
        380
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "// Extract prediction ID and initial status\\nconst prediction = $input.item.json;\\nconst predictionId = prediction.id;\\nconst initialStatus = prediction.status;\\n\\n// Store the prediction ID for polling\\nreturn {\\n  predictionId: predictionId,\\n  status: initialStatus,\\n  predictionUrl: `https://api.replicate.com/v1/predictions/${predictionId}`\\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "e5c7d8f2-1234-4567-890a-bcdef1234567",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        1600,
        380
      ],
      "parameters": {
        "unit": "seconds",
        "amount": 2
      },
      "typeVersion": 1
    },
    {
      "id": "f6d8e9f3-2345-5678-901b-cdef23456789",
      "name": "Check Prediction Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1820,
        380
      ],
      "parameters": {
        "url": "={{ $json.predictionUrl }}",
        "options": {},
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "={{ 'Bearer ' + $('Set API Key').item.json.replicate_api_key }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "a7e9f0a4-3456-6789-012c-def345678901",
      "name": "Check If Complete",
      "type": "n8n-nodes-base.if",
      "position": [
        2040,
        380
      ],
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{ $json.status }}",
              "value2": "succeeded",
              "operation": "equal"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b8f0a1b5-4567-7890-123d-ef4567890123",
      "name": "Process Result",
      "type": "n8n-nodes-base.code",
      "position": [
        2260,
        280
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "// Process the completed prediction\\nconst result = $input.item.json;\\n\\nreturn {\\n  status: result.status,\\n  output: result.output,\\n  metrics: result.metrics,\\n  created_at: result.created_at,\\n  completed_at: result.completed_at,\\n  model: 'zsxkib/canary-qwen-2.5b',\\n  text_url: result.output\\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "71c5e20e-17f6-4cc5-ac38-6c12bb1e2154",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        660,
        240
      ],
      "parameters": {
        "width": 437.91315553899017,
        "height": 350.56206896551737,
        "content": "## Zsxkib Canary Qwen 2.5b Text Generator\\n\\nThis workflow uses the **zsxkib/canary-qwen-2.5b** model from Replicate to generate text content.\\n\\n### Setup\\n1. Add your Replicate API key\\n2. Configure the input parameters\\n3. Run the workflow\\n\\n### Model Details\\n- **Type**: Text Generation\\n- **Provider**: zsxkib\\n- **Required Fields**: audio"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "98234567-89ab-cdef-0123-456789abcdef",
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Check Prediction Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set API Key": {
      "main": [
        [
          {
            "node": "Create Prediction",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Complete": {
      "main": [
        [
          {
            "node": "Process Result",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Prediction": {
      "main": [
        [
          {
            "node": "Extract Prediction ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Prediction ID": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On clicking 'execute'": {
      "main": [
        [
          {
            "node": "Set API Key",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Prediction Status": {
      "main": [
        [
          {
            "node": "Check If Complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

相关工作流