You can tell the model to call the function, or if that’s the ONLY thing the model should do, then you can force it to call the function as the only thing it CAN do. Both ChatOpenAi and ChatAnthropic support a “tool_choice” where you can force the model.
However, I suspect that’s not what you want. Instead, don’t even have the model call the function. (It’s extra work, token usage, and delay.) If it’s in a Phoenix application, you know who the user is already, so use a PromptTemplate and load the user’s name into the system or user message yourself.