Skip to content

.Net Updating OpenAI/AzureOpenAI ModelResults to be per Choice#2214

Merged
shawncal merged 6 commits intomicrosoft:mainfrom
rogerbarreto:features/issue-modelresult-per-choice
Jul 31, 2023
Merged

.Net Updating OpenAI/AzureOpenAI ModelResults to be per Choice#2214
shawncal merged 6 commits intomicrosoft:mainfrom
rogerbarreto:features/issue-modelresult-per-choice

Conversation

@rogerbarreto
Copy link
Member

Motivation and Context

Prior to this change, when using the ModelResult in a multiple results scenario the choices were being repeated for each ModelResult object, not being clear which Choice was related to the Result.

Resolves #1658
Closes #1658

Description

Added two new representations for both ChatResult and TextResult that has one to one reference to the choice details coming from the LLM.

Updated GetModelResult example with the expected behavior and an easier example to track the changes and different prompts.

Contribution Checklist

@rogerbarreto rogerbarreto added PR: ready for review All feedback addressed, ready for reviews .NET Issue or Pull requests regarding .NET code extensibility kernel Issues or pull requests impacting the core kernel labels Jul 28, 2023
@rogerbarreto rogerbarreto self-assigned this Jul 28, 2023
@rogerbarreto rogerbarreto requested a review from a team as a code owner July 28, 2023 10:53
dmytrostruk
dmytrostruk previously approved these changes Jul 28, 2023
@shawncal shawncal added this pull request to the merge queue Jul 31, 2023
Merged via the queue into microsoft:main with commit 238ee0a Jul 31, 2023
SOE-YoungS pushed a commit to SOE-YoungS/semantic-kernel that referenced this pull request Nov 1, 2023
…soft#2214)

### Motivation and Context

Prior to this change, when using the ModelResult in a multiple results
scenario the choices were being repeated for each ModelResult object,
not being clear which Choice was related to the Result.

Resolves microsoft#1658
Closes microsoft#1658

### Description

Added two new representations for both `ChatResult` and `TextResult`
that has one to one reference to the `choice` details coming from the
LLM.

Updated GetModelResult example with the expected behavior and an easier
example to track the changes and different prompts.

### Contribution Checklist

- [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 😄
@rogerbarreto rogerbarreto deleted the features/issue-modelresult-per-choice branch December 5, 2023 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code PR: ready for review All feedback addressed, ready for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple responses that don't need to be parsed

3 participants