i have an idea but am not sure how to implement it. i have built a service booking platform and now want to automate the booking process using ai to make it easier for users
i am thinking of using the groq api since it is free with some limits which is fine for now. the system has three modules: tradesmen, services, and time slots. each tradesman has services representing their skills
the flow is when a user starts chatting with the bot it asks what service they need. the bot looks at the services we offer. i plan to create an api that returns all service names and pass them to the ai as a variable in the prompt. the main challenge is keeping context. after asking for the service the user describes the problem. the ai matches it with available services and then asks for preferred date and time
the main issue is storing this information. i want the selected service, date, and time saved so later when we ask if the user wants automatic booking or manual selection we already have the details
if the user chooses automatic booking i want to call an api with the collected data. if manual selection is chosen i want to redirect them to a page to pick a tradesman
i am confused about how to work with ai, how it should store and retrieve conversation data, where this data should live (ai context, backend session, or database), and how backend queries should be triggered based on what the ai understands
i also want to check tradesman
availability. i plan to create an api like getavailabletimeslots that checks if the tradesman is online, provides the requested service, and is not already booked at that time
if no tradesmen are available the ai should inform the user and suggest the next available time slots based on the api response
my main confusion is saving and retrieving information from the ai, running backend queries with it, and using the api responses to generate the correct message. i would really appreciate help with this thanks in advance