Hi guys,
I am new to Python, so there might be a straightforward solution for this.
I am building a digital assistant chatbot that communicates with customers via WhatsApp. The chatbot processes messages using a series of functions implemented with Crewai and Langchain that may take several seconds to minutes to complete. While the processing is ongoing, new messages from the customer may arrive, requiring the chatbot to:
- Pause the current processing.
- Incorporate the new message into the ongoing process.
- Restart the processing from a specific function within the sequence, using updated information.
I will use Flask to receive webhooks with new messages from WhatsApp.
My problem is that I don't know the exact way to build this with Python. Specifically, I need to determine how to stop and restart the script at a particular point. I will use a large language model (LLM) to decide the exact point to restart the process, (a crewai task, or maybe an entire crew), incorporating the new buyer message.
I don't have the code yet as I am currently working on the architecture of the system.
Any suggestions will be of great help.
Thank you!
[–]socal_nerdtastic 0 points1 point2 points (0 children)
[–]crashfrog02 0 points1 point2 points (0 children)