Ai chatbot for lms

I’m seeking guidance on planning an AI-driven Learning Management System (LMS) for a government initiative in Sindh, Pakistan, which aims to provide online web development courses to 500,000 students. My goal is to integrate AI capabilities into the LMS, specifically for resolving coding queries and acting as a personal AI mentor. Can you provide insights into the estimated cost of implementing such AI features for a student base of this size? I’ve explored OpenAI’s API but found it costly. I’m looking for more cost-effective solutions.