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

.Net: Add JsonNumberHandling Attribute to Execution Settings in Ollama, ONNX, and Other Connectors #10055

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

shethaadit
Copy link
Contributor

@shethaadit shethaadit commented Jan 3, 2025

Motivation and Context

This PR addresses a deserialization issue in the Ollama and ONNX connectors where execution settings fail to handle non-string properties (e.g., "temperature") during JSON parsing.

Description

Impact:

  • Ensures compatibility with templates containing non-string numeric properties.
  • Aligns behavior with OpenAIPromptExecutionSettings, which already includes the necessary attribute.

Contribution Checklist

@shethaadit shethaadit requested a review from a team as a code owner January 3, 2025 17:22
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel labels Jan 3, 2025
@github-actions github-actions bot changed the title Add JsonNumberHandling Attribute to Execution Settings in Ollama, ONNX, and Other Connectors .Net: Add JsonNumberHandling Attribute to Execution Settings in Ollama, ONNX, and Other Connectors Jan 3, 2025
@RogerBarreto
Copy link
Member

Thanks for contribution!

@shethaadit Please add some UnitTests ensuring this works as expected. Thanks!!

@shethaadit
Copy link
Contributor Author

Hi @RogerBarreto, can we take unit test changes in next PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code
Projects
Status: Community PRs
Development

Successfully merging this pull request may close these issues.

.Net: Bug: JsonException using the Ollama and Onnx connectors
3 participants