Skip to navigation
Skip to content
Search for:
Search
Menu
Apps
My Account
Log In
Sign Up
Apps
My Account
Log In
Sign Up
$
0.00
0 items
Home
/
App
/
Warm Email
You must be logged in to view this content.
Redirecting.
{"nodes":{"0":{"id":"0","z":152.7454849229367,"x":7841.02081361604,"y":-7484.539771613821,"vx":3.0365881848411593e-51,"vy":-2.0286866999457442e-51,"vz":6.1047946213971205e-53,"remainingLinks":-1,"val":0,"colorRef":"#9fbbd1","links":[]},"1":{"id":"1","z":0,"fz":0,"x":-7513.508571046076,"y":-8463.510744278126,"vx":-2.5494621226968788e-51,"vy":-2.4187406956884598e-51,"vz":0,"remainingLinks":-1,"val":0,"colorRef":"#9fbbd1","links":[]},"2":{"id":"2","z":0,"fz":0,"x":5550.481545531681,"y":1411.2369051837459,"vx":8.450379910292717e-51,"vy":2.0159493099961138e-51,"vz":0,"remainingLinks":-1,"val":0,"colorRef":"#9fbbd1","links":[]},"3":{"id":"3","z":0,"fz":0,"x":1476.7037992380713,"y":-12825.388176017737,"vx":2.829029473713931e-52,"vy":-3.3423555886879935e-51,"vz":0,"remainingLinks":-1,"val":0,"colorRef":"#9fbbd1","links":[]},"4":{"id":"4","z":0,"fz":0,"x":-6352.779320703262,"y":2272.240829138014,"vx":-6.64625317002507e-51,"vy":2.3887469908737478e-51,"vz":0,"remainingLinks":-1,"val":0,"colorRef":"#9fbbd1","links":[]},"96446918975098":{"id":"96446918975098","z":0,"x":-654.4804521770855,"y":410.0968783422897,"val":0,"ap":1,"vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":-654.4804521770855,"fy":410.0968783422897,"fz":0,"html":"|||lt|||div class=|||apos||||||apos||||||gt|||This is the exit node|||lt|||/div|||gt|||","apInputId":3721719117767,"colorRef":"#9fbbd1","portInputId1":19968105437023,"js":"console.log(\"what up fam!\")","ports":{},"links":[]},"71596805625849":{"id":"71596805625849","z":0,"x":-581.6458809977762,"y":795.3082722168148,"name":"multiinput","val":0,"ap":1,"vx":0,"vy":0,"vz":0,"order":2,"portOutputId1":19968105437023,"remainingLinks":-1,"fx":-581.6458809977762,"fy":795.3082722168148,"fz":0,"html":"|||lt|||div class=\"htmlOFFUI\"|||gt||||||lt|||label|||gt|||Chat Input|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt|||Using Wolfram, What is the circumference of the earth?|||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||\n\n|||lt|||button onclick=\"sparkNode([node.id])\"|||gt|||Spark|||lt|||/button|||gt|||\n","colorRef":"#9fbbd1","js":"outputVal = |||apos||||||lt|||div class=\"userDialog\"|||gt||||||lt|||div class=\"userLabel\"|||gt|||user:|||lt|||/div|||gt||||||apos||| + jQuery(\"#textarea-\" + node.id).val() + |||apos||||||lt|||/div|||gt||||||apos|||;\n\n\nlogNode = getNodeByName(\"multichatlog\");\njQuery(\"#log-\" + logNode.id).append( outputVal);\n\njQuery(\"#textarea-\" + node.id).val(\"\");//clear text box\n\nsetTimeout(function() {\n //your code to be executed after 1 second\ntypingVal = |||apos||||||lt|||div class=\"robotDialog robotTyping\"|||gt||||||lt|||div class=\"robotLabel\"|||gt|||robot:|||lt|||/div|||gt|||...|||lt|||/div|||gt||||||apos|||;\njQuery(\"#log-\" + logNode.id).append( typingVal );\n}, 2000);\n\n","links":[{"id":"47972556676407","strength":1}]},"81258374893943":{"id":"81258374893943","z":0,"x":-183.87945104407686,"y":803.2220735116016,"name":"searchQuery","val":0,"ap":0.01,"vx":0,"vy":0,"vz":0,"order":0,"remainingLinks":-1,"fx":-183.87945104407686,"fy":803.2220735116016,"fz":0,"html":"|||lt|||div class=\"htmlNOUI\"|||gt|||\n|||lt|||label|||gt|||Search Query:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||","js":"categorisationNode = getNodeByName(\"decisionRouter\");\ncategorisation = jQuery(\"#textarea-\" + categorisationNode.id).val();//.replace(/([a-z]+)(|||apos|||[a-z]+)/gi, \"$1|||amp|||#39;$2\");\nengine = categorisation.toLowerCase().trim();\n\nnode.ports.engine = engine;\n\n\n//Clear textarea\njQuery(\"#textarea-\" + node.id).val(\"\");\n\ninputValPre = \"\";\n\n//inputValPre += \"Please base the search query upon these thoughts: \" + jQuery(\"#textarea-\" + getNodeByName(\"thoughts\").id).html();\n\n\ninputValPre += \"If the most recent user: prompt isn|||apos|||t conversational, Please rewrite the most recent query input text as an appropriate, clear and accurate search query. Remove anything superfluous. Do not mention Wolfram Alpha, Google, Knowledgebase or any other search engine name. Return only the Search Query..\" \n//inputValPre += \"Please refer to the MOST RECENT user: input, and add any context to this you need to.\" \n//inputValPre += \"If the most recent user: doesn|||apos|||t look like a search at all, just write null.\" \n\n//Add Chat Log to to query\n//inputVal = \"Chat History: \" + jQuery(\"#log-\" + getNodeByName(\"multichatlog\").id).text();\n\nlogCleanText = getLogClean(jQuery(\"#log-\" + getNodeByName(\"multichatlog\").id), 50);\n//inputVal += \"Chat History: \" + jQuery(\"#log-\" + getNodeByName(\"multichatlog\").id).not(\".bubbleInfo\").text();\ninputVal = \"Chat History: \" + logCleanText;\n\n\n//Add latest user Input to query\ninputVal += jQuery(\"#textarea-\" + node.apInputId).val();\n\ninputValPost = \"Search Query:\";\n\nsparkGPT(node.id, inputValPre, inputVal, inputValPost, 0.6)","apInputId":22206930342733,"colorRef":"#9fbbd1","portInputId1":19968105437023,"ports":{},"links":[{"id":"91837166859850","strength":1}]},"33525753217068":{"id":"33525753217068","z":0,"x":-295.0491362284578,"y":890.4051389617462,"name":"default","val":0,"ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":-295.0491362284578,"fy":890.4051389617462,"fz":0,"html":"|||lt|||div class=\"\"|||gt|||\n|||lt|||label|||gt|||Fail case DEFAULT ACTION|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||","js":"//alert(\"default\")\n//node.val = 0;","links":[{"id":"61137294200083","strength":1}]},"71061919825433":{"id":"71061919825433","z":0,"x":-321.98802964120273,"y":1008.7654103877776,"name":"decisionRouter","val":0,"ap":0.01,"vx":0,"vy":0,"vz":0,"order":1,"remainingLinks":-1,"fx":-321.98802964120273,"fy":1008.7654103877776,"fz":0,"html":"|||lt|||div class=\"\"|||gt|||\n|||lt|||label|||gt|||Decision Router|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||button onclick=\"sparkNode([node.id])\"|||gt|||Spark|||lt|||/button|||gt|||\n|||lt|||/div|||gt|||","js":"\ndecision = jQuery(\"#textarea-\" + node.apInputId).val()\n\ndecision = decision.replaceAll(|||apos|||\"|||apos|||, |||apos||||||apos|||).replaceAll(\"|||apos|||\", |||apos||||||apos|||).toLowerCase().trim();\n\nconsole.log(decision)\ndecision = decision.split(\" \")[0];\ndecision = decision.split(\"\\n\")[0];\ndecision = decision.split(\"\\r\")[0];\n\ndecision = parseDecision(decision);\n\n\n//Add thinking\nlogNode = getNodeByName(\"multichatlog\");\njQuery(\".robotTyping\").remove();\ntypingVal = |||apos||||||lt|||div class=\"robotDialog robotTyping thought\"|||gt||||||lt|||div class=\"robotLabel\"|||gt|||robot:|||lt|||/div|||gt|||I think I will use |||apos|||+decision +|||apos|||...|||lt|||/div|||gt||||||apos|||; \njQuery(\"#log-\" + logNode.id).html( jQuery(\"#log-\" + logNode.id).html() + typingVal );\n\n\njQuery(\"#textarea-\" + node.id).val(decision)\n\ntry {\n sparkNode(getNodeByName(decision).id);\n} catch(e) {\n sparkNode(getNodeByName(\"default\").id)\n}\n//Lose all Energy\nnode.val = 0;","apInputId":47972556676407,"colorRef":"#9fbbd1","portInputId1":19968105437023,"ports":{},"links":[]},"81899283949868":{"id":"81899283949868","z":0,"x":-178.3696765429624,"y":490.7301354615512,"val":0,"ap":1,"vx":0,"vy":0,"vz":0,"order":1,"remainingLinks":-1,"fx":-178.3696765429624,"fy":490.7301354615512,"fz":0,"html":"|||lt|||div class=\"\"|||gt|||\n|||lt|||label|||gt|||Search GPT:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||","js":"//jQuery(\".robotTyping\").remove();\n//typingVal = |||apos||||||lt|||div class=\"robotDialog robotTyping\"|||gt||||||lt|||div class=\"robotLabel\"|||gt|||robot:|||lt|||/div|||gt|||...|||lt|||/div|||gt||||||apos|||; \n//jQuery(\"#log-\" + logNode.id).html( jQuery(\"#log-\" + logNode.id).html() + typingVal );\n\nnode.ports.searchQuery = jQuery(\"#input-\" + node.apInputId).val()\nnode.ports.engine = jQuery(\"#engine-\" + node.apInputId).val()\nnode.ports.searchResults = jQuery(\"#textarea-\" + node.apInputId).val()\n\n\ninputValPre = \"I am a friendly personal assistant called Sally. I will UNDER NO CIRCUMSTANCES repeat myself.\" \ninputVal = \"\";\n\n \n if (jQuery(\"#textarea-\" + node.apInputId).val() != \"\") {\n inputValPre += \"I|||apos|||m going to answer you referring to the found information. If it|||apos|||s not EXPLICITLY contained within the found information I will mention that I don|||apos|||t know. If it appears to be conversational in nature I will continue to chat. I will not make up anything if it|||apos|||s not EXPLICITLY mentioned in the document. I will just reply in a friendly way and continue the conversation. If there is a RELEVANT |||apos|||URL:|||apos||| to cite in the recently returned data, I will accurately cite it at the end. I will not cite any other URLS.\" \n inputValPre += \"If I have any doubts about this information I will mention that I have doubts (looking at my recent memory for the reason)\" \n //inputVal = jQuery(\"#output-3721719117767\").html();\n\n //Add recent Knowledgebase to Query\n inputVal += \"SEARCH RESULT:\" + jQuery(\"#textarea-\" + node.apInputId).val();\n //Add Knowledgebase source to Query\n //inputVal += \"If appropriate, please mention that I sourced this information from: |||apos|||\" + jQuery(\"#engine-\" + getNodeByName(\"multisearch\").id).val() + \"|||apos|||. If it is |||apos|||internal|||apos|||, mention that it came from the knowledgebase. If it|||apos|||s google, youtube or wolfram alpha please mention this.\";\n inputVal += \"If there are any indications in the recent knowledge that I DO NOT KNOW, then please mention that I do not know - that this information is out of scope and explain why.\"\n inputVal += \"I will NEVER mention a URL. If I reference any CITATION urls, I won|||apos|||t mention them. Instead I will say that I|||apos|||ve included the links below but will NOT mention them.\"\n inputVal += \"I will not make up or hallucinate any facts. I will only state things I know explicitly from the SEARCH RESULT (in a fun, funny and friendly manner). If I don|||apos|||t know something I will say that it is beyond what I could find in the search results\"\n inputVal += \"I will reply in a friendly, funny and fun way. If I|||apos|||ve already told the answer, I won|||apos|||t repeat myself. If I like a topic I will get excited about it! I will reply with a bit of personal banter followed by the facts in most cases.\"\n\t\t\t\t//inputVal += \"At the end, please add exactly this raw HTML: |||lt|||br|||gt||||||lt|||br|||gt||||||apos|||I sourced this from |||apos|||\" + jQuery(\"#engine-\" + getNodeByName(\"multisearch\").id).val() + \".\"\n //inputVal += jQuery(\"#textarea-\" + getNodeByName(\"thoughts\").id).val();\n } else {\n //alert(\"NO!\")\n inputVal += \"Please include something humble to the effect of: I tried to look for information but I was not able to find any information on this, but I will tell you what I personally think. DO NOT INCLUDE ANY LINKS. PLEASE MAKE SURE YOU MENTION THAT YOU|||apos|||RE NOT SURE AND THAT THIS IS YOUR OPINION.\";\n\t\t} \n\n\n\n//Add Chat Log to to query\nlogCleanText = getLogClean(jQuery(\"#log-\" + getNodeByName(\"multichatlog\").id));\n//inputVal += \"Chat History: \" + jQuery(\"#log-\" + getNodeByName(\"multichatlog\").id).not(\".bubbleInfo\").text();\ninputVal += \"Chat History: \" + logCleanText;\n//jQuery(\"#log:not(.bubbleInfo)\").text()\n\n//Add latest Query\n//inputVal += jQuery(\"#textarea-\" + getNodeByName(\"multiinput\").id).val();\n\n//Add Final Prompt\ninputValPost = \"Excitedly, with a bit of humour and playfulness. OUTPUT FORMATTED IN PERFECT MARKDOWN FORMAT SYNTAX. I will doublecheck formatting before replying to user.\\nSally:\";\n\n//inputValPost = \"I|||apos|||m going to answer you, but I will be jokey and playful but will also tell you the true answer. Sally:\";\n//inputValPost += \"I will be jokey and playful but will also tell you the true answer followed by any relevant EXPLICITLY MENTIONED URL: citations if necessary. Sally:\";\n\n\n//alert(inputVal);\n\nconsole.log(\"FINAL QUERY:\");\n\nconsole.log(inputValPre + \"\\n\\n\" + inputVal + \"\\n\\n\" + inputValPost)\nsparkGPT(node.id, inputValPre, inputVal, inputValPost, 0.7)","apInputId":91837166859850,"colorRef":"#9fbbd1","portInputId1":19968105437023,"ports":{},"links":[{"id":"31580389122307","strength":1}]},"47972556676407":{"id":"47972556676407","z":0,"x":-443.23457587384553,"y":882.4914785929058,"name":"categorisation","val":0,"ap":0.01,"vx":0,"vy":0,"vz":0,"order":1,"remainingLinks":-1,"fx":-443.23457587384553,"fy":882.4914785929058,"fz":0,"html":"|||lt|||div class=\"htmlNOUI\"|||gt|||\n|||lt|||label|||gt|||Categorisation:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||","js":"//Clear textarea\njQuery(\"#textarea-\" + node.id).val(\"\");\ninputCategories = \"[conversational, write, google, youtube, wolfram, knowledgebase, findimage, makeimage]\"\n\n\ninputValPre = \"\";\n\ninputValPre += \"You are a highly efficient categorisation AI. You will route this conversation to the correct engine based on the most recent interaction:\\n\"\n\ninputValPre += \"You will categorise this input into one of the following:\";\ninputValPre += inputCategories;\n\ninputValPre += \"Glossary:\";\nkbTopics = \"paris, france, giraffes\";\ninputValPre += \"google will handle all current events, news and pretty much anything you would do with google other than knowledgebase and computational topics\\n\";\ninputValPre += \"youtube refers to any requests for music or videos\\n\";\ninputValPre += \"knowledgebase refers to the following topics only: \" + kbTopics + \"\\n\";\ninputValPre += \"wolfram refers to computational queries.\\n\";\ninputValPre += \"conversational refers to anything where there doesn|||apos|||t appear to be any need for new information\";\ninputValPre += \"write refers to if it appears the user has made a request for the agent to write some copy, like a script an article, a blog, a story etc.\"\n/*inputValPre += \"[dalle2: IMPORTANT Return |||apos|||dalle2|||apos||| if this mentions dalle or dalle2, or appears to be an image prompt or request to create visual art, photo, or create an image or photograph from scratch or if the user explicitly mentions dalle or dalle2]\\n\";\ninputValPre += \"[conversational: Return |||apos|||conversational|||apos||| If the input appears primarily fun, playful or conversational. or if it looks like the user wants the AI to speculate, offer an opinion, be creative, write copy etc]\\n\" \ninputValPre += \"[wolfram: Return |||apos|||wolfram|||apos||| if it mentions wolfram, or appears to a computational query.]\\n\"\ninputValPre += \"[youtube: Return |||apos|||youtube|||apos||| if this mentions youtube, or it looks like a music request or youtube.]|||apos|||n\"; \ninputValPre += \"[google: Return |||apos|||google|||apos||| if the user: looks like they|||apos|||re curious for google if this mentions google, or looks like a query related to geography, events, news, people or current events etc.]\\n\"; \ninputValPre += \"CRITICALLY IMPORTANT: [Return |||apos|||knowledgebase|||apos||| if it mentioned the knowledgebase or if it is on the topics of (paris or giraffes AND ONLY THESE)].\\n\" \ninputValPre += \"In order to make your judgement, please refer to the MOST RECENT user: input, and add any context to this you need to.\" \ninputValPre += \"IMPORTANT! If the most recent [user: input] doesn|||apos|||t look like it has any particular action, return conversational\" \n*/\n\n\n//Add Chat Log to to query\n//inputVal = \"Chat History: \" + jQuery(\"#log-\" + getNodeByName(\"multichatlog\").id).html();\nlogCleanText = getLogClean(jQuery(\"#log-\" + getNodeByName(\"multichatlog\").id), 50);\n//inputVal += \"Chat History: \" + jQuery(\"#log-\" + getNodeByName(\"multichatlog\").id).not(\".bubbleInfo\").text();\ninputVal = \"Chat History: \" + logCleanText;\n\n\ninputVal += \"Give extra emphasis to the following phrase. If the lates [user:] string appears to be purely conversational, then return |||apos|||conversational|||apos|||: \";// + jQuery(\"#textarea-\" + node.apInputId).val();\ninputVal += \"user: \" + jQuery(\"#textarea-\" + getNodeByName(\"multiinput\").id).val()+\"\\n\";\n\ninputValPost = \"These are the option: \" + inputCategories;\ninputValPost += \"It looks like right now you want to do the following: (single word):\";\n\nsparkGPT(node.id, inputValPre, inputVal, inputValPost, 0.7)\n\n//node.val=0;","apInputId":71596805625849,"colorRef":"#9fbbd1","portInputId1":19968105437023,"ports":{},"links":[{"id":"71061919825433","strength":1}]},"3721719117767":{"id":"3721719117767","z":0,"x":-650.0238177279391,"y":610.9019639033075,"name":"multichatlog","val":0,"ap":1,"order":2,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":-650.0238177279391,"fy":610.9019639033075,"fz":0,"html":"|||lt|||div class=\"htmlOFFUI\"|||gt|||\n|||lt|||label|||gt|||Log|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||div id=\"log-[node.id]\"|||gt||||||lt|||/div|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||\n|||lt|||button onclick=|||apos|||jQuery(\"#log-[node.id]\").html(\"\")|||apos||||||gt|||Clear|||lt|||/button|||gt|||","js":"outputVal = jQuery(\"#textarea-\" + node.apInputId).val();\njQuery(\"#log-\" + node.id).append( outputVal);\njQuery(\".robotTyping\").remove();\ngetAndShowCurrentPoints();","ports":{},"apInputId":31580389122307,"portInputId1":19968105437023,"links":[{"id":"96446918975098","strength":1}]},"91837166859850":{"id":"91837166859850","z":0,"x":-180.84680798057977,"y":671.1309996048465,"name":"","val":0,"ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":-180.84680798057977,"fy":671.1309996048465,"fz":0,"html":"|||lt|||div class=\"\"|||gt|||\n|||lt|||label|||gt|||Search Engines:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"input-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"engine-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||","js":"/*categorisationNode = getNodeByName(\"categorisation\");\ncategorisation = jQuery(\"#textarea-\" + categorisationNode.id).val();//.replace(/([a-z]+)(|||apos|||[a-z]+)/gi, \"$1|||amp|||#39;$2\");\n\nsearchQueryNode = getNodeByName(\"searchQuery\");\nsearchQuery = sanitiseSearchQuery(jQuery(\"#textarea-\" + searchQueryNode.id).val());\n\nengine = categorisation.toLowerCase().trim();\n*/\n\n//searchQueryNode = getNodeByName(\"searchQuery\");\nsearchQuery = sanitiseSearchQuery(jQuery(\"#textarea-\" + node.apInputId).val());\nnode.ports.searchQuery = searchQuery;\n\nengine = node.ports.engine;\n\njQuery(\"#engine-\" + node.id).val(engine)\njQuery(\"#input-\" + node.id).val(searchQuery)\njQuery(\"#textarea-\" + node.id).val(\"\")\n\nconsole.log(|||apos|||Command: sparkEngine(\"|||apos|||+engine+|||apos|||\", \"|||apos|||+node.id+|||apos|||\", \"|||apos|||+searchQuery+|||apos|||\")|||apos|||)\n\n//Add thinking\nlogNode = getNodeByName(\"multichatlog\");\njQuery(\".robotTyping\").remove();\ntypingVal = |||apos||||||lt|||div class=\"robotDialog robotTyping thought\"|||gt||||||lt|||div class=\"robotLabel\"|||gt|||robot:|||lt|||/div|||gt|||Searching |||apos||| + engine + |||apos||| for \"|||apos||| + searchQuery.trim() + |||apos|||\"...|||lt|||/div|||gt||||||apos|||; \njQuery(\"#log-\" + logNode.id).html( jQuery(\"#log-\" + logNode.id).html() + typingVal );\n\nsparkEngine(engine, node.id, searchQuery)\n//sparkWolfram(node.id, searchQuery)\n","ports":{},"apInputId":81258374893943,"portInputId1":19968105437023,"links":[{"id":"81899283949868","strength":1}]},"31580389122307":{"id":"31580389122307","z":0,"x":-457.82448746895903,"y":476.2423359795682,"val":0,"ap":1,"vx":0,"vy":0,"vz":0,"order":1,"remainingLinks":-1,"fx":-457.82448746895903,"fy":476.2423359795682,"fz":0,"html":"|||lt|||div class=\"\"|||gt|||\n|||lt|||label|||gt|||Format Reply:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||","js":"searchQuery = node.ports.searchQuery;\nengine = node.ports.engine;\nsearchResults = node.ports.searchResults;\n\nsourceInfo = |||apos||||||lt|||div style=\"float: right; bottom: 17px; position: relative;\"|||gt|||☁️|||lt|||/div|||gt||||||apos|||\n\nif (!engine.includes(|||apos|||conversational|||apos|||) |||amp||||||amp||| engine != \"\" |||amp||||||amp||| searchResults != \"\") {\n \n citations = extractCitations(searchResults );\n if (citations == null) { \n firstCitation = \"#\"; \n citationHTML = source;\n } else {\n firstCitation = citations[0];\n citationHTML = |||apos||||||lt|||a href=\"|||apos||| + firstCitation + |||apos|||\" target=\"_blank\"|||gt||||||apos|||+ engine +|||apos||||||lt|||/a|||gt||||||apos|||;\n }\n sourceInfo = |||apos||||||lt|||div class=\"bubbleInfo\"|||gt||| Information sourced from |||apos|||+citationHTML+|||apos||| |||lt|||/div|||gt||||||apos|||;\n}\n\n//outputVal = |||apos||||||lt|||div class=\"userDialog\"|||gt||||||lt|||div class=\"userLabel\"|||gt|||user:|||lt|||/div|||gt||||||apos||| + jQuery(\"#textarea-\" + getNodeByName(\"multiinput\").id).val() + |||apos||||||lt|||/div|||gt||||||apos|||;\n\nrobotReply = jQuery(\"#textarea-\" + node.apInputId).val();\nrobotReply = checkMarkdownLinks(robotReply, searchResults);\nrobotReply = convertLinksToMarkdown(robotReply, searchResults)\n\noutputVal = |||apos||||||lt|||div class=\"robotDialog\"|||gt||||||lt|||div class=\"robotLabel\"|||gt|||robot:|||lt|||/div|||gt||||||lt|||md-block|||gt||||||apos||| + robotReply + sourceInfo + |||apos||||||lt|||/md-block|||gt||||||lt|||/div|||gt||||||apos|||;\n\njQuery(\"#textarea-\" + node.id).val(outputVal)\n","apInputId":70594082504909,"colorRef":"#9fbbd1","portInputId1":19968105437023,"ports":{},"links":[{"id":"3721719117767","strength":1}]},"70594082504909":{"id":"70594082504909","z":0,"x":-314.33213617027104,"y":578.7737385505877,"name":"","val":0,"ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"ports":{},"remainingLinks":-1,"fx":-314.33213617027104,"fy":578.7737385505877,"fz":0,"html":"|||lt|||div class=\"\"|||gt|||\n|||lt|||label|||gt|||Conversational GPT:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||","js":"node.ports.searchQuery = \"\";\nnode.ports.engine = \"conversational\";\nnode.ports.searchResults = \"\";\n\ninputValPre = \"I am a friendly personal assistant called Sally. I will UNDER NO CIRCUMSTANCES repeat myself.\" \n\n//Add Chat Log to to query\nlogCleanText = getLogClean(jQuery(\"#log-\" + getNodeByName(\"multichatlog\").id));\ninputVal = \"Chat History: \" + logCleanText;\nconsole.log(\"chatHistory\")\nconsole.log(logCleanText);\ninputValPost = \"Excitedly, with a bit of humour and playfulness, replying to user.\\nRobot:\";\n\nsparkGPT(node.id, inputValPre, inputVal, inputValPost, 0.7)","apInputId":61137294200083,"links":[{"id":"31580389122307","strength":1}]},"22206930342733":{"id":"22206930342733","z":0,"x":-189.95034428987032,"y":917.6864554547402,"val":0,"name":"wolfram","ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":-189.95034428987032,"fy":917.6864554547402,"fz":0,"html":"|||lt|||div class=\"\"|||gt|||\n|||lt|||label|||gt|||Wolfram Router|||lt|||/label|||gt|||\n|||lt|||/div|||gt|||","links":[{"id":"81258374893943","strength":1}]},"16601902205587":{"id":"16601902205587","z":0,"x":-173.77640865729285,"y":957.4894326473942,"val":0,"name":"google","ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":-173.77640865729285,"fy":957.4894326473942,"fz":0,"html":"|||lt|||div class=\"\"|||gt|||\n|||lt|||label|||gt|||Google Router|||lt|||/label|||gt|||\n|||lt|||/div|||gt|||","links":[{"id":"81258374893943","strength":1}]},"12675028066942":{"id":"12675028066942","z":0,"x":-159.55731304435412,"y":993.809969049921,"name":"youtube","val":0,"ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":-159.55731304435412,"fy":993.809969049921,"fz":0,"html":"|||lt|||div class=\"\"|||gt|||\n|||lt|||label|||gt|||Youtube Router|||lt|||/label|||gt|||\n|||lt|||/div|||gt|||","links":[{"id":"81258374893943","strength":1}]},"94001896621803":{"id":"94001896621803","z":0,"x":-127.90543554647434,"y":1041.089821863605,"name":"knowledgebase","val":0,"ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":-127.90543554647434,"fy":1041.089821863605,"fz":0,"html":"|||lt|||div class=\"\"|||gt|||\n|||lt|||label|||gt|||Knowledgebase Router|||lt|||/label|||gt|||\n|||lt|||/div|||gt|||","links":[{"id":"81258374893943","strength":1}]},"61137294200083":{"id":"61137294200083","z":0,"x":-291.75352853818663,"y":799.2538763562322,"name":"conversational","val":0,"ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":-291.75352853818663,"fy":799.2538763562322,"fz":0,"html":"|||lt|||div class=\"\"|||gt|||\n|||lt|||label|||gt|||Conversational Router|||lt|||/label|||gt|||\n|||lt|||/div|||gt|||","ports":{},"apInputId":33525753217068,"links":[{"id":"70594082504909","strength":1}]},"43780566463295":{"id":"43780566463295","z":0,"x":92.84170748284004,"y":1088.9051672865276,"name":"dalle2","val":0,"ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":92.84170748284004,"fy":1088.9051672865276,"fz":0,"html":"|||lt|||div class=\"htmlNOUI\"|||gt||||||lt|||label|||gt|||Dalle2 Input|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt|||A cute dog in a red hat|||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||\n\n|||lt|||button onclick=\"sparkNode([node.id])\"|||gt|||Spark|||lt|||/button|||gt|||\n","js":"jQuery(\"#textarea-\" + node.id).val(jQuery(|||apos|||#textarea-|||apos||| + node.apInputId).val())","ports":{},"apInputId":89751873596684,"links":[{"id":"88697689127288","strength":1}]},"88697689127288":{"id":"88697689127288","z":0,"x":87.67249803879604,"y":990.3710188082728,"val":0,"ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":87.67249803879604,"fy":990.3710188082728,"fz":0,"html":"|||lt|||div class=\"htmlNOUI\"|||gt|||\n|||lt|||label|||gt|||Image:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||img id=\"image-[node.id]\" src=\"\" style=\"background-color:black; width:200px; height:200px;\"|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||\n|||lt|||button onclick=\"sparkNode([node.id])\"|||gt|||Spark|||lt|||/button|||gt|||","js":"jQuery(\"#image-\" + node.id).attr(\"src\",\"\");\n\n\n\ninputVal = jQuery(\"#textarea-\" + node.apInputId).val();\nnode.ports.imagePrompt = inputVal;\n\nthisImageId = \"#image-\" + node.id;\n//thisImageSrc = |||apos|||http://gomind.local/wp-content/uploads/2022/12/DALL%C2%B7E-2022-10-10-00.20.55-Beautiful-cyberwoman-with-glowing-eyes.png|||apos|||;\n\nrequestId = getRandomInt(100000000000000000);\ninputValSanitised = encodeURIComponent(inputVal)\nthisImageSrc = \"https://gomind.local/wp-content/plugins/gomind/include/imgapi.php?returnImg=true|||amp|||userPrompt=\" + inputValSanitised + \"|||amp|||requestid=\" + requestId;\n\n//Add thinking\nlogNode = getNodeByName(\"multichatlog\");\njQuery(\".robotTyping\").remove();\ntypingVal = |||apos||||||lt|||div class=\"robotDialog robotTyping thought\"|||gt||||||lt|||div class=\"robotLabel\"|||gt|||robot:|||lt|||/div|||gt|||Dreaming up an image...|||lt|||/div|||gt||||||apos|||; \njQuery(\"#log-\" + logNode.id).html( jQuery(\"#log-\" + logNode.id).html() + typingVal );\n\n\nsetActionStatus(node.id, \"inProgress\");\nfetch(thisImageSrc)\n .then(response =|||gt||| response.blob())\n .then(blob =|||gt||| {\n //create an object URL for the blob\n let objectURL = URL.createObjectURL(blob);\n node.ports.imageUrl = thisImageSrc;\n //set the src of the img element to the object URL\n jQuery(\"#image-\" + node.id).attr(\"src\", thisImageSrc);\n setActionStatus(node.id, \"completed\");\n });\n\n//jQuery(\"#image-\" + node.id).attr(\"src\",\"https://gomind.local/wp-content/plugins/gomind/include/imgapi.php?returnImg=true|||amp|||userPrompt=\" + inputVal);\n","ports":{},"apInputId":43780566463295,"links":[{"id":"29804422502378","strength":1}]},"29804422502378":{"id":"29804422502378","z":0,"x":39.83658367806881,"y":830.605995788418,"val":0,"ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":39.83658367806881,"fy":830.605995788418,"fz":0,"ports":{},"apInputId":88697689127288,"html":"|||lt|||div class=\"\"|||gt|||\n|||lt|||label|||gt|||Conversational Dalle GPT:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||button onclick=\"sparkNode([node.id])\"|||gt|||Spark|||lt|||/button|||gt|||\n|||lt|||/div|||gt|||","js":"node.ports.searchQuery = \"\";\nnode.ports.engine = \"dalle2\";\nnode.ports.searchResults = \"\";\n\ninputValPre = \"I am a friendly personal assistant called Sally.\" \n\n//Add Chat Log to to query\nlogCleanText = getLogClean(jQuery(\"#log-\" + getNodeByName(\"multichatlog\").id));\ninputVal += \"Chat History: \" + logCleanText;\ninputValPost = \"OK wait. [IMAGE] Sally has just created an image depicting |||apos|||\" +node.ports.imagePrompt+ \"|||apos|||. While she won|||apos|||t say that, she will speak to that mood and aesthetic. She is pretty excited and proud to show you. She will refer to the context of the conversation in her reply.\\nSally:\";\n\nsparkGPT(node.id, inputValPre, inputVal, inputValPost, 0.9)","links":[{"id":"47431146322681","strength":1}]},"47431146322681":{"id":"47431146322681","z":0,"x":-13.31423927603391,"y":728.4992294067532,"val":0,"ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":-13.31423927603391,"fy":728.4992294067532,"fz":0,"html":"|||lt|||div class=\"\"|||gt|||\n|||lt|||label|||gt|||Combine:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n\n|||lt|||button onclick=\"sparkNode([node.id])\"|||gt|||Spark|||lt|||/button|||gt|||\n|||lt|||/div|||gt|||","js":"reply = jQuery(\"#textarea-\" + node.apInputId).val();\nimageUrl = node.ports.imageUrl;\nimagePrompt = node.ports.imagePrompt;\n//jQuery(\"#textarea-\" + node.id).val(reply + |||apos|||![|||apos|||+imagePrompt+|||apos|||](|||apos|||+imageUrl+|||apos||| \"|||apos|||+imagePrompt+|||apos|||\")|||apos|||)\n\noutputVal = |||apos||||||lt|||div class=\"robotDialog\"|||gt||||||lt|||div class=\"robotLabel\"|||gt|||robot:|||lt|||/div|||gt||||||lt|||div|||gt||||||apos||| + |||apos||||||lt|||div|||gt||||||lt|||img src=\"|||apos|||+imageUrl+|||apos|||\"|||gt||||||lt|||/div|||gt||||||lt|||div class=\"imageSubtitle\"|||gt||||||apos|||+imagePrompt+|||apos||||||lt|||/div|||gt||||||apos||| + reply + |||apos||||||lt|||div|||gt||||||lt|||/div|||gt||||||apos|||;\n\n\njQuery(\"#textarea-\" + node.id).val(outputVal )","ports":{},"apInputId":29804422502378,"links":[{"id":"3721719117767","strength":1}]},"89751873596684":{"id":"89751873596684","z":0,"x":83.98424574459739,"y":1199.942490307053,"val":0,"ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":83.98424574459739,"fy":1199.942490307053,"fz":0,"html":"|||lt|||div class=\"htmlNOUI\"|||gt|||\n|||lt|||label|||gt|||GPT Generate Image Prompt:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||button onclick=\"sparkNode([node.id])\"|||gt|||Spark|||lt|||/button|||gt|||\n|||lt|||/div|||gt|||","js":"//Add thinking\nlogNode = getNodeByName(\"multichatlog\");\njQuery(\".robotTyping\").remove();\ntypingVal = |||apos||||||lt|||div class=\"robotDialog robotTyping thought\"|||gt||||||lt|||div class=\"robotLabel\"|||gt|||robot:|||lt|||/div|||gt|||Thinking of a good way to describe your image...|||lt|||/div|||gt||||||apos|||; \njQuery(\"#log-\" + logNode.id).html( jQuery(\"#log-\" + logNode.id).html() + typingVal );\n\n\n//Clear textarea\njQuery(\"#textarea-\" + node.id).val(\"\");\n\ninputValPre = \"\";\n\n//inputValPre += \"Please base the search query upon these thoughts: \" + jQuery(\"#textarea-\" + getNodeByName(\"thoughts\").id).html();\n\n\ninputValPre += \"Given the most recent parts of this conversation. I will generate a sophisticated and well designed Dalle2 image prompt which will generate an aesthetically pleasing and appropriate image.\" \n\nlogCleanText = getLogClean(jQuery(\"#log-\" + getNodeByName(\"multichatlog\").id), 100);\ninputVal = \"Chat History: \" + logCleanText;\n\n//Add latest user Input to query\ninputVal += jQuery(\"#textarea-\" + getNodeByName(|||apos|||multiinput|||apos|||).id).val();\n\ninputValPost = \"Dalle2 Prompt:\";\n\nsparkGPT(node.id, inputValPre, inputVal, inputValPost, 0.6)","ports":{},"apInputId":61554404223575,"links":[{"id":"43780566463295","strength":1}]},"61554404223575":{"id":"61554404223575","z":0,"x":54.85423632015438,"y":1271.5453639102127,"val":0,"name":"dalle2","ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":54.85423632015438,"fy":1271.5453639102127,"fz":0,"html":"|||lt|||div class=\"\"|||gt|||\n|||lt|||label|||gt|||Dalle2 Router|||lt|||/label|||gt|||\n|||lt|||/div|||gt|||","links":[{"id":"89751873596684","strength":1}]},"94055406781602":{"id":"94055406781602","z":0,"x":-377.55108532451413,"y":781.1773475018618,"val":0,"name":"write","ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":-377.55108532451413,"fy":781.1773475018618,"fz":0,"html":"|||lt|||div class=\"\"|||gt|||\n|||lt|||label|||gt|||Write Router|||lt|||/label|||gt|||\n|||lt|||/div|||gt|||","links":[{"id":"3509080441512","strength":1}]},"3509080441512":{"id":"3509080441512","z":0,"x":-442.4556232017571,"y":578.0390002336142,"val":0,"ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":-442.4556232017571,"fy":578.0390002336142,"fz":0,"html":"|||lt|||div class=\"\"|||gt|||\n|||lt|||label|||gt|||Writing GPT:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||","js":"//Add thinking\nlogNode = getNodeByName(\"multichatlog\");\njQuery(\".robotTyping\").remove();\ntypingVal = |||apos||||||lt|||div class=\"robotDialog robotTyping thought\"|||gt||||||lt|||div class=\"robotLabel\"|||gt|||robot:|||lt|||/div|||gt|||Writing copy...|||lt|||/div|||gt||||||apos|||; \njQuery(\"#log-\" + logNode.id).html( jQuery(\"#log-\" + logNode.id).html() + typingVal );\n\n\nnode.ports.searchQuery = \"\";\nnode.ports.engine = \"conversational\";\nnode.ports.searchResults = \"\";\n\ninputValPre = \"I am a professional copywriter who will write copy as per the request.\" \n\n//Add Chat Log to to query\nlogCleanText = getLogClean(jQuery(\"#log-\" + getNodeByName(\"multichatlog\").id));\ninputVal = \"Chat History: \" + logCleanText;\nconsole.log(\"chatHistory\")\nconsole.log(logCleanText);\ninputValPost = \"Output formatted in Markdown format. Robot:\";\n\nsparkGPT(node.id, inputValPre, inputVal, inputValPost, 0.7)","ports":{},"apInputId":94055406781602,"links":[{"id":"31580389122307","strength":1}]},"19298131912770":{"id":"19298131912770","z":0,"x":588.7094621152002,"y":1359.6909112654448,"name":"codePrompt","val":0,"ap":1,"ports":{},"vx":0,"vy":0,"vz":0,"order":2,"portOutputId1":19968105437023,"remainingLinks":-1,"fx":588.7094621152002,"fy":1359.6909112654448,"fz":0,"html":"|||lt|||div class=\"htmlNOUI\"|||gt||||||lt|||label|||gt|||Code Prompt|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt|||\nPlease write a javascript function that stores the |||lt|||header|||gt||| as html and then replaces the header with a centered h1 that says \"I am in control\". Hold this for 5 seconds and then revert to the original header html\n\n|||lt|||/textarea|||gt|||\n|||lt|||/div|||gt|||\n\n|||lt|||button onclick=\"sparkNode([node.id]);\"|||gt|||Spark|||lt|||/button|||gt|||\n","colorRef":"#9fbbd1","js":"node.ports.codePrompt = jQuery(\"#textarea-\" + node.id).val();\n\n//outputVal = |||apos||||||lt|||div class=\"userDialog\"|||gt||||||lt|||div class=\"userLabel\"|||gt|||user:|||lt|||/div|||gt||||||apos||| + jQuery(\"#textarea-\" + node.id).val() + |||apos||||||lt|||/div|||gt||||||apos|||;\n\n\n//logNode = getNodeByName(\"multichatlog\");\n//jQuery(\"#log-\" + logNode.id).append( outputVal);\n\n\n/*\nsetTimeout(function() {\n //your code to be executed after 1 second\ntypingVal = |||apos||||||lt|||div class=\"robotDialog robotTyping\"|||gt||||||lt|||div class=\"robotLabel\"|||gt|||robot:|||lt|||/div|||gt|||...|||lt|||/div|||gt||||||apos|||;\njQuery(\"#log-\" + logNode.id).append( typingVal );\n}, 2000);\n*/\n","links":[{"id":"43870140843116","strength":1}]},"71759309837183":{"id":"71759309837183","z":0,"x":537.6376271659968,"y":1056.5050526688294,"val":0,"ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":537.6376271659968,"fy":1056.5050526688294,"fz":0,"html":"|||lt|||div class=\"\"|||gt|||\n|||lt|||label|||gt|||Coding GPT:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||\n|||lt|||button onclick=\"sparkNode([node.id])\"|||gt|||Spark|||lt|||/button|||gt|||\n","js":"\n//inputValPre = \"I am a professional coder who will write code as per the request.\" \ninputValPre = \"\" \n\n//Add Chat Log to to query\n//logCleanText = getLogClean(jQuery(\"#log-\" + getNodeByName(\"multichatlog\").id));\n//inputVal = \"Chat History: \" + logCleanText;\n//console.log(\"chatHistory\")\n//console.log(logCleanText);\ninputVal = node.ports.worksheetCode = \"\\n\\n\";\n\ninputVal += \"This code does the following:\" + node.ports.codePrompt + \"\\n\";\n\n\n//jQuery(\"#textarea-\" + node.apInputId).val(\"\");//clear text box\ninputValPost = \"Plaintext Javascript (No url encoded strings or characters. No script tags, code tags or html. Correct linebreaks. Correct spacing. Correct Linebreaks. Output in plain text Markdown. Important: Run the function.):|||lt|||code|||gt|||\";\n//inputValPost = `The following code runs perfectly. It is correctly formatted PLAIN TEXT (not urlencoded) Javascript. It does not include |||lt|||script|||gt||| or HTML tags. This is the functional Javascript code wrapped in |||lt|||code|||gt||| tags. I will stop when I have finished the |||lt|||/code|||gt|||/nPlain text Javascript:\\n`;\n\n//alert(inputVal)\nsparkGPT(node.id, inputValPre, inputVal, inputValPost, 0.3, \"code-davinci-002\", \"|||lt|||/code|||gt|||\")","ports":{},"apInputId":43870140843116,"portInputId1":19968105437023,"links":[{"id":"53149189286575","strength":1}]},"53149189286575":{"id":"53149189286575","z":0,"x":468.41434992058635,"y":914.7089972697175,"name":"codeEngine","val":0,"ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":468.41434992058635,"fy":914.7089972697175,"fz":0,"ports":{},"apInputId":71759309837183,"portInputId1":19968105437023,"html":"|||lt|||div class=\"\"|||gt|||\n|||lt|||label|||gt|||Run Code (Reference):|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||button onclick=\"sparkNode([node.id])\"|||gt|||Spark|||lt|||/button|||gt|||\n|||lt|||/div|||gt|||","js":"inputVal = jQuery(\"#textarea-\" + node.apInputId).val();\n//inputVal = decodeURI(inputVal);\n\ninputVal = inputVal.replaceAll(|||apos||||||lt|||script|||gt||||||apos|||, |||apos||||||apos|||);\ninputVal = inputVal.replaceAll(|||apos||||||lt|||/script|||gt||||||apos|||, |||apos||||||apos|||);\n\n\ninputVal = inputVal.replaceAll(|||apos||||||lt|||code|||gt||||||apos|||, |||apos||||||apos|||);\ninputVal = inputVal.replaceAll(|||apos||||||lt|||/code|||gt||||||apos|||, |||apos||||||apos|||);\ninputVal = inputVal.trim();\n//inputVal = inputVal.replaceAll(|||apos|||\t\t|||apos|||, |||apos|||\\n|||apos|||);\n\n//inputVal = inputVal.replaceAll(|||apos||| |||apos|||, |||apos|||\\n|||apos|||);\n\n//inputVal = inputVal.replaceAll(|||apos|||\\n\\n\\n|||apos|||, |||apos|||\\n|||apos|||);\n\n\njQuery(\"#textarea-\" + node.id).val(inputVal)\n//alert(inputVal)\n\ntry {\n eval(inputVal)\n}catch (e) {\n //alert(\"error: \" + e)\n \nvar debug = confirm(\"Error: \" + e + \"\\nWould you like to debug?\");\nif(debug) {\n // Perform debugging actions\n console.log(\"Debugging Enabled\");\n newInput = \"\"; \n newInput += \"This is my current code:\\n\"\n newInput += \"\\n\\n|||lt|||code|||gt|||\" + inputVal + \"|||lt|||/code|||gt|||\\n\\n\";//jQuery(\"#textarea-\" + getNodeByName(\"codeinput\").id).val()\n newInput += \"Unfortunately this is incorrect as it returns the following error: \" + e + \"\\n\"\n \n newInput += \"Please remove any strange characters. Please simplify any comment. Please make sure all correct formatting and line breaks. If there are any variables that look like they have weird spaces, or any missing new lines, please fix these formatting errors.\\n\";\n newInput += \"Think about what could be causing this and revise. Can you please revise, adding anything mising and fixing any errors? Return ONLY valid code.\\n\"\n codePromptNodeId = getNodeByName(\"codePrompt\").id;\n codeWorksheetNodeId = getNodeByName(\"codeWorksheet\").id;\n jQuery(\"#textarea-\" + codeWorksheetNodeId ).val(newInput)\n sparkNode(codePromptNodeId )\n\n\n} else {\n console.log(\"Debugging Disabled\");\n}\n\n \n\n}","links":[{"id":"97522680768171","strength":1}]},"97522680768171":{"id":"97522680768171","z":0,"val":0,"ap":1,"colorRef":"#9fbbd1","x":366.44927274585456,"y":802.6012256821175,"vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":366.44927274585456,"fy":802.6012256821175,"fz":0,"ports":{},"apInputId":53149189286575,"portInputId1":19968105437023,"links":[]},"43870140843116":{"id":"43870140843116","z":0,"x":573.1795415848678,"y":1191.5214277791827,"ports":{},"name":"codeWorksheet","val":0,"ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":573.1795415848678,"fy":1191.5214277791827,"fz":0,"html":"|||lt|||div class=\"htmlNOUI\"|||gt||||||lt|||label|||gt|||Code Worksheet|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||\n\n|||lt|||button onclick=\"sparkNode([node.id])\"|||gt|||Spark|||lt|||/button|||gt|||\n|||lt|||button onclick=|||apos|||jQuery(\"#textarea-[node.id]\").val(\"\")|||apos||||||gt|||Clear|||lt|||/button|||gt|||\n","js":"node.ports.worksheetCode = jQuery(\"#textarea-\" + node.id).val();","apInputId":19298131912770,"portInputId1":19968105437023,"links":[{"id":"71759309837183","strength":1}]},"49979798943230":{"id":"49979798943230","z":11.569094867275627,"x":-22.236435461947977,"y":84.79271787113623,"order":"0","val":0,"ap":0.01,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":-22.236435461947977,"fy":84.79271787113623,"fz":11.569094867275627,"ports":{},"apInputId":"95840054223511","ui":true,"html":"|||lt|||div class=\"htmlUI\"|||gt||||||lt|||label|||gt|||My Business Url:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||input id=\"textarea-[node.id]\" value=\"https://orbits.live\"|||gt||||||lt|||/input|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||","js":"//node.ports.lastUrl = jQuery(\"#textarea-\" + node.id).val();","links":[{"id":"92969614596062","strength":1}],"apInputHistory":["95840054223511","95840054223511"],"lastSparkID":-1,"lastProcessedSparkID":-2,"lastSparkTime":1710438763225},"92969614596062":{"id":"92969614596062","z":-43.992181036225595,"x":124.03956364750509,"y":100.08212915762147,"val":0,"ap":0.01,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":124.03956364750509,"fy":100.08212915762147,"fz":-43.992181036225595,"html":"|||lt|||div class=\"htmlOffUI\"|||gt|||\n|||lt|||label|||gt|||Last Data Source:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||input id=\"dataSource-[node.id]\"|||gt||||||lt|||/input|||gt||||||lt|||br|||gt|||\n|||lt|||label|||gt|||Article Text:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||\n\n|||lt|||button onclick=\"sparkNode([node.id])\"|||gt|||Spark|||lt|||/button|||gt|||","js":"inputVal = jQuery(\"#textarea-\" + node.apInputId).val();\n\nlastDataSource = jQuery(\"#dataSource-\" + node.id).val();\n\n//if (node.ports.lastUrl != inputVal) {\nif (lastDataSource == \"\" || typeof node.ports.lastUrl === |||apos|||undefined|||apos||| || node.ports.lastUrl != inputVal) { \n jQuery(\"#dataSource-\" + node.id).val(\"fetch\")\n fetchArticle(node.id, inputVal)\n node.ports.lastUrl = inputVal\n} else {\n \n jQuery(\"#dataSource-\" + node.id).val(\"cache\")\n}","ports":{},"apInputId":"49979798943230","links":[{"id":"85989837251780","strength":1}],"apInputHistory":["49979798943230","49979798943230"],"lastSparkID":-1,"lastProcessedSparkID":-2,"lastSparkTime":1710438763334},"85989837251780":{"id":"85989837251780","z":-24.910224750252894,"x":346.97790770283814,"y":91.50643802006215,"name":"summaryA","val":0,"ap":0.01,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":346.97790770283814,"fy":91.50643802006215,"fz":-24.910224750252894,"ports":{},"apInputId":"92969614596062","ui":true,"order":"2","links":[{"id":"66577818619182","strength":1}],"lastSparkID":-1,"lastProcessedSparkID":-2,"apInputHistory":["92969614596062","92969614596062","92969614596062","92969614596062"],"lastSparkTime":1710438763438,"html":"|||lt|||div class=\"htmlOFFUI\"|||gt|||\n|||lt|||label|||gt|||My Business Summary:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||\n","js":"inputValPre = \"\";\n\ninputVal = jQuery(\"#textarea-\" + node.apInputId).val();\n\ninputValPost = \"The following is a tweet length summary that includes the name of the business and the key contact that is easy to understand. If possible, try and identify their key goals and mission:\";\n\n//sparkGPT(node.id, inputValPre, inputVal, inputValPost, 0.6)\nfinalPrompt = inputValPre + inputVal + inputValPost;\nstreamId = \"textarea-\" + node.id;\n\nawait streamGPTInline(node.id, |||apos|||#|||apos||| + streamId, finalPrompt, undefined, 0.6, \"gpt-4\", undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);\n","currentlyStreaming":false},"66577818619182":{"id":"66577818619182","z":-2.9676109439968616,"x":574.8401434260087,"y":-3.121737886702639,"order":"4","val":0,"ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":574.8401434260087,"fy":-3.121737886702639,"fz":-2.9676109439968616,"ports":{},"apInputId":"95337411893905","ui":true,"links":[{"id":"62033901261049","strength":1}],"lastSparkID":-1,"lastProcessedSparkID":-2,"apInputHistory":["85989837251780","85989837251780","95337411893905","95337411893905","85989837251780","95337411893905"],"lastSparkTime":1710438771300,"html":"|||lt|||div class=\"htmlUI\"|||gt|||\n|||lt|||label|||gt|||What do we want our client to do:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"goal-[node.id]\"|||gt|||Choose us to host their next virtual event|||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||label|||gt|||Sales Email:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||\n\n|||lt|||button onclick=\"sparkNode([node.id])\"|||gt|||Redo from Summaries|||lt|||/button|||gt|||","js":"\n\n//inputVal = jQuery(\"#textarea-\" + node.apInputId).val();\nsummaryA = jQuery(\"#textarea-\" + getNodeByName(\"summaryA\").id).val();\nsummaryB = jQuery(\"#textarea-\" + getNodeByName(\"summaryB\").id).val();\ngoal = jQuery(\"#goal-\" + node.id).val();\n\ninputValPre = \"I will write a friendly introductory tweet with the intention of \"+goal +\", being sure to outline how our business can help their unique goals. If they do certain things I will try and speculate on how our service will help them in service of those goals. Identify if there are alignments on mission\\n\";\ninputVal = \"\";\n\n\ninputVal += |||apos|||###What we want our customer to do: |||apos||| + goal + \"\\n\";\ninputVal += \"###Our Business: \" + summaryA + \"\\n\\n\";\ninputVal += \"###Potential Client|||apos|||s Business: \" + summaryB + \"\\n\\n\"\n//inputVal += |||apos|||###Our Goal: |||apos||| + goal;\n\n\ninputValPost = \"After analysing the Potential Client|||apos|||s Business I noticed several areas where we align, and a value proposition that directly solves a problem they likely have. The following is the brief, friendly email that ended up winning the client and getting them to \"+ goal +\"(Plain Text. Include Subject. Brief, casual and friendly. Under 100 words):\";\n\nfinalPrompt = inputValPre + inputVal + inputValPost;\nstreamId = \"textarea-\" + node.id;\n\nawait streamGPTInline(node.id, |||apos|||#|||apos||| + streamId, finalPrompt, undefined, 0.8, \"gpt-4\", undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);\n\n\n//sparkGPT(node.id, inputValPre, inputVal, inputValPost, 0.8)\n\nnode.val = 0;","currentlyStreaming":false},"95362511494659":{"id":"95362511494659","z":11.569094867275627,"x":-25.89419309863026,"y":-102.1382813945363,"order":"1","val":0,"ap":0.01,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":-25.89419309863026,"fy":-102.1382813945363,"fz":11.569094867275627,"ports":{},"apInputId":"95840054223511","ui":true,"html":"|||lt|||div class=\"htmlUI\"|||gt||||||lt|||label|||gt|||Client Business Url:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||input id=\"textarea-[node.id]\" value=\"https://jackmorton.com/offices/sydney/\"|||gt||||||lt|||/input|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||\n","links":[{"id":"76137697194309","strength":1}],"apInputHistory":["95840054223511","95840054223511"],"lastSparkID":-1,"lastProcessedSparkID":-2,"lastSparkTime":1710438763225},"76137697194309":{"id":"76137697194309","z":-43.992181036225595,"x":128.78931706739695,"y":-98.4367672902159,"val":0,"ap":0.01,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":128.78931706739695,"fy":-98.4367672902159,"fz":-43.992181036225595,"html":"|||lt|||div class=\"htmlOFFUI\"|||gt|||\n|||lt|||label|||gt|||Last Data Source:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||input id=\"dataSource-[node.id]\"|||gt||||||lt|||/input|||gt||||||lt|||br|||gt|||\n|||lt|||label|||gt|||Article Text:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||\n\n|||lt|||button onclick=\"sparkNode([node.id])\"|||gt|||Spark|||lt|||/button|||gt|||","js":"inputVal = jQuery(\"#textarea-\" + node.apInputId).val();\n\nlastDataSource = jQuery(\"#dataSource-\" + node.id).val();\n\n//if (node.ports.lastUrl != inputVal) {\nif (lastDataSource == \"\" || typeof node.ports.lastUrl === |||apos|||undefined|||apos||| || node.ports.lastUrl != inputVal) { \n jQuery(\"#dataSource-\" + node.id).val(\"fetch\")\n fetchArticle(node.id, inputVal)\n node.ports.lastUrl = inputVal\n} else {\n \n jQuery(\"#dataSource-\" + node.id).val(\"cache\")\n}","ports":{},"apInputId":"95362511494659","links":[{"id":"95337411893905","strength":1}],"apInputHistory":["95362511494659","95362511494659"],"lastSparkID":-1,"lastProcessedSparkID":-2,"lastSparkTime":1710438763334},"95337411893905":{"id":"95337411893905","z":-24.910224750252894,"x":350.32926634252885,"y":-97.31012936753946,"name":"summaryB","val":0,"ap":0.01,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":350.32926634252885,"fy":-97.31012936753946,"fz":-24.910224750252894,"ports":{},"apInputId":"76137697194309","ui":true,"order":"3","links":[{"id":"66577818619182","strength":1}],"lastSparkID":-1,"lastProcessedSparkID":-2,"apInputHistory":["76137697194309","76137697194309","76137697194309","76137697194309"],"lastSparkTime":1710438763442,"html":"|||lt|||div class=\"htmlOFFUI\"|||gt|||\n|||lt|||label|||gt|||Client Business Summary:|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||textarea id=\"textarea-[node.id]\"|||gt||||||lt|||/textarea|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||\n","js":"inputValPre = \"\";\n\ninputVal = jQuery(\"#textarea-\" + node.apInputId).val();\n\ninputValPost = \"The following is a tweet length summary that includes the name of the business and the key contact that is easy to understand. If possible, try and identify their key goals and mission:\";\n\n//sparkGPT(node.id, inputValPre, inputVal, inputValPost, 0.6)\nfinalPrompt = inputValPre + inputVal + inputValPost;\nstreamId = \"textarea-\" + node.id;\n\nawait streamGPTInline(node.id, |||apos|||#|||apos||| + streamId, finalPrompt, undefined, 0.6, \"gpt-4\", undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);\n","currentlyStreaming":false},"95840054223511":{"id":"95840054223511","z":-30.845110182962024,"x":-169.494316635687,"y":-4.382175343662546,"order":"2","val":0,"ap":1,"colorRef":"#9fbbd1","vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":-169.494316635687,"fy":-4.382175343662546,"fz":-30.845110182962024,"ui":true,"html":"|||lt|||div class=\"htmlUI\"|||gt||||||lt|||label|||gt|||Run entire Flow|||lt|||/label|||gt||||||lt|||br|||gt|||\n|||lt|||/div|||gt|||\n\n|||lt|||button onclick=\"sparkNode([node.id])\"|||gt|||Go!|||lt|||/button|||gt|||\n","links":[{"id":"49979798943230","strength":1},{"id":"95362511494659","strength":1}],"lastSparkID":-1,"lastProcessedSparkID":-2,"lastSparkTime":1710438763123},"62033901261049":{"id":"62033901261049","z":-4.2661419575714925,"val":0,"ap":1,"colorRef":"#9fbbd1","x":835.0893853082129,"y":-2.542444971123196,"vx":0,"vy":0,"vz":0,"remainingLinks":-1,"fx":835.0893853082129,"fy":-2.542444971123196,"fz":-4.2661419575714925,"ports":{},"apInputId":"66577818619182","links":[],"lastSparkID":-1,"lastProcessedSparkID":-2,"apInputHistory":["66577818619182"],"lastSparkTime":1710438781114}},"settings":{"htmlMode":2,"cameraPosition":{"x":-113.44574461559053,"y":11.593011017909358,"z":1000},"cameraRotation":{"x":-6.039613253960852e-17,"y":0,"z":0}}}