- Project Name: GPT-based Chatbot Module for Drupal
- Organization: Drupal Association
- Contributor: Krish Gaur
- Mentor: Anushri Kumari
- Drupal.org Username: ubulinux
- Project Link: https://www.drupal.org/project/gptbot
- Packagist: https://packagist.org/packages/krishgaur1354/chatbot
- Source Code: https://git.drupalcode.org/project/gptbot
The Drupal AI GPTbot module leverages OpenAI's language models to add an intelligent chatbot to your Drupal site. It analyzes user interactions and provides real-time assistance, information retrieval, and interactive experiences for website visitors.
Key features:
- AI-powered chatbot interface
- Customizable chatbot appearance
- User behavior and engagement analytics
- Insights for improving user experience
- Easy integration with existing Drupal sites
For a video demonstration of the chatbot, please visit: https://youtu.be/qdr75LVmHtc
- Download and place the module folder in your Drupal installation's
modulesdirectory. - Enable the module through the Drupal admin interface (Extend > AI Chatbot).
- Configure the module settings at Configuration > AI Chatbot Settings.
- Obtain an API key from OpenAI.
- Enter your API key in the module configuration page.
- Customize the chatbot appearance (color, logo, etc).
- Enable or disable specific chatbot features as needed.
During the course of this project, I achieved several significant milestones that enhanced the functionality and user experience of the chatbot module. I successfully set up a robust development environment using DDEV, a Docker-based tool, which streamlined the development process. I integrated speech-to-text functionality, making the chatbot more accessible to a wider range of users. A comprehensive Drupal settings configuration form was developed, allowing administrators to easily customize various aspects of the chatbot. I implemented secure REST API integration with external services, including a system for managing API keys. Additionally, I created a custom Drupal entity type for storing conversation logs, enabling detailed analysis of chatbot interactions. To optimize performance, I implemented a caching mechanism that significantly improved the chatbot's response time, especially during high-traffic periods.
- May 27: Project start, intro with Drupal
- June 3-10: Module creation, project setup, architecture planning
- June 10-24: Coding (OpenAI integration, Frontend chatbot)
- July 1: Mid-term Evaluation
- July 8-22: Testing and extending chatbot functionality
- July 29-Aug 12: Writing unit test cases
- Aug 26: Project end
While working on the project I encountered several significant challenges. Mastering Drupal's complex architecture and the Symfony framework required intense study and practice. Balancing active development with thorough documentation and testing proved particularly demanding as a one-person team. Adapting to Drupal's specific unit testing methodologies, especially becoming proficient with PHPUnit and Drupal's testing framework, presented a steep learning curve. Additionally, ensuring module compatibility across multiple Drupal versions while maintaining functionality required careful consideration and implementation.
Despite the challenges, I've made substantial progress on the project. The chatbot is now fully operational and compatible with Drupal version 9 and newer releases. I've implemented comprehensive unit testing, covering core functionalities and edge cases, significantly enhancing the chatbot's reliability. I've also completed detailed documentation, including installation guides, usage instructions, and API references, to facilitate easy adoption and integration by future users and developers.
Moving forward, I've identified several exciting areas for further development. These include expanding custom Drupal reporting and analytics capabilities for the chatbot, developing an enhanced visual conversation flow builder with custom entity type storing, integrating Drupal Commerce functionality to enable product search and recommendations, and exploring potential integrations with other popular Drupal modules. These enhancements aim to extend the chatbot's capabilities and provide more comprehensive assistance to users within the Drupal ecosystem.
My GSoC experience has been truly transformative, significantly enhancing my skills in open-source contribution, Drupal development, and AI integration. The support from the Drupal community and my mentor has been invaluable, allowing me to gain deep insights into Drupal's architecture and module development process while improving my problem-solving skills by tackling real-world challenges in a complex ecosystem. I've developed a stronger understanding of AI integration in web applications, particularly in the context of chatbots, and learned the importance of thorough testing and documentation in open-source projects. I'm excited to continue my involvement with the Drupal community and further refine the chatbot module based on user feedback and emerging AI technologies.

Hi Krish, I am too looking forward to contributing to Gsoc 25 can you help me with it ? I am a bit confused with the project and how to start, have sent you a request on linked in, kindly connect, I would be grateful to your help