Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix unable to cast object of type 'System.Double' to type #183

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

MarkWard0110
Copy link
Contributor

Fix unable to cast exceptions thrown when using the following code from Semantic Kernel

            var ollamaSettings = new OllamaPromptExecutionSettings { NumPredict = 500, Temperature = 0.5f };
            ollamaSettings.ExtensionData = new Dictionary<string, object>
            {
                { "num_ctx", 4096 },
                { "min_p", 0f },
            };


            // Example 4. Invoke the kernel with a templated prompt and execution settings
            arguments = new(ollamaSettings) { { "topic", "dogs" } };          
            result = await kernel.InvokePromptAsync("Tell me a story about {{$topic}}", arguments);

@awaescher
Copy link
Owner

Merged, thanks Mark!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants