Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[C#] fix: failure to load prompt due to json serialization error (#2227)
## Linked issues closes: #minor (issue number) ## Details - Bumping `JsonSchema` to v6.1.2 so that it uses `Json.More.Net` version 2.x - Fixed a test failure in a previous PR (.net build was not run) #### Change details _Exception_ ``` Microsoft.Teams.AI.Exceptions.TeamsAIException: Error while loading prompt. Method not found: \u0027!!0 Json.More.JsonSerializerOptionsExtensions.Read(System.Text.Json.JsonSerializerOptions, System.Text.Json.Utf8JsonReader ByRef)\u0027.\r\n at Microsoft.Teams.AI.AI.Prompts.PromptManager._LoadPromptTemplateFromFile(String name)\r\n at Microsoft.Teams.AI.AI.Prompts.PromptManager.GetPrompt(String name)\r\n at Program.\u003C\u003Ec__DisplayClass0_1.\u003C\u003C\u003CMain\u003E$\u003Eb__14\u003Ed.MoveNext() in C:\\TFS\\Icertis.AI.M365Copilot\\Icertis.AI.M365Copilot.App\\Program.cs:line 148\r\n--- End of stack trace from previous location ---\r\n at Microsoft.Teams.AI.AI.Planners.ActionPlanner\u00601.ContinueTaskAsync(ITurnContext context, TState state, AI\u00601 ai, CancellationToken cancellationToken)\r\n at Microsoft.Teams.AI.AI.Planners.ActionPlanner\u00601.BeginTaskAsync(ITurnContext context, TState state, AI\u00601 ai, CancellationToken cancellationToken)\r\n at Microsoft.Teams.AI.AI.AI\u00601.RunAsync(ITurnContext turnContext, TState turnState, Nullable\u00601 startTime, Int32 stepCount, CancellationToken cancellationToken)\r\n at Microsoft.Teams.AI.Application\u00601._OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken)\r\n at Microsoft.Teams.AI.Application\u00601.OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken)\r\n at Microsoft.Teams.AI.Application.Authentication.Bot.FilteredTeamsSSOTokenExchangeMiddleware.OnTurnAsync(ITurnContext turnContext, NextDelegate next, CancellationToken cancellationToken)\r\n at Microsoft.Bot.Builder.MiddlewareSet.ReceiveActivityWithStatusAsync(ITurnContext turnContext, BotCallbackHandler callback, CancellationToken cancellationToken)\r\n at Microsoft.Bot.Builder.BotAdapter.RunPipelineAsync(ITurnContext turnContext, BotCallbackHandler callback, CancellationToken cancellationToken) ``` ## Attestation Checklist - [x] My code follows the style guidelines of this project - I have checked for/fixed spelling, linting, and other errors - I have commented my code for clarity - I have made corresponding changes to the documentation (updating the doc strings in the code is sufficient) - My changes generate no new warnings - I have added tests that validates my changes, and provides sufficient test coverage. I have tested with: - Local testing - E2E testing in Teams - New and existing unit tests pass locally with my changes
- Loading branch information