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

Merged
merged 2 commits into from
Jan 6, 2025

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?

@RogerBarreto RogerBarreto added this pull request to the merge queue Jan 6, 2025
Merged via the queue into microsoft:main with commit 81a230f Jan 6, 2025
17 checks passed
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: Sprint: Done
Development

Successfully merging this pull request may close these issues.

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