Files
bot/apps/builder/public/templates/audio-chat-gpt.json
2024-08-21 16:18:05 +02:00

266 lines
7.1 KiB
JSON

{
"version": "6",
"id": "cm03xmv9a000ioksx75vxmzas",
"name": "Audio ChatGPT",
"events": [
{
"id": "ewnfbo0exlu7ihfu2lu2lusm",
"outgoingEdgeId": "f7s54kawqbiqr0gf17h62gbk",
"graphCoordinates": { "x": -228.25, "y": -123.31 },
"type": "start"
}
],
"groups": [
{
"id": "qfrz5nwm63g12dajsjxothb5",
"title": "User input",
"graphCoordinates": { "x": 105.17, "y": -56.29 },
"blocks": [
{
"id": "ovgk70u0kfxrbtz9dy4e040o",
"type": "text input",
"options": {
"variableId": "vudksu3zyrat6s1bq6qne0rx3",
"audioClip": {
"isEnabled": true,
"saveVariableId": "vwtuc6cw30xzl9i18usgxbszc"
}
}
},
{
"id": "riqtiysqklu64fiw8f3sspx4",
"type": "Condition",
"items": [
{
"id": "s2v8eax93tjvwlfrrt89a60c",
"outgoingEdgeId": "zhff5l5hsh1yl2v9n0f88fsx",
"content": {
"comparisons": [
{
"id": "p18se3e9hy6w8r58p51cmafu",
"variableId": "vwtuc6cw30xzl9i18usgxbszc",
"comparisonOperator": "Is empty"
}
]
}
}
]
},
{
"id": "h1la4o375pyat199ix02bqel",
"outgoingEdgeId": "vzvx2pyhsz00plwxemavzfol",
"type": "openai",
"options": {
"action": "Create transcription",
"url": "{{Audio clip}}",
"transcriptionVariableId": "vudksu3zyrat6s1bq6qne0rx3"
}
}
]
},
{
"id": "a6ymhjwtkqwp8t127plz8qmk",
"title": "ChatGPT reply",
"graphCoordinates": { "x": 475.42, "y": -56.66 },
"blocks": [
{
"id": "m4jadtknjb3za3gvxj1xdn1k",
"type": "Set variable",
"options": {
"variableId": "vabkycu0qqff5d6ar2ama16pf",
"type": "Append value(s)",
"item": "{{User Message}}"
}
},
{
"id": "e57nnbkl97h49jaaslxkg3u0",
"type": "openai",
"options": {
"action": "Create chat completion",
"messages": [
{
"role": "Dialogue",
"dialogueVariableId": "vabkycu0qqff5d6ar2ama16pf"
}
],
"responseMapping": [
{
"item": "Message content",
"variableId": "vni6kwbch8zlq92dclgcivzyr"
}
]
}
},
{
"id": "yblc864bzipaqfja7b2o3oo0",
"type": "Set variable",
"options": {
"variableId": "vabkycu0qqff5d6ar2ama16pf",
"type": "Append value(s)",
"item": "{{Assistant Message}}"
}
},
{
"id": "av59rg9zeqtl73o8icnrr2xd",
"type": "openai",
"options": {
"action": "Create speech",
"input": "{{Assistant Message}}",
"voice": "alloy",
"saveUrlInVariableId": "vgr0iwg95npp7pztkmdyn89m1"
}
},
{
"id": "f6onszqys2tx7pw3tshb2vcy",
"outgoingEdgeId": "dw9jclv60i040saiikj3a386",
"type": "audio",
"content": { "url": "{{Assistant audio message}}" }
}
]
},
{
"id": "c5f00f3oclwi1srcz10jjt9u",
"title": "Intro",
"graphCoordinates": { "x": -222.61, "y": -54.39 },
"blocks": [
{
"id": "yuiyeh0czhpymzwuzrm3af5r",
"type": "openai",
"options": {
"action": "Create speech",
"input": "Hi there! How can I help?",
"voice": "alloy",
"saveUrlInVariableId": "vxw4quja426402hvhtm33tsp3"
}
},
{
"id": "dmab8kc35uh84vvw1a53xbjn",
"outgoingEdgeId": "xnao10ucc1hbynv3pmk1t4by",
"type": "audio",
"content": { "url": "{{Welcome audio}}" }
}
]
},
{
"id": "yswu9fml4zflxaqlujb94ir8",
"title": "",
"graphCoordinates": { "x": 19.51, "y": -338.93 },
"blocks": [
{
"id": "okm2zz32zn8b60u1vkfrv9ca",
"type": "text",
"content": {
"richText": [
{
"type": "p",
"children": [
{
"text": "You need to add your OpenAI credentials to make this bot work. 🪄"
}
]
}
]
}
},
{
"id": "m5a1d0vhsrpyvvvyj89awxzc",
"type": "text",
"content": {
"richText": [
{
"type": "p",
"children": [
{
"text": "Once it's done, delete this group and connect the "
},
{ "bold": true, "text": "Start" },
{ "text": " event with " },
{ "bold": true, "text": "Intro" },
{ "text": " 🚀\n" }
]
}
]
}
}
]
}
],
"edges": [
{
"id": "xnao10ucc1hbynv3pmk1t4by",
"from": { "blockId": "dmab8kc35uh84vvw1a53xbjn" },
"to": { "groupId": "qfrz5nwm63g12dajsjxothb5" }
},
{
"id": "dw9jclv60i040saiikj3a386",
"from": { "blockId": "f6onszqys2tx7pw3tshb2vcy" },
"to": { "groupId": "qfrz5nwm63g12dajsjxothb5" }
},
{
"id": "zhff5l5hsh1yl2v9n0f88fsx",
"from": {
"blockId": "riqtiysqklu64fiw8f3sspx4",
"itemId": "s2v8eax93tjvwlfrrt89a60c"
},
"to": { "groupId": "a6ymhjwtkqwp8t127plz8qmk" }
},
{
"id": "vzvx2pyhsz00plwxemavzfol",
"from": { "blockId": "h1la4o375pyat199ix02bqel" },
"to": { "groupId": "a6ymhjwtkqwp8t127plz8qmk" }
},
{
"from": { "eventId": "ewnfbo0exlu7ihfu2lu2lusm" },
"to": { "groupId": "yswu9fml4zflxaqlujb94ir8" },
"id": "f7s54kawqbiqr0gf17h62gbk"
}
],
"variables": [
{
"id": "vwtuc6cw30xzl9i18usgxbszc",
"name": "Audio clip",
"isSessionVariable": true
},
{
"id": "vni6kwbch8zlq92dclgcivzyr",
"name": "Assistant Message",
"isSessionVariable": true
},
{
"id": "vudksu3zyrat6s1bq6qne0rx3",
"name": "User Message",
"isSessionVariable": false
},
{
"id": "vabkycu0qqff5d6ar2ama16pf",
"name": "Chat history",
"isSessionVariable": true
},
{
"id": "vxw4quja426402hvhtm33tsp3",
"name": "Welcome audio",
"isSessionVariable": true
},
{
"id": "vgr0iwg95npp7pztkmdyn89m1",
"name": "Assistant audio message",
"isSessionVariable": true
}
],
"theme": {},
"selectedThemeTemplateId": null,
"settings": {},
"createdAt": "2024-08-21T14:11:42.911Z",
"updatedAt": "2024-08-21T14:14:06.661Z",
"icon": "🔈",
"folderId": null,
"publicId": null,
"customDomain": null,
"workspaceId": "cl35yesle00188gcpgqu70ia1",
"resultsTablePreferences": null,
"isArchived": false,
"isClosed": false,
"whatsAppCredentialsId": null,
"riskLevel": null
}