Last active
September 20, 2023 10:18
-
-
Save Barqawiz/cc215ee1a3d01917193f4bf179a4b6c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Chatbot, ChatGPTInput } = require('intellinode'); | |
// set the api key for openai | |
const chatbot = new Chatbot(apiKey, 'openai'); | |
// set the system mode and the user message. | |
const input = new ChatGPTInput('You are a helpful assistant.'); | |
input.addUserMessage('What is the distance between the Earth and the Moon?'); | |
// get the responses from the chatbot | |
const responses = await chatbot.chat(input); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment