0:00
/
0:00
Transcript

Chatbot Platform #6 - MVP!

Step-by-Step Guide to Adding CometChat and Preparing the MVP

Thanks for joining in today. I'm really excited because I've finally been able to get the flow up and running—the entire flow—for our bot platform. Users can now create a bot, upload files to it, and interact with it using CometChat. This means the entire circle is complete! When users chat via CometChat, the bot references the uploaded files to provide accurate responses, which is incredibly gratifying for me.

Getting Started from Where We Left Off

Let's jump right in from where we concluded our last session. Previously, I had enabled ngrok, but I hadn't set up the service to accept data yet. Today, I'm addressing that by creating a basic API endpoint. I have given an example of the type of content coming in from CometChat, and the endpoint has now been created. Let’s send a message and see what happens.

Upon sending a message, I noticed it was redirected to login. To bypass this during the demo, I’ve decided not to implement additional authentication right now. In the future, we can certainly add more security layers. For now, I've integrated the bot ID into the URL, allowing us to determine which bot is making the call. I've also included this information on the configuration page.

Configuring the URL and Testing the Response

With the bot ID, I've updated the URL in the CometChat dashboard for the bot. After testing, I found out it was still redirecting. Once fixed, we tried again, and this time the response returned a status OK. Then, I modified the setup to send out a response by integrating relevant code from CometChat's API documentation. Now, upon completion, there should be a response from the system—although initially, the response looped back to itself, sending the same message repeatedly. This was due to an incorrect URL end-point, which has since been corrected.

The Breakthrough with Gym Bot

After rectifying the endpoint, we successfully received a response from Gym bot. Moving forward, I decided to enhance echo bot further by fetching responses from OpenAI and forwarding these to the user. I've associated a workout file with Gym bot, configured all the settings with CometChat, and thoroughly tested this several times.

Running the test on a local system takes a bit longer than it would on a server, but ultimately, I received the desired response, which was extracted from the file. The next step in this developmental journey will be to remove markdown syntax and replace it with standard content to simplify responses.

What’s Next?

There you have it! We've built the whole flow with CometChat. In future episodes, I'll be adding other integrations, such as with Facebook Messenger and WhatsApp. Stay tuned for more advancements.

Thank you for following along.

Bye!

Discussion about this podcast