-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.Net: Add JsonElement String to Primitive Implicit Conversion Support…
… (SLM Function Calling) (#9784) ### Motivation and Context In the original logic the conversion was giving priority for existence of converters when the parameter value was a JsonElement/JsonDocument/JsonNode, this change checks if the argument is one of those types first and use the proper JSON conversion. This change also bring some resiliency when the `JsonElement` provided is a `string` for primitive types like `boolean` and C# numeric types. This change improves function calling experience when using local models that send JSON string argument values ("1" or "true") instead of the expected JSON type (1, true) for calling functions. i.e: `Llama 3.1, Llama 3.2` Added Unit Tests covering the added JsonElement arguments support. - Fixes #9711 - Extra (Remove of Warning for ONNX connectors SYSLIB1222) --------- Co-authored-by: Dmytro Struk <[email protected]>
- Loading branch information
1 parent
4113a10
commit ef8251c
Showing
3 changed files
with
105 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters