Chatbot
Within MindsDB, chatbots are agents connected to a chat interface.
Creating a chatbot requires either an AI agent or an LLM, and a connection to a chat app, like Slack or MS Teams.
Chatbot with an AI agent
AI Agents are customized AI models that can answer questions over your data. You can connect your data to agents in the form of skills.
Here is how to create a chatbot that integrates an AI Agent and can be connected to a chat interface to have a conversation with your data.
The parameters include the following:
database
stores connection to a chat app (like Slack or MS Teams) that should be created with theCREATE DATABASE
statement.agent
is an AI agent created with theCREATE AGENT
command. It consists of an AI model and a set of skills, that is, defined data sets provided at inference time via RAG-based techniques.is_running
indicates whether or not to start the chatbot upon creation.
Here are some tips for using the Slack integration:
-
If you want to use Slack in the
CREATE CHATBOT
syntax, use this method of connecting Slack to MindsDB. -
If you want to connect the chatbot to multiple Slack channels, open your Slack application and add the App/Bot to one or more channels:
- Go to the channel where you want to use the bot.
- Right-click on the channel and select View Channel Details.
- Select Integrations.
- Click on Add an App.
Chatbot with an LLM
ALternatively, you can create a chatbot that is equivalent to embedding an LLM of your choice into a chat app, like Slack or MS Teams.
Here is how to create a chatbot that integrates an LLM and can be connected to a chat interface.
The parameters include the following:
database
stores connection to a chat app (like Slack or MS Teams) that should be created with theCREATE DATABASE
statement.model
is a conversational model created with theCREATE MODEL
command using the LangChain engine.is_running
indicates whether or not to start the chatbot upon creation.
Here is how to delete a chatbot:
And here is how to query all chatbots:
Example
Following the example from here, let’s create a chatbot utilizing the already created agent.
Start by connecting a chat app to MindsDB:
- Follow this instruction to connect Slack to MindsDB.
- Follow this instruction to connect MS Teams to MindsDB.
Next, create a chatbot.
Follow this tutorial to build your own chatbot.
Was this page helpful?