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
When running the test Step04_AgentOrchestration, this is shown but tests passes:
Step04.Step04_AgentOrchestration.DelegatedGroupChatAsync
Source: Step04_AgentOrchestration.cs line 33
Duration: 1,4 sec
Standard Output:
USER: Hi
[00:00] USER: Hi
[00:00] ASSISTANT - Manager: Hello! How can I assist you today?
[00:01] ERROR: The type initializer for 'Step04.Steps.ManagerAgentStep' threw an exception. [KernelProcessError]
at Step04.Steps.ManagerAgentStep.IsRequestingUserInputAsync(Kernel kernel, ChatHistory history, ILogger logger) in ..\Microsoft\semantic-kernel\dotnet\samples\GettingStartedWithProcesses\Step04\Steps\ManagerAgentStep.cs:line 107
at Step04.Steps.ManagerAgentStep.InvokeAgentAsync(KernelProcessStepContext context, Kernel kernel, String userInput, ILogger logger) in ..\Microsoft\semantic-kernel\dotnet\samples\GettingStartedWithProcesses\Step04\Steps\ManagerAgentStep.cs:line 55
at Microsoft.SemanticKernel.KernelFunctionFromMethod.<>c.<<GetReturnValueMarshalerDelegate>b__25_1>d.MoveNext() in ..\Microsoft\semantic-kernel\dotnet\src\SemanticKernel.Core\Functions\KernelFunctionFromMethod.cs:line 852
--- End of stack trace from previous location ---
at Microsoft.SemanticKernel.KernelFunction.<>c__DisplayClass27_0.<<InvokeAsync>b__0>d.MoveNext() in ..\Microsoft\semantic-kernel\dotnet\src\SemanticKernel.Abstractions\Functions\KernelFunction.cs:line 247
--- End of stack trace from previous location ---
at Microsoft.SemanticKernel.Kernel.InvokeFilterOrFunctionAsync(NonNullCollection`1 functionFilters, Func`2 functionCallback, FunctionInvocationContext context, Int32 index) in ..\Microsoft\semantic-kernel\dotnet\src\SemanticKernel.Abstractions\Kernel.cs:line 344
at Microsoft.SemanticKernel.Kernel.OnFunctionInvocationAsync(KernelFunction function, KernelArguments arguments, FunctionResult functionResult, Boolean isStreaming, Func`2 functionCallback, CancellationToken cancellationToken) in ..\Microsoft\semantic-kernel\dotnet\src\SemanticKernel.Abstractions\Kernel.cs:line 319
at Microsoft.SemanticKernel.KernelFunction.InvokeAsync(Kernel kernel, KernelArguments arguments, CancellationToken cancellationToken) in ..\Microsoft\semantic-kernel\dotnet\src\SemanticKernel.Abstractions\Functions\KernelFunction.cs:line 244
at Microsoft.SemanticKernel.LocalStep.HandleMessageAsync(ProcessMessage message) in ..\Microsoft\semantic-kernel\dotnet\src\Experimental\Process.LocalRuntime\LocalStep.cs:line 213
--------------------------------------------------------------------------------
[00:01] USER: Hi
[00:01] ASSISTANT - Manager: Hello! How can I assist you today?
To Reproduce
Steps to reproduce the behavior:
Configure secrets with gpt-4o-mini
Run the test
See error
Expected behavior
A conversation between a Manager and a User takes place. The final sentences looks like:
[00:34] USER: That's all, thank you
[00:34] ASSISTANT - Manager: You're welcome! If you need anything else in the future, just let me know. Have a great day!
### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
1. Why is this change required?
2. What problem does it solve?
3. What scenario does it contribute to?
4. If it fixes an open issue, please link to the issue here.
-->
Enable sample execution for `GettingStartedWithProcesses` - `Step04`
Fixes: #11147
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Something change in our support for parsing JSON schema that results in
failure of the static initialization and blocking sample execution.
Switch to using `Type` for `ResponseFormat`.
### 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 😄
Describe the bug
When running the test Step04_AgentOrchestration, this is shown but tests passes:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A conversation between a Manager and a User takes place. The final sentences looks like:
Screenshots
Platform
Additional context
Managed to fix the issue, but need you to double check.
The root problem is at: https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/GettingStartedWithProcesses/Step04/Steps/ManagerAgentStep.cs line 107. It is trying to retrieve the 'ResponseFormat' for IntentResult from:
Looks like it is not working just return the type of IntentResult:
private static readonly Type s_intentResponseFormat = typeof(IntentResult);
As stated in Structured Outputs with System.Type.
Suggestion
Make the test fail if something weird happen:
In https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/GettingStartedWithProcesses/Step04/Steps/RenderMessageStep.cs, add an Assert.Fail() on RenderError Function:
Thanks,
The text was updated successfully, but these errors were encountered: