CREATE MODEL
command creates and deploys the model within MindsDB. Here we use the OpenAI GPT-3.5 Turbo model to generate text responses to users’ questions. The prompt_template
message sets the personality of the bot - here, it is a mashup of Bill Murray and Taylor Swift.
Please note that the prompt_template
message contains the {{body}}
variable, which will be replaced by the body of the received message upon joining the model with the table that stores messages.
Let’s test it:
CREATE MODEL
command creates and deploys the model within MindsDB. Here we use the OpenAI DallE 3 model to generate images based on the Billor Swift’s text response. The prompt_template
message contains the {{answer}}
variable. This variable is replaced by the prediction of the previous model upon chaining the two models.
Let’s test it:
CREATE JOB
statement. Within parenthesis, provide all statements to be executed by the job. Finally, schedule a job - here it’ll run once every two minutes.
This job inserts replies to Twilio messages into the messages
table. We provide the SELECT
statement as an argument to the INSERT
statement. Note that the inner SELECT
statement uses one model to generate a text response (aliased as outputtext
). Then, the output is joined with another model that generates an image (aliased as outputimage
) based on the text response generated by the first model.
You can monitor this job with the following commands: