I’m using ai to take an input from a user then based on the users input the ai will decide on what function to call. I’m using Microsoft semantic kernel, function calling method to do this. Foreach function I have parameters that need to be filled in. Example I have function to create a Message, the parameters are recipient email, subject and content of the email, with the subject being optional. When I don’t provide the subject the ai completes and fills in the subject for me. I have tried to prompting the ai not to do this however it just keeps proving data and text that I haven’t stated for it to. How can I fix this ?
[KernelFunction,
Description("Send an email")]
public async Task<bool> SendMessage([Description("Email address")] EmailAddress EmailAddress, [Description("Content of the email")] string Content, [Description("Subject of email")] string? Subject)
{
var newMssage = new Services.Mailbox.Message()
{
RecipientEmailAddress = EmailAddress, Read = false,
Content = Content,
Subject = Subject ,
};
var response = await MessageService.Save(User.Identity, newMssage);
return response;
}
Also im using ChatGpt-4 for the text model