Skip to content

Connecting Your Data To Chatbots

IntelliNode edited this page Jan 27, 2024 · 7 revisions

Getting Started With IntelliNode

IntelliNode cloud allows you to connect your data to various chatbot engines, including OpenAI ChatGPT, Google Gemini, and LLama V2. This integration enables a tailored chatbot agent experience, providing tuned responses to the context of your uploaded documents or diagram images.

How setupt intellinode cloud with your data

  1. Visit the IntelliNode App portal.
  2. Start a project using the Document option.
  3. Upload your documents or images, such as PDF, DOC, DOCX, PNG, JPG, and code files.
  4. Copy the generated One Key; this key will be used to connect IntelliNode's chatbot to your uploaded data.

Implementation of Chatbot Models

The setup code is identical for all bots, making it easy to switch between them. You can employ your One Key with different language models as shown in the examples below:

First, import the necessary modules:

const { Chatbot, SupportedChatModels } = require("intellinode");
const intelliKey = '<generated_one_key>';

Assuming that your data set includes software contracts, you can ask the chatbots details about the contract using this code:

let query = "List to me the included features in vector database contract"

OpenAI ChatGPT

Incorporate the One Key with chatGPT in the following way:

const openaiBot = new Chatbot(openaiKey, SupportedChatModels.OPENAI, null, {oneKey: intelliKey});

You can ask the ChatGPT bot details about the data using this code:

const { ChatGPTInput } = require("intellinode");

const input = new ChatGPTInput();
input.addUserMessage(query);

const responses = await openaiBot.chat(input);
responses.forEach(response => console.log("- " + response));

Google Gemini

To configure Google Gemini, use the One Key in this way:

const geminiBot = new Chatbot(geminiApiKey, SupportedChatModels.GEMINI, null, {oneKey: intelliKey});

You can interact with the Gemini bot using this code:

const { GeminiInput } = require("intellinode");

const input = new GeminiInput();
input.addUserMessage(query);

const responses = await geminiBot.chat(input);
responses.forEach(response => console.log("- " + response));

LLama V2 - Replicate

To implement LLama V2 - Replicate Bot with the One Key, use:

const replicateBot = new Chatbot(replicateApiKey, SupportedChatModels.REPLICATE, null, {oneKey: intelliKey});

Interact with the LLama V2 bot with the following code:

const { LLamaReplicateInput } = require("intellinode");

const input = new LLamaReplicateInput("You are a helpful assistant!");
input.addUserMessage(query);

const responses = await replicateBot.chat(input);
responses.forEach(response => console.log("- " + response));
Clone this wiki locally