Skip to content

.Net Agents - Fix function result handling #6927

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

Merged
merged 3 commits into from
Jun 24, 2024

Conversation

crickman
Copy link
Contributor

Motivation and Context

Empty function-result (tool_output) passed to assistant api.

Description

Change to utilize FunctionResultContent altered existing type assumption. Instead of handling a FunctionResult, only the FunctionResult.Value is now captured.

Also updated sample method naming (opportunistic)

Contribution Checklist

@crickman crickman added PR: ready for review All feedback addressed, ready for reviews .NET Issue or Pull requests regarding .NET code agents labels Jun 24, 2024
@crickman crickman self-assigned this Jun 24, 2024
@crickman crickman requested a review from a team as a code owner June 24, 2024 15:34
@crickman crickman added experimental Associated with an experimental feature function_calling labels Jun 24, 2024
@crickman crickman added this pull request to the merge queue Jun 24, 2024
Merged via the queue into main with commit ad8c819 Jun 24, 2024
15 checks passed
@crickman crickman deleted the fix_agent_assistant_functionresult branch June 24, 2024 21:15
@crickman crickman added bug Something isn't working and removed PR: ready for review All feedback addressed, ready for reviews labels Jun 24, 2024
LudoCorporateShark pushed a commit to LudoCorporateShark/semantic-kernel that referenced this pull request Aug 25, 2024
### 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.
-->

Empty function-result (`tool_output`) passed to assistant api.

### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

Change to utilize `FunctionResultContent` altered existing type
assumption. Instead of handling a `FunctionResult`, only the
`FunctionResult.Value` is now captured.

Also updated sample method naming (opportunistic)

### 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
agents bug Something isn't working experimental Associated with an experimental feature function_calling .NET Issue or Pull requests regarding .NET code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

.Net Agents - OpenAIAssistant function calling / tools not capturing function return value
3 participants