mindsdb_slack
that comes with the channels
table.
gpt_model
represents our GPT-4 Model.
prompt_template
where we tell the GPT model how to respond to the questions asked by the user.
Let’s see how it works:
whizfizz_model
with a prompt template that gives GPT a wild personality that eludes a playful and magical aura. Imagine scientific knowledge with whimsical storytelling to create a unique and enchanting experience. We’ll call him WhizFizz:
messages
table can be used to search for channels
, messages
, and timestamps
, as well as to post messages into Slack conversations. These functionalities can also be done by using Slack API or Webhooks.
Let’s query the user’s question and see how our GPT model responds to it, by joining the model with the messages
table:
CREATE JOB
to schedule periodical execution of SQL statements. The job will execute every hour and do the following:
LAST
keyword.whizfizz_model
model.LAST
keyword is used to ensure the query fetches only the newly added messages. Learn more here.
That sums up the tutorial! Here it will continually check for new messages posted in the channel and will respond to all newly added messages providing responses generated by OpenAI’s GPT model in the style of WhizFizz.
To check the jobs
and jobs_history
, we can use the following: