@ag076810/ai
Version:
Effortlessly integrate AI text and image models in your node applications
16 lines (12 loc) • 536 B
JavaScript
const AI = require("../src/index.js");
(async function () {
const llm = new AI("remember the codeword is 'blue'");
let content;
content = await llm.chat("what is the codeword I just told you to remember?");
console.log(content); // blue
llm.user("the codeword is now red")
content = await llm.chat("what is the codeword I just told you to remember?")
console.log(content); // red
content = await llm.chat("what was the first codeword I told you to remember?");
console.log(content); // blue
})();