You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Microsoft Graph's drive item content endpoint /drive/root/children/{driveItem-id}/content fails to generate a function in Semantic Kernel due to default serialization setting of depth of 64.
To Reproduce
It is easier to reproduce the error with API Manifest plugins due to availability of slicing. It uses OpenAPI path for function generation, so I built the repro on top of #4961, diff is here
Steps:
gh repo clone zengin/semantic-kernel
git checkout zengin/json-depth-test
cd semantic-kernel/dotnet/samples/KernelSyntaxExamples
dotnet test --filter Example80_ApiManifest --logger "console;verbosity=detailed"
Observe the following error:
Error Message:
System.AggregateException : Plugin creation failed for DriveItemPlugin (The maximum configured depth of 64 has been exceeded. Cannot read next JSON object. Path: $ | LineNumber: 10780 | BytePositionInLine: 134.)
---- System.Text.Json.JsonException : The maximum configured depth of 64 has been exceeded. Cannot read next JSON object. Path: $ | LineNumber: 10780 | BytePositionInLine: 134.
-------- System.Text.Json.JsonReaderException : The maximum configured depth of 64 has been exceeded. Cannot read next JSON object. LineNumber: 10780 | BytePositionInLine: 134.
Expected behavior
A plugin function is generated for drive item content endpoint
github-actionsbot
changed the title
OpenApi function generation hits JSON serialization error for deep structures
.Net: OpenApi function generation hits JSON serialization error for deep structures
Feb 13, 2024
### Motivation and Context
-fixes#4991
### Description
- Sets the serialization depth to 128
- Changes can be tested on the branch linked in the issue description.
### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
### Motivation and Context
These examples were previously blocked by issue #4991
### Description
- Adds three more API Manifest plugin examples.
### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
Describe the bug
Microsoft Graph's drive item content endpoint
/drive/root/children/{driveItem-id}/content
fails to generate a function in Semantic Kernel due to default serialization setting of depth of 64.To Reproduce
It is easier to reproduce the error with API Manifest plugins due to availability of slicing. It uses OpenAPI path for function generation, so I built the repro on top of #4961, diff is here
Steps:
gh repo clone zengin/semantic-kernel
git checkout zengin/json-depth-test
cd semantic-kernel/dotnet/samples/KernelSyntaxExamples
dotnet test --filter Example80_ApiManifest --logger "console;verbosity=detailed"
Expected behavior
A plugin function is generated for drive item content endpoint
Additional context
Solution here
The text was updated successfully, but these errors were encountered: