Veni AI
Πίσω στα πρότυπα
ΠΡΟΤΥΠΟ ΡΟΗΣ ΕΡΓΑΣΙΑΣ

Ibm Granite/Granite 3.3 8b Instruct Text Generator | Operasyon için n8n Otomasyon İş Akışı Şablonu (HTTP)

n8n için hazır otomasyon şablonu: Ibm Granite/Granite 3.3 8b Instruct Text Generator. 13 düğüm. Entegrasyonlar: HTTP. JSON'u kopyalayıp n8n'e içe aktarın.

13 κόμβοιIbm_Granite_Granite_3_3_8b_Instruct_Text_Generator-workflow.json
{
"meta": {
"instanceId": "e983b748-8529-4a77-9244-950c63196c54",
"model_name": "granite-3.3-8b-instruct",
"model_type": "text",
"version_id": "3ff9e6e20ff1f31263bf4f36c242bd9be1acb2025122daeefe2b06e883df0996",
"model_owner": "ibm-granite",
"generated_at": "2025-08-01T14:50:46.637720"
},
"name": "ibm-granite/granite-3.3-8b-instruct - Text Generator",
"nodes": [
{
"id": "a44d6c40-8ea3-4f23-b247-71e738283098",
"name": "Manual Trigger",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-896,
-176
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a91cda00-c364-4a2e-b590-ff6065baeca4",
"name": "Set API Token",
"type": "n8n-nodes-base.set",
"position": [
-608,
-80
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "api_token",
"name": "api_token",
"type": "string",
"value": "YOUR_REPLICATE_API_TOKEN"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "0483192b-6186-48bc-8434-f600de6a1dee",
"name": "Set Text Parameters",
"type": "n8n-nodes-base.set",
"position": [
-288,
-128
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "api_token",
"name": "api_token",
"type": "string",
"value": "={{ $('Set API Token').item.json.api_token }}"
},
{
"id": "seed",
"name": "seed",
"type": "number",
"value": -1
},
{
"id": "top_k",
"name": "top_k",
"type": "number",
"value": 50
},
{
"id": "top_p",
"name": "top_p",
"type": "number",
"value": 0.9
},
{
"id": "prompt",
"name": "prompt",
"type": "string",
"value": ""
},
{
"id": "max_tokens",
"name": "max_tokens",
"type": "number",
"value": 512
},
{
"id": "min_tokens",
"name": "min_tokens",
"type": "number",
"value": 0
},
{
"id": "temperature",
"name": "temperature",
"type": "number",
"value": 0.6
},
{
"id": "chat_template",
"name": "chat_template",
"type": "string",
"value": ""
},
{
"id": "system_prompt",
"name": "system_prompt",
"type": "string",
"value": ""
},
{
"id": "stop_sequences",
"name": "stop_sequences",
"type": "string",
"value": ""
},
{
"id": "presence_penalty",
"name": "presence_penalty",
"type": "number",
"value": 0
},
{
"id": "frequency_penalty",
"name": "frequency_penalty",
"type": "number",
"value": 0
}
]
}
},
"typeVersion": 3.3
},
{
"id": "2cd011db-626c-443f-970d-c29e826f7619",
"name": "Create Text Prediction",
"type": "n8n-nodes-base.httpRequest",
"position": [
-64,
-128
],
"parameters": {
"url": "https://api.replicate.com/v1/predictions",
"method": "POST",
"options": {
"response": {
"response": {
"neverError": true,
"responseFormat": "json"
}
}
},
"jsonBody": "={\n \"version\": \"ibm-granite/granite-3.3-8b-instruct:3ff9e6e20ff1f31263bf4f36c242bd9be1acb2025122daeefe2b06e883df0996\",\n \"input\": {\n \"seed\": {{ $json.seed }},\n \"top_k\": {{ $json.top_k }},\n \"top_p\": {{ $json.top_p }},\n \"prompt\": \"{{ $json.prompt }}\",\n \"max_tokens\": {{ $json.max_tokens }},\n \"min_tokens\": {{ $json.min_tokens }},\n \"temperature\": {{ $json.temperature }},\n \"chat_template\": \"{{ $json.chat_template }}\",\n \"system_prompt\": \"{{ $json.system_prompt }}\",\n \"stop_sequences\": \"{{ $json.stop_sequences }}\",\n \"presence_penalty\": {{ $json.presence_penalty }},\n \"frequency_penalty\": {{ $json.frequency_penalty }}\n }\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $json.api_token }}"
},
{
"name": "Prefer",
"value": "wait"
}
]
}
},
"typeVersion": 4.1
},
{
"id": "777f3f71-98a2-4c3e-aa4a-d29feabba34a",
"name": "Wait 5s",
"type": "n8n-nodes-base.wait",
"position": [
160,
-128
],
"webhookId": "d2c4ca16-0eb2-45b4-8a2d-eec2f99df89c",
"parameters": {
"unit": "seconds",
"amount": 5
},
"typeVersion": 1
},
{
"id": "e738a267-44b3-45bb-8d29-6a563b6bf4da",
"name": "Check Status",
"type": "n8n-nodes-base.httpRequest",
"position": [
384,
-128
],
"parameters": {
"url": "=https://api.replicate.com/v1/predictions/{{ $('Create Text Prediction').item.json.id }}",
"options": {
"response": {
"response": {
"neverError": true,
"responseFormat": "json"
}
}
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $('Set API Token').item.json.api_token }}"
}
]
}
},
"typeVersion": 4.1
},
{
"id": "0b3a6e2c-d83d-4ba4-ad9b-66e4c0d06bec",
"name": "Is Complete?",
"type": "n8n-nodes-base.if",
"position": [
528,
-240
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "c93d7ba1-0ef9-4087-aa10-389cb2a2c6bd",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "succeeded"
}
]
}
},
"typeVersion": 2
},
{
"id": "9d34ad34-0a73-4b33-b1a2-7aa8ffafff7f",
"name": "Has Failed?",
"type": "n8n-nodes-base.if",
"position": [
848,
-80
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "d1bfd044-3a07-4c18-b55f-72d192596139",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "failed"
}
]
}
},
"typeVersion": 2
},
{
"id": "099c2e19-ba55-4ec2-a1f3-64bfad178a8b",
"name": "Wait 10s",
"type": "n8n-nodes-base.wait",
"position": [
720,
128
],
"webhookId": "51a05aef-e220-406d-8c2c-e59c82c3e26e",
"parameters": {
"unit": "seconds",
"amount": 10
},
"typeVersion": 1
},
{
"id": "6bfeeb72-ca24-49c5-8cbf-068fe8602cc7",
"name": "Success Response",
"type": "n8n-nodes-base.set",
"position": [
832,
-320
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "success-response",
"name": "response",
"type": "object",
"value": "={{ { success: true, result_url: $json.output, prediction_id: $json.id, status: $json.status, message: 'Text generated successfully' } }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "c9858f53-e8b3-47b0-8339-78dc38c92687",
"name": "Error Response",
"type": "n8n-nodes-base.set",
"position": [
1344,
144
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "error-response",
"name": "response",
"type": "object",
"value": "={{ { success: false, error: $json.error || 'Text generation failed', prediction_id: $json.id, status: $json.status, message: 'Failed to generate text' } }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "7edc470f-4211-415f-88bc-98e7406f3e95",
"name": "Display Result",
"type": "n8n-nodes-base.set",
"position": [
1552,
-144
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "final-result",
"name": "final_result",
"type": "object",
"value": "={{ $json.response }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "a16d6696-dda0-47ac-8932-8ce60f5e78d3",
"name": "Log Request",
"type": "n8n-nodes-base.code",
"position": [
160,
-320
],
"parameters": {
"jsCode": "// Log generation details for monitoring\nconst data = $input.all()[0].json;\n\nconsole.log('ibm-granite/granite-3.3-8b-instruct Request:', {\n timestamp: new Date().toISOString(),\n prediction_id: data.id,\n model_type: 'text'\n});\n\nreturn $input.all();"
},
"typeVersion": 2
},
{
"id": "37e6f59e-1b6d-456e-91e1-dde5caac0f80",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1536,
-304
],
"parameters": {
"color": 4,
"width": 580,
"height": 320,
"content": "=======================================\n GRANITE-3.3-8B-INSTRUCT GENERATOR\n=======================================\nFor any questions or support, please contact:\n Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n - YouTube: https://www.youtube.com/@YaronBeen/videos\n - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n======================================="
},
"typeVersion": 1
},
{
"id": "bf21667d-9db2-4e70-a3da-54294590ddf7",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1536,
48
],
"parameters": {
"color": 4,
"width": 589,
"height": 1958,
"content": "## 🤖 **IBM-GRANITE/GRANITE-3.3-8B-INSTRUCT - TEXT GENERATION WORKFLOW**\n\n**🔥 Powered by Replicate API and n8n Automation**\n\n---\n\n### 📝 **Model Overview**\n\n- **Owner**: ibm-granite\n- **Model**: granite-3.3-8b-instruct\n- **Type**: Text Generation\n- **API Endpoint**: https://api.replicate.com/v1/predictions\n\n**🎯 What This Model Does:**\nGranite-3.3-8B-Instruct is a 8-billion parameter 128K context length language model fine-tuned for improved reasoning and instruction-following capabilities.\n\n---\n\n### 📋 **Parameter Reference**\n\n**🔴 Required Parameters:** None\n**🔵 Optional Parameters:** seed, top_k, top_p, prompt, max_tokens, min_tokens, temperature, chat_template (and 4 more)\n\n**📖 Detailed Parameter Guide:**\n- **seed** (integer): Random seed. Leave blank to randomize the seed.\n- **top_k** (integer): The number of highest probability tokens to consider for generating the output. If > 0, only keep... (Default: 50)\n- **top_p** (number): A probability threshold for generating the output. If < 1.0, only keep the top tokens with cumula... (Default: 0.9)\n- **prompt** (string): User prompt to send to the model. (Default: )\n- **max_tokens** (integer): The maximum number of tokens the model should generate as output. (Default: 512)\n- **min_tokens** (integer): The minimum number of tokens the model should generate as output. (Default: 0)\n- **temperature** (number): The value used to modulate the next token probabilities. (Default: 0.6)\n- **chat_template** (string): A template to format the prompt with. If not provided, the default prompt template will be used.\n- *...and 4 more parameters*\n\n---\n\n### 🔧 **Workflow Components Explained**\n\n**🎯 Manual Trigger**\n- Starts the workflow execution\n- Click to begin text generation process\n\n**🔐 Set API Token** \n- Configures your Replicate API authentication\n- Replace 'YOUR_REPLICATE_API_TOKEN' with your actual token\n- Essential for accessing the ibm-granite/granite-3.3-8b-instruct model\n\n**⚙️ Set Text Parameters**\n- Configures all input parameters for the model\n- Includes both required and optional parameters\n- Pre-filled with sensible defaults for testing\n\n**🚀 Create Text Prediction**\n- Sends the generation request to Replicate API\n- Uses the text parameters you configured\n- Returns a prediction ID for status tracking\n\n**⏳ Wait & Status Checking Loop**\n- Waits 5 seconds then checks prediction status\n- Continues checking until completion or failure\n- Implements intelligent retry logic with 10-second delays\n\n**✅ Success/Error Handling**\n- Routes successful completions to success response\n- Handles failures gracefully with error details\n- Returns structured JSON response with URLs/errors\n\n**📊 Logging & Monitoring**\n- Logs all requests for debugging and monitoring\n- Tracks timestamps and prediction IDs\n- Helps identify issues during development\n\n---\n\n### 🌟 **Key Benefits**\n\n- **🎨 Instant Text Generation**: Transform ideas into texts using state-of-the-art AI\n- **🔄 Automated Workflow**: Handles the complete generation pipeline automatically\n- **🛡️ Error Resilience**: Built-in retry logic and comprehensive error handling\n- **📈 Production Ready**: Includes logging, monitoring, and structured responses\n- **🔧 Customizable**: Easy to modify parameters and extend functionality\n- **⚡ Efficient Processing**: Optimized API calls with intelligent status checking\n\n---\n\n### 🚀 **Quick Start Instructions**\n\n1. **🔑 Get Your API Key**\n - Sign up at https://replicate.com\n - Navigate to your account settings\n - Copy your API token\n\n2. **🔧 Configure the Workflow**\n - Replace 'YOUR_REPLICATE_API_TOKEN' with your actual token\n - Adjust parameters in the 'Set Text Parameters' node\n - Customize the prompt or other inputs as needed\n\n3. **▶️ Execute the Workflow**\n - Click the 'Manual Trigger' to start\n - Monitor the execution in the n8n interface\n - Check logs for detailed execution information\n\n4. **📥 Get Your Results**\n - Successful generations return a URL to your text\n - Download or use the generated content as needed\n - Results are available immediately upon completion\n\n---\n\n### 🔍 **Troubleshooting Guide**\n\n**Common Issues:**\n- **Invalid API Token**: Ensure your Replicate token is valid and has sufficient credits\n- **Parameter Validation**: Check that required parameters match expected types\n- **Generation Timeout**: Some texts take longer - monitor the logs\n- **Output Format**: Verify the model returns the expected output format\n\n**Best Practices:**\n- Test with default parameters first\n- Monitor your Replicate usage and billing\n- Keep API tokens secure and never commit them to code\n- Use appropriate parameter values for your use case\n\n---\n\n**🔗 Additional Resources:**\n- Model Documentation: https://replicate.com/ibm-granite/granite-3.3-8b-instruct\n- Replicate API Docs: https://replicate.com/docs\n- n8n Documentation: https://docs.n8n.io\n\n---"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"versionId": "1",
"connections": {
"Wait 5s": {
"main": [
[
{
"node": "Check Status",
"type": "main",
"index": 0
}
]
]
},
"Wait 10s": {
"main": [
[
{
"node": "Check Status",
"type": "main",
"index": 0
}
]
]
},
"Has Failed?": {
"main": [
[
{
"node": "Error Response",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait 10s",
"type": "main",
"index": 0
}
]
]
},
"Log Request": {
"main": [
[
{
"node": "Wait 5s",
"type": "main",
"index": 0
}
]
]
},
"Check Status": {
"main": [
[
{
"node": "Is Complete?",
"type": "main",
"index": 0
}
]
]
},
"Is Complete?": {
"main": [
[
{
"node": "Success Response",
"type": "main",
"index": 0
}
],
[
{
"node": "Has Failed?",
"type": "main",
"index": 0
}
]
]
},
"Set API Token": {
"main": [
[
{
"node": "Set Text Parameters",
"type": "main",
"index": 0
}
]
]
},
"Error Response": {
"main": [
[
{
"node": "Display Result",
"type": "main",
"index": 0
}
]
]
},
"Manual Trigger": {
"main": [
[
{
"node": "Set API Token",
"type": "main",
"index": 0
}
]
]
},
"Success Response": {
"main": [
[
{
"node": "Display Result",
"type": "main",
"index": 0
}
]
]
},
"Set Text Parameters": {
"main": [
[
{
"node": "Create Text Prediction",
"type": "main",
"index": 0
}
]
]
},
"Create Text Prediction": {
"main": [
[
{
"node": "Log Request",
"type": "main",
"index": 0
}
]
]
}
}
}

Στο n8n Editor: επικόλληση με Ctrl+VΗ ροή εργασίας θα δημιουργηθεί