Hello everyone,
@victor3 your goal is to always call the function? If so, the OpenAI API has the function_call parameter, which serves precisely to force the AI to always call a specific function, regardless of the content of the prompt (More here).
I have no knowledge on LangChain, so I don’t know how this parameter is implemented or if it is implemented at all. Try doing a check.
Hope I don’t misunderstood your question.