Hi,
I’ve just started using the AI and chat feature of n8n and it’s awesome!
But when I use “Chat + Generate image” I only get replies that look like this:
I would like to have it replied as an image and a URL.
I’ve searched around but haven’t found an answer. The closes I’ve got is this post: Chat embed returns JSON
My set-up is as follows:
- Version: 1.77.3
- Run with Docker on Unraid with repository n8nio/n8n
My workflow
{
"nodes": [
{
"parameters": {
"public": true,
"initialMessages": "Hi there! 👋\nMy name is Nathan. What image do you want me to create today?",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"typeVersion": 1.1,
"position": [
0,
0
],
"id": "5f75affe-82e9-4f2c-998e-5f8aacd6428e",
"name": "When chat message received",
"webhookId": "9dacd82f-cbdb-45cb-b905-9621d1880bed"
},
{
"parameters": {
"resource": "image",
"prompt": "={{ $json.chatInput }}",
"options": {
"quality": "hd",
"size": "1024x1024",
"returnImageUrls": true
}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
300,
0
],
"id": "9c3ea64e-6629-4e50-9e82-2ec100ea8fd2",
"name": "OpenAI",
"credentials": {
"openAiApi": {
"id": "GrZPfKSb9law1Mrb",
"name": "OpenAi account -n8n-two"
}
}
}
],
"connections": {
"When chat message received": {
"main": [
[
{
"node": "OpenAI",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {
"When chat message received": [
{
"sessionId": "b5be0cb7d6a241ca8919b8952fd9a8d6",
"action": "sendMessage",
"chatInput": "Corgi on a snowboard in the mountens"
}
]
},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "87761f857a04b08a773f0ee0cba44731316a61deb2a245db85fcfcda3f645883"
}
}```