CREATE CHATBOT
statement that lets you customize your chatbot with an AI model and a data source of your choice. Follow this tutorial to learn build a chatbot with a Text2SQL skill.
The CREATE CHATBOT
statement requires the following componenets:
- Chat app: A connection to a chat app, such as Slack or MS Teams.
- AI agent: An AI agent that comes with an AI model trained with the provided training data. Learn more about AI agents here.
Learn more about chatbots here.
Chatbot Components
Chat App
Use theCREATE DATABASE
statement to connect the chat app to MindsDB.
AI Agent
Start by creating and deploying the model.If you haven’t created a LangChain engine, use the
CREATE ML_ENGINE
statement, as explained here.complete
before proceeding.
Next step is to create one or more skills for an AI agent. Here we create a Text2SQL skill.
sales_data
table.
Now let’s create an AI agent using the above model and skill.
Create Chatbot
Once all the components are ready, let’s proceed to creating the chatbot.database
parameter stores connection to a chat app. And the agent
parameter stores an AI agent created by passing a model and training data.
You can query all chatbot using this query: