Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

14
LINES

< > BotCompany Repo | #1029582 // ai_makeWebChatBot

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (5719L/41K).

1  
static PairS ai_makeWebChatBot(S name) {
2  
  S botID = #1028922, faqID = #1028921;
3  
  LS botSrc = javaTok(assertNempty(loadSnippet(botID)));
4  
  LS faqSrc = javaTok(assertNempty(loadSnippet(faqID)));
5  
  S newBotID = createSnippet("", name + " Chat Bot", snippetType(botID));
6  
  S newFaqID = createSnippet("", name + " Answers DB", snippetType(faqID));
7  
  addTagToSnippet(newBotID, "butter");
8  
  addTagToSnippet(newFaqID, "butter");
9  
  jreplace(botSrc, faqID, newFaqID);
10  
  jreplace(faqSrc, botID, newBotID);
11  
  editSnippet(newBotID, join(botSrc));
12  
  editSnippet(newFaqID, join(faqSrc));
13  
  ret pair(newBotID, newFaqID);
14  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1029582
Snippet name: ai_makeWebChatBot
Eternal ID of this version: #1029582/4
Text MD5: 83a38e9d77e18ab2c3e1bc6e25fe3f5e
Transpilation MD5: a48e6332db926fc64f4b7919ce423396
Author: stefan
Category: javax / web chat bots
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-08-25 20:47:51
Source code size: 621 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 236 / 337
Version history: 3 change(s)
Referenced in: [show references]