OpenAi connector/ function calling

0
hello together,  Background: the old post: Mendix Community - Question Details I am currently working with the Support Assistant Starter app (https://marketplace.mendix.com/link/component/231035 ). The connection to the OpenAI API works flawlessly. Although testing with an open-source model like Mistral was also successful, but Mistral does not work within this assistant (Agent). With help of an expert I analyzed the issue: The APIs of OpenAI and Mistral are quite similar. However, Mistral seems to enforce stricter requirements regarding function calls. According to the analysis, the following three functions are missing the required "parameters" field: GetCurrentTicketDetails RetrieveMyOpenTickets RetrieveMyOpenTickets That means even though missing „parameter“ Oenai can also work, but Mistral not. When I disable these three functions in the microflow, the assistant is able to respond to general chat input. However, it cannot answer specific questions related to the disabled functions. In the Tools configuration, I have already set the parameters as "empty". In the sub-microflow, the parameters are not necessary. Could this be the cause of the issue? What modifications should I make to ensure compatibility with Mistral?   Thank you for your help! 
asked
1 answers
0

Hi Yuan,

 

it seems as Mistral is always expecting parameters for functions. The ones that cause the problem don't require any input, because they use the current user's context to find the relevant data.

 

I cannot give you the solution to solve the problem, but you can try debugging a little more by trying to find out how to send tools with empty input parameters to Mistral. For OpenAI, it is not a problem to have 0 inputs. If you know what to do, you might be able to manipulate the request before sending. 

 

Alternatively (not the perfect solution, but helpful to move on) add a dummy input parameter of type string which you don't use. For this, just edit the three function microflows and add a parameter. This at least makes the request compatible with Mistral.

 

I was not finding much information about this problem other than this reddit forum post where someone complained as well ("Even that only seems to work correctly with passing a single function definition with some parameters. Passing multiple functions or even passing a function definition without parameters seems to break the model.")

 

Good luck and best regards

Liam

answered