Feat(Builder): Add discord bot templates (#7711)

Add discord bot templates
pull/7724/head
Bently 2024-08-06 19:44:43 +01:00 committed by GitHub
parent 89adcefd63
commit 5e8ff5e3ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 465 additions and 0 deletions

View File

@ -0,0 +1,199 @@
{
"id": "381164dd-3c91-43fd-ba93-c12a13ce8499",
"version": 5,
"is_active": false,
"is_template": true,
"name": "Discord Bot Chat To LLM",
"description": "Simply send the bot the message \"!chat <message>\" and it will reply.",
"nodes": [
{
"id": "b8138bca-7892-42c2-9594-a845d3483413",
"block_id": "d3f4g5h6-1i2j-3k4l-5m6n-7o8p9q0r1s2t",
"input_default": {},
"metadata": {
"position": {
"x": -98.31744952152862,
"y": 291.1279542656707
}
}
},
{
"id": "b667bcc4-4e17-4343-bd31-14e48d99d21d",
"block_id": "e30a4d42-7b7d-4e6a-b36e-1f9b8e3b7d85",
"input_default": {
"input2": " Said: "
},
"metadata": {
"position": {
"x": 642.0641136440832,
"y": -318.9010839696226
}
}
},
{
"id": "42eda7a9-fe29-45c8-9571-55222830142d",
"block_id": "3146e4fe-2cdd-4f29-bd12-0c9d5bb4deb0",
"input_default": {
"pattern": "(?<=!chat ).*"
},
"metadata": {
"position": {
"x": 651.4338270731059,
"y": 120.68871252027822
}
}
},
{
"id": "9049f063-5b07-4984-b211-068bc93e653a",
"block_id": "1f292d4a-41a4-4977-9684-7c8d560b9f91",
"input_default": {
"model": "gpt-4o",
"sys_prompt": "You are a nice friendly AI"
},
"metadata": {
"position": {
"x": 2099.785393180648,
"y": -325.6642266305269
}
}
},
{
"id": "dda2d061-2ef9-4dc5-9433-918c8395a4ac",
"block_id": "h1i2j3k4-5l6m-7n8o-9p0q-r1s2t3u4v5w6",
"input_default": {},
"metadata": {
"position": {
"x": 2697.355782645,
"y": 225.29000586164966
}
}
},
{
"id": "3209c5e1-2da9-4cd1-bf4b-2f9488577815",
"block_id": "1ff065e9-88e8-4358-9d82-8dc91f622ba9",
"input_default": {
"data": "DISCORD BOT API KEY HERE"
},
"metadata": {
"position": {
"x": -772.5858672155341,
"y": 26.390737439792503
}
}
},
{
"id": "b6411821-bd48-4543-b526-0f7138e8ffe9",
"block_id": "1ff065e9-88e8-4358-9d82-8dc91f622ba9",
"input_default": {
"input": "DISCORD BOT API KEY HERE"
},
"metadata": {
"position": {
"x": -778.4138607648867,
"y": 422.0409097488691
}
}
},
{
"id": "d693cda1-973d-4d62-b549-d696b73d51d9",
"block_id": "e30a4d42-7b7d-4e6a-b36e-1f9b8e3b7d85",
"input_default": {},
"metadata": {
"position": {
"x": 1325.5852307018679,
"y": -328.95888935525124
}
}
}
],
"links": [
{
"id": "80683364-c3e8-467b-a734-d5629f97cd30",
"source_id": "b8138bca-7892-42c2-9594-a845d3483413",
"sink_id": "42eda7a9-fe29-45c8-9571-55222830142d",
"source_name": "message_content",
"sink_name": "text",
"is_static": false
},
{
"id": "8510bd83-1444-4a70-99e3-26c3ae28d7bf",
"source_id": "42eda7a9-fe29-45c8-9571-55222830142d",
"sink_id": "3209c5e1-2da9-4cd1-bf4b-2f9488577815",
"source_name": "negative",
"sink_name": "input",
"is_static": false
},
{
"id": "ff48a673-1f18-4b05-b5e7-e6dcc3e65add",
"source_id": "b8138bca-7892-42c2-9594-a845d3483413",
"sink_id": "dda2d061-2ef9-4dc5-9433-918c8395a4ac",
"source_name": "channel_name",
"sink_name": "channel_name",
"is_static": false
},
{
"id": "aebf9b2b-ee01-41bf-9c05-6444b6e5aa44",
"source_id": "3209c5e1-2da9-4cd1-bf4b-2f9488577815",
"sink_id": "b8138bca-7892-42c2-9594-a845d3483413",
"source_name": "output",
"sink_name": "discord_bot_token",
"is_static": false
},
{
"id": "cdbf9290-1b63-463d-a869-a16734ebd03c",
"source_id": "9049f063-5b07-4984-b211-068bc93e653a",
"sink_id": "dda2d061-2ef9-4dc5-9433-918c8395a4ac",
"source_name": "response",
"sink_name": "message_content",
"is_static": false
},
{
"id": "d9a51e17-c8de-4835-bee1-c1abba457c35",
"source_id": "dda2d061-2ef9-4dc5-9433-918c8395a4ac",
"sink_id": "3209c5e1-2da9-4cd1-bf4b-2f9488577815",
"source_name": "status",
"sink_name": "input",
"is_static": false
},
{
"id": "7bea8f77-45d7-4884-974f-b8f5ad10a988",
"source_id": "b6411821-bd48-4543-b526-0f7138e8ffe9",
"sink_id": "b8138bca-7892-42c2-9594-a845d3483413",
"source_name": "output",
"sink_name": "discord_bot_token",
"is_static": false
},
{
"id": "f2427ca7-3adf-450f-8be4-b8042eb0b9a6",
"source_id": "b8138bca-7892-42c2-9594-a845d3483413",
"sink_id": "b667bcc4-4e17-4343-bd31-14e48d99d21d",
"source_name": "username",
"sink_name": "input1",
"is_static": false
},
{
"id": "117244bf-8c32-4096-baff-38cd0fa9cf9d",
"source_id": "b667bcc4-4e17-4343-bd31-14e48d99d21d",
"sink_id": "d693cda1-973d-4d62-b549-d696b73d51d9",
"source_name": "output",
"sink_name": "input1",
"is_static": false
},
{
"id": "9ee4a0a5-de27-4bf8-81a9-140db1b5e475",
"source_id": "d693cda1-973d-4d62-b549-d696b73d51d9",
"sink_id": "9049f063-5b07-4984-b211-068bc93e653a",
"source_name": "output",
"sink_name": "prompt",
"is_static": false
},
{
"id": "49da866a-8c13-469c-95ea-fe4685e95c75",
"source_id": "42eda7a9-fe29-45c8-9571-55222830142d",
"sink_id": "d693cda1-973d-4d62-b549-d696b73d51d9",
"source_name": "positive",
"sink_name": "input2",
"is_static": false
}
]
}

View File

@ -0,0 +1,266 @@
{
"id": "696b4b9c-f28f-4dda-a44c-e748ac22438f",
"version": 17,
"is_active": false,
"is_template": true,
"name": "Discord Search Bot",
"description": "This is a Discord search bot, send it the command \"!search <question>\" and it will do a web search and answer your question!",
"nodes": [
{
"id": "60ba4aac-1751-4be7-8745-1bd32191d4a2",
"block_id": "d3f4g5h6-1i2j-3k4l-5m6n-7o8p9q0r1s2t",
"input_default": {},
"metadata": {
"position": {
"x": -961.2660758713816,
"y": 333.47185665649613
}
}
},
{
"id": "b09e201a-cd71-42d4-a197-22e7eebc54c9",
"block_id": "e30a4d42-7b7d-4e6a-b36e-1f9b8e3b7d85",
"input_default": {
"input2": ", Here is the latest web info to answer the question : \n"
},
"metadata": {
"position": {
"x": 881.3259434267115,
"y": -564.3287840347994
}
}
},
{
"id": "3169d1a8-b541-43f7-97ce-ddc6aecb2080",
"block_id": "3146e4fe-2cdd-4f29-bd12-0c9d5bb4deb0",
"input_default": {
"pattern": "(?<=!search ).*"
},
"metadata": {
"position": {
"x": -284.1111358361005,
"y": -43.71794261767991
}
}
},
{
"id": "5658c4f7-8e67-4d30-93f2-157bdbd3ef87",
"block_id": "b2c3d4e5-6f7g-8h9i-0j1k-l2m3n4o5p6q7",
"input_default": {},
"metadata": {
"position": {
"x": 319.9343851243159,
"y": -48.49947115893917
}
}
},
{
"id": "b29e3831-3fb7-41bd-88d8-ce3a5dde3d69",
"block_id": "1f292d4a-41a4-4977-9684-7c8d560b9f91",
"input_default": {
"model": "gpt-4o",
"sys_prompt": "You are a question answerer and info summariser, answer the questions with the info you are provided, be sure to @ the user who asked the question in your reply like @username"
},
"metadata": {
"position": {
"x": 2085.06017081387,
"y": -387.5334342999411
}
}
},
{
"id": "164bc3ea-e812-4391-a62d-bdddcf86f3cd",
"block_id": "e30a4d42-7b7d-4e6a-b36e-1f9b8e3b7d85",
"input_default": {},
"metadata": {
"position": {
"x": 1469.6744442484253,
"y": -435.0392111332514
}
}
},
{
"id": "10759047-6387-4ff1-9117-bbef47d24ee8",
"block_id": "e30a4d42-7b7d-4e6a-b36e-1f9b8e3b7d85",
"input_default": {},
"metadata": {
"position": {
"x": 326.8949613725521,
"y": -579.6877803706152
}
}
},
{
"id": "af7c5160-7bf0-4ad0-9806-04222009091f",
"block_id": "e30a4d42-7b7d-4e6a-b36e-1f9b8e3b7d85",
"input_default": {
"input2": " Asked the question: "
},
"metadata": {
"position": {
"x": -265.6965655001714,
"y": -628.1379507780849
}
}
},
{
"id": "4d74513d-42f7-4fd0-808a-0f4844513966",
"block_id": "1ff065e9-88e8-4358-9d82-8dc91f622ba9",
"input_default": {
"input": "DISCORD BOT API KEY HERE"
},
"metadata": {
"position": {
"x": -1532.6418163253616,
"y": 587.6533051108552
}
}
},
{
"id": "f3d62f22-d193-4f04-85d2-164200fca4c0",
"block_id": "h1i2j3k4-5l6m-7n8o-9p0q-r1s2t3u4v5w6",
"input_default": {},
"metadata": {
"position": {
"x": 2814.192971071703,
"y": 310.74654561036294
}
}
},
{
"id": "3b2bb6a5-9c42-4189-a9a0-0e499ccb766a",
"block_id": "1ff065e9-88e8-4358-9d82-8dc91f622ba9",
"input_default": {
"data": "DISCORD BOT API KEY HERE"
},
"metadata": {
"position": {
"x": -1528.6418163253616,
"y": 119.65330511085517
}
}
}
],
"links": [
{
"id": "346a8259-1093-4374-8271-904742aa6d89",
"source_id": "b29e3831-3fb7-41bd-88d8-ce3a5dde3d69",
"sink_id": "f3d62f22-d193-4f04-85d2-164200fca4c0",
"source_name": "response",
"sink_name": "message_content",
"is_static": false
},
{
"id": "53a8ecc6-60b6-4f4a-90c4-cb11dd1874e0",
"source_id": "5658c4f7-8e67-4d30-93f2-157bdbd3ef87",
"sink_id": "164bc3ea-e812-4391-a62d-bdddcf86f3cd",
"source_name": "results",
"sink_name": "input2",
"is_static": false
},
{
"id": "2b3fd279-5816-48da-b2ab-484497fe67d5",
"source_id": "f3d62f22-d193-4f04-85d2-164200fca4c0",
"sink_id": "3b2bb6a5-9c42-4189-a9a0-0e499ccb766a",
"source_name": "status",
"sink_name": "input",
"is_static": false
},
{
"id": "bb036c88-4031-4c6c-a70b-a82f5e50a013",
"source_id": "4d74513d-42f7-4fd0-808a-0f4844513966",
"sink_id": "60ba4aac-1751-4be7-8745-1bd32191d4a2",
"source_name": "output",
"sink_name": "discord_bot_token",
"is_static": false
},
{
"id": "e67befdc-59b5-47bf-9663-8baeeef026f7",
"source_id": "3169d1a8-b541-43f7-97ce-ddc6aecb2080",
"sink_id": "10759047-6387-4ff1-9117-bbef47d24ee8",
"source_name": "positive",
"sink_name": "input2",
"is_static": false
},
{
"id": "9c0fa608-ceea-44cd-98cf-8a2d6ed25b24",
"source_id": "60ba4aac-1751-4be7-8745-1bd32191d4a2",
"sink_id": "af7c5160-7bf0-4ad0-9806-04222009091f",
"source_name": "username",
"sink_name": "input1",
"is_static": false
},
{
"id": "ad5e1bd6-69bd-4846-87dc-e08d8d2e0f2b",
"source_id": "af7c5160-7bf0-4ad0-9806-04222009091f",
"sink_id": "10759047-6387-4ff1-9117-bbef47d24ee8",
"source_name": "output",
"sink_name": "input1",
"is_static": false
},
{
"id": "96f4b2fd-82d8-4754-9f41-f65e8e1f565a",
"source_id": "60ba4aac-1751-4be7-8745-1bd32191d4a2",
"sink_id": "3169d1a8-b541-43f7-97ce-ddc6aecb2080",
"source_name": "message_content",
"sink_name": "text",
"is_static": false
},
{
"id": "ec6666bc-4d54-4960-b3b1-13a0b4a872a7",
"source_id": "3b2bb6a5-9c42-4189-a9a0-0e499ccb766a",
"sink_id": "60ba4aac-1751-4be7-8745-1bd32191d4a2",
"source_name": "output",
"sink_name": "discord_bot_token",
"is_static": false
},
{
"id": "ccd08d1f-7ccc-42fa-882c-91f6991ad5e8",
"source_id": "b09e201a-cd71-42d4-a197-22e7eebc54c9",
"sink_id": "164bc3ea-e812-4391-a62d-bdddcf86f3cd",
"source_name": "output",
"sink_name": "input1",
"is_static": false
},
{
"id": "3ed20f9c-3f79-41e4-8fab-0309e92ac629",
"source_id": "60ba4aac-1751-4be7-8745-1bd32191d4a2",
"sink_id": "f3d62f22-d193-4f04-85d2-164200fca4c0",
"source_name": "channel_name",
"sink_name": "channel_name",
"is_static": false
},
{
"id": "89a129e5-11d2-4fac-9a15-7de182a2b806",
"source_id": "164bc3ea-e812-4391-a62d-bdddcf86f3cd",
"sink_id": "b29e3831-3fb7-41bd-88d8-ce3a5dde3d69",
"source_name": "output",
"sink_name": "prompt",
"is_static": false
},
{
"id": "7978ef39-d862-441d-936f-8da60fefcab6",
"source_id": "10759047-6387-4ff1-9117-bbef47d24ee8",
"sink_id": "b09e201a-cd71-42d4-a197-22e7eebc54c9",
"source_name": "output",
"sink_name": "input1",
"is_static": false
},
{
"id": "32e3bace-5df7-4683-97f2-7d9864878aee",
"source_id": "3169d1a8-b541-43f7-97ce-ddc6aecb2080",
"sink_id": "5658c4f7-8e67-4d30-93f2-157bdbd3ef87",
"source_name": "positive",
"sink_name": "query",
"is_static": false
},
{
"id": "0ab7dce1-84b6-4f96-9eb2-1b458fe205a5",
"source_id": "3169d1a8-b541-43f7-97ce-ddc6aecb2080",
"sink_id": "3b2bb6a5-9c42-4189-a9a0-0e499ccb766a",
"source_name": "negative",
"sink_name": "input",
"is_static": false
}
]
}