Semantic Kernel version 1.18.0-rc puts Tool information even if the configuration says not to (OpenAIPromptExecutionSettings settings = new() { ToolCallBehavior = null };).
At https://github.com/microsoft/semantic-kernel/blob/dotnet-1.18.0/dotnet/src/Connectors/Connectors.OpenAI/Core/ClientCore.ChatCompletion.cs
Line 1137
private ToolCallingConfig GetToolCallingConfiguration(Kernel? kernel, OpenAIPromptExecutionSettings executionSettings, int requestIndex)
{
if (executionSettings.ToolCallBehavior is null)
{
return new ToolCallingConfig(Tools: [s_nonInvocableFunctionTool], Choice: ChatToolChoice.None, AutoInvoke: false);
}
....
}
With that new ToolCallingConfig, NonInvocableFunctionTool it will create a object inside json file, so when the request is called upon ollama phi3 it will always try to parse and execute the tool property. Phi3 does not support tools so it fails.
Use Microsoft.SemanticKernel version 1.17.1 instead.
Already addressed the issue: https://github.com/microsoft/semantic-kernel/issues/8165