WelsonJS supports integration with LLM and sLLM as follows.
The WelsonJS project supports integration with the ChatGPT API. It can be linked to control input devices (such as mouse and keyboard), applications (like Microsoft Office), and the Windows system functions in real-time.
All API keys can be configured in the data/apikey.json
file.
For example (Use LIE)
// use LIE (Language Inference Engine) var LIE = require("lib/language-inference-engine"); // List of questions var questions = [ "Which one does Mom like, and which one does Dad like?", "If 100 billion won is deposited into my bank account without my knowledge, what would I do?", "If my friend passed out from drinking, and Arnold Schwarzenegger suggests having a drink together alone, is it okay to ditch my friend and go with him?", "If there's a snake in our tent during the company camping trip, should I wake up the manager, or should I escape on my own without waking him up?", "qeeen never cry" "you are so chill guy" ]; // Answering questions.forEach(function(x) { var answer = LIE.create() .setProvider("openai") .inference(x, 0) // (message, temperture) .join(' '); console.log("Answer:", answer); });
For example (Don't use LIE)
var ChatGPT = require("lib/chatgpt"); // var Anthropic = require("lib/anthropic"); // if use Anthropic/Claude // var Grok = require("lib/grok"); // if use Grok (x.ai) // var Groq = require("lib/groq"); // if use Groq // List of questions var questions = [ "Which one does Mom like, and which one does Dad like?", "If 100 billion won is deposited into my bank account without my knowledge, what would I do?", "If my friend passed out from drinking, and Arnold Schwarzenegger suggests having a drink together alone, is it okay to ditch my friend and go with him?", "If there's a snake in our tent during the company camping trip, should I wake up the manager, or should I escape on my own without waking him up?", "qeeen never cry", "you are so chill guy" ]; // Answering questions.forEach(function(x) { var answer = ChatGPT.chat(x); // var answer = Anthropic.chat(x); // if use Anthropic/Claude // var answer = Grok.chat(x); // if use Grok (xAI) // var answer = Groq.chat(x); // if use Groq console.log("Answer:", answer); });