Skip to content

.Net Bug: IChatCompletionService produces StreamingChatMessageContent without role assignment #6952

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

Closed
crickman opened this issue Jun 25, 2024 · 0 comments · Fixed by #6957
Closed
Assignees
Labels
bug Something isn't working kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community) triage

Comments

@crickman
Copy link
Contributor

crickman commented Jun 25, 2024

Describe the bug
AuthorRole is not assigned to each and every StreamingChatMessageContent produced

To Reproduce
Steps to reproduce the behavior:

  1. Open concepts sample OpenAI_ChatCompletionStreaming.StreamTextContentAsync
  2. Set breakpoint on Console.Write(chatUpdate.Content);
  3. Run sample
  4. Examine: chatUpdate.Role

Expected behavior
Message has Role property assigned to each StreamingChatMessageContent instance (similiar to ModelId and other properties)

Platform

  • Language: C#
  • Source: Main
@crickman crickman added .NET Issue or Pull requests regarding .NET code bug Something isn't working kernel Issues or pull requests impacting the core kernel triage labels Jun 25, 2024
@crickman crickman self-assigned this Jun 25, 2024
@crickman crickman moved this to Sprint: In Progress in Semantic Kernel Jun 25, 2024
@crickman crickman added the sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community) label Jun 25, 2024
@crickman crickman linked a pull request Jun 25, 2024 that will close this issue
4 tasks
@crickman crickman linked a pull request Jun 25, 2024 that will close this issue
4 tasks
@crickman crickman moved this from Sprint: In Progress to Sprint: In Review in Semantic Kernel Jun 25, 2024
github-merge-queue bot pushed a commit that referenced this issue Jun 25, 2024
…nt (#6957)

### 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.
-->

`StreamingChatMessageContent.AuthorRole` always `null`

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

Logic already exists to capture role, but it was not being passed to
each and every instance of StreamingChatMessageContent. Other
properties, such as `ModelId` are included with each and every instance.

Updated integration test.

Issue: #6952

### 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 😄
@github-project-automation github-project-automation bot moved this from Sprint: In Review to Sprint: Done in Semantic Kernel Jun 25, 2024
LudoCorporateShark pushed a commit to LudoCorporateShark/semantic-kernel that referenced this issue Aug 25, 2024
…nt (microsoft#6957)

### 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.
-->

`StreamingChatMessageContent.AuthorRole` always `null`

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

Logic already exists to capture role, but it was not being passed to
each and every instance of StreamingChatMessageContent. Other
properties, such as `ModelId` are included with each and every instance.

Updated integration test.

Issue: microsoft#6952

### 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 kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community) triage
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant