![Screenshot 2023-06-02 at 2 47 17 AM](https://private-user-images.githubusercontent.com/8688852/242808553-40fdbf63-4f53-4143-8628-39c934eaaed4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDUxNjgsIm5iZiI6MTczOTM0NDg2OCwicGF0aCI6Ii84Njg4ODUyLzI0MjgwODU1My00MGZkYmY2My00ZjUzLTQxNDMtODYyOC0zOWM5MzRlYWFlZDQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTJUMDcyMTA4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NmEzMTAyYTg2ZTFjMjYyYmEyZTRjODk0ODBkNTdhNDI0MzFmMjc1OWVmNTMwMjZiNTM4ZDkyY2M1MTM3NDAyZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.Q9k0Daqtxe9OhYDVu50_ZNc8FUju02NOT1MhvrSfx-g)
ConvoStack is a plug-and-play embeddable AI chatbot widget and backend deployment framework for your website. It is completely free and open source and currently running on our docs website!
The core technologies are:
- React (frontend)
- Express.js (backend)
- Redis (Production cache & pub/sub)
- Langchain (AI agent framework integration)
To learn more about the project, compatible technologies, and how to get started, check out the docs.
To see a live demo of ConvoStack, check out our free playground!
Get your AI chatbot up and running in minutes with our Quickstart repo and guide:
In the following example, we are connecting a Langchain OpenAI LLM to the chatbot playground.
import * as dotenv from "dotenv";
// Configures the OpenAI API key
dotenv.config();
import { playground } from "convostack/playground";
import { IAgentContext, IAgentResponse } from "convostack/agent";
import { OpenAI } from "langchain/llms/openai";
playground({
async reply(context: IAgentContext): Promise<IAgentResponse> {
// `humanMessage` is the content of each message the user sends via the chatbot playground.
let humanMessage = context.getHumanMessage().content;
// `agent` is the OpenAI agent we want to use to respond to each `humanMessage`
const agent = new OpenAI({ modelName: "gpt-3.5-turbo" });
// `call` is a simple string-in, string-out method for interacting with the OpenAI agent.
const resp = await model.call(humanMessage);
// `resp` is the generated agent's response to the user's `humanMessage`
return {
content: resp,
contentType: "markdown",
};
},
});
Follow our quickstart guide for more Langchain + ConvoStack examples.
To add the ConvoStack framework to an existing project, run the following command:
npm install --save convostack
To see the full documentation check out our docs site at docs.convostack.ai.