Closed
Description
Describe the bug
System.InvalidCastException: 'Unable to cast object of type 'System.Double' to type 'System.Nullable`1[System.Int32]'.' when using OllamaPromptExecutionSettings with GetChatMessageContentsAsync
To Reproduce
Steps to reproduce the behavior:
- create an instance of OllamaPromptExecutionSettings and set the Temperature and NumPredict properties.
- Execute var chatResponse = await chatCompletionService.GetChatMessageContentsAsync(ChatHistory,settings);
- Error is thrown
Expected behavior
Response from local LLM.
Screenshots
N/A
Platform
- Language: C#
- Source: Ollama connector: NuGet 1.35.0-alpha, SK: NuGet: 1.35.0
- AI model: Ollama local
- IDE: Visual Studio
- OS: Windows
Additional context
If I remove the settings parameter from the GetchatMessageContentsAsync I get a valid response from the LLM.