Bug Fixes and New Features in an AI Chatbot (Node.js + OpenAI + Qdrant)
Budget: $20 – $50 USD
We are looking for a Senior Developer with experience in Node.js, OpenAI API, and vector databases to finalize an AI chatbot. The chatbot is hosted on our VPS (Ubuntu), and the backend is already functional, connecting to MySQL for conversation history and Qdrant for RAG (Retrieval Augmented Generation) functionality. The main objective is to fix a critical bug and implement significant improvements within an estimated timeframe of 10 to 15 days.
TASKS TO PERFORM:
1. Fix Error 400 (Token Limit): The chat.js file currently sends the entire MySQL history to the OpenAI API, causing the API to crash due to the token limit. A history management strategy is required, such as a sliding window (e.g., keeping the first message and the last 8 messages) or an active conversation summary.
2. Prompt and Temperature Adjustment: In openai.js, it's necessary to increase the temperature (to a value between 0.4 and 0.5) and adjust the prompt so that the chatbot generates shorter responses, avoids "walls of text," and encourages a Socratic dialogue. The chatbot should also be allowed to provide practical examples when relevant.
3. Implementing WhatsApp Notifications: Create a Cron Job in Node.js that reads the MySQL database to identify inactive users. This Cron Job should then send a one-way reminder to these users, integrating the Twilio API or using a Webhook through tools like Make or Zapier.
4. Webhook Validation: Verify and ensure that users created after making a purchase in WooCommerce are correctly registered on the corresponding subdomain's WordPress site.
REQUIREMENTS:
* Demonstrable experience in Node.js development.
* In-depth knowledge and experience using the OpenAI API.
* Experience with vector databases, preferably Qdrant.
* Familiarity with Linux server administration (Ubuntu).
* Ability to work independently and meet deadlines.
What we deliver:
* Full access to the VPS hosting the chatbot.
* Full access to the databases (MySQL and Qdrant).
* Access to the project's current source code, which is clean and structured.
TASKS TO PERFORM:
1. Fix Error 400 (Token Limit): The chat.js file currently sends the entire MySQL history to the OpenAI API, causing the API to crash due to the token limit. A history management strategy is required, such as a sliding window (e.g., keeping the first message and the last 8 messages) or an active conversation summary.
2. Prompt and Temperature Adjustment: In openai.js, it's necessary to increase the temperature (to a value between 0.4 and 0.5) and adjust the prompt so that the chatbot generates shorter responses, avoids "walls of text," and encourages a Socratic dialogue. The chatbot should also be allowed to provide practical examples when relevant.
3. Implementing WhatsApp Notifications: Create a Cron Job in Node.js that reads the MySQL database to identify inactive users. This Cron Job should then send a one-way reminder to these users, integrating the Twilio API or using a Webhook through tools like Make or Zapier.
4. Webhook Validation: Verify and ensure that users created after making a purchase in WooCommerce are correctly registered on the corresponding subdomain's WordPress site.
REQUIREMENTS:
* Demonstrable experience in Node.js development.
* In-depth knowledge and experience using the OpenAI API.
* Experience with vector databases, preferably Qdrant.
* Familiarity with Linux server administration (Ubuntu).
* Ability to work independently and meet deadlines.
What we deliver:
* Full access to the VPS hosting the chatbot.
* Full access to the databases (MySQL and Qdrant).
* Access to the project's current source code, which is clean and structured.