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: FunctionCallingStepwisePlannerTests.DoesNotThrowWhenPluginFunctionThrowsNonCriticalExceptionAsync is failing #4534

Closed
markwallace-microsoft opened this issue Jan 9, 2024 · 0 comments · Fixed by #4542
Assignees
Labels
bug Something isn't working .NET Issue or Pull requests regarding .NET code

Comments

@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Jan 9, 2024

Describe the bug
The FunctionCallingStepwisePlannerTests.DoesNotThrowWhenPluginFunctionThrowsNonCriticalExceptionAsync integration tests is failingwith this errorSystem.InvalidProgramException : Common Language Runtime detected an invalid program.`.

I am using Planners:OpenAI:ModelId = gpt-3.5-turbo-1106

To Reproduce
Steps to reproduce the behavior:

  1. Enable and run the integration test

Expected behavior
All tests must pass.

Platform

  • OS: Windows
  • IDE: Visual Studio
  • Language: C#
  • Source: Latest code from main
@shawncal shawncal added .NET Issue or Pull requests regarding .NET code triage labels Jan 9, 2024
@github-actions github-actions bot changed the title FunctionCallingStepwisePlannerTests.DoesNotThrowWhenPluginFunctionThrowsNonCriticalExceptionAsync is failing .Net: FunctionCallingStepwisePlannerTests.DoesNotThrowWhenPluginFunctionThrowsNonCriticalExceptionAsync is failing Jan 9, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 9, 2024
### Motivation and Context

PR's cannot be merged

### Description

See #4534

### Contribution Checklist

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
@gitri-ms gitri-ms self-assigned this Jan 9, 2024
@matthewbolanos matthewbolanos added bug Something isn't working and removed triage labels Jan 9, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 11, 2024
…nPluginFunctionThrowsNonCriticalExceptionAsync is failing (#4542)

### 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.
-->
Fix for failing integration test (resolves #4534)

When using certain OpenAI models such as `gpt-3.5-turbo-1106`, the model
would sometimes opt to call `GetEmailAddressAsync` when it wasn't
actually needed. This was causing a critical exception to be thrown
(which was by design for a different test case, but in this case was
being called unexpectedly and causing the test to fail.)

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
This change modifies the test scenarios to minimize the possibility of a
critical exception being thrown by mistake. Now `WriteJokeAsync` throws
the critical exception, so the other test cases (that involve
writing/emailing poems) should not encounter it.

### 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 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working .NET Issue or Pull requests regarding .NET code
Projects
Archived in project
4 participants