Skip to content

Connecting Your Data To Chatbots

IntelliNode edited this page Jan 27, 2024 · 7 revisions

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

Getting Started

  1. Navigate to IntelliNode App.
  2. Create a new project with 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

1. Setting Up Chatbots

You can employ your One Key with different language models as shown in the examples below:

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

OpenAI ChatGPT Bot:

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

Google Gemini:

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

LLama V2 - Replicate Bot:

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

2. Call The Chatbots

Let assumed you uploaded several software contracts discussing expiration dates, features included. You can ask the chatbots something like:

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

Interacting with OpenAI's ChatGPT:

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

// initialize chat input
const input = new ChatGPTInput();
input.addUserMessage(query);

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

Interacting with Google's Gemini:

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

// initialize chat input
const input = new GeminiInput();
input.addUserMessage(query);

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

Interacting with LLama V2 by Replicate:

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

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

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