Exploring AI Fine-Tuning for App Function Invocation: Feasibility and Approach

Hello, I am currently fine-tuning an AI model, and I have a question. If a user makes a request, would it be possible to train the AI to call a built-in function of an app or web environment? I’m trying this now, and I’m curious if there are any cases or research related to this. For example, if the app has a built-in function called open(), and a client types “I want to open the door” in a chatbot or prompt, the app would pass this information to the fine-tuned AI via an API. The AI would then respond by including open() in its response. My goal is for the app to recognize this response and execute the open() function. Would this be possible?