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

Python: Streaming chat completion is missing the chunks for function calls #6276

Closed
matthewbolanos opened this issue May 15, 2024 · 0 comments · Fixed by #5681
Closed

Python: Streaming chat completion is missing the chunks for function calls #6276

matthewbolanos opened this issue May 15, 2024 · 0 comments · Fixed by #5681
Assignees
Labels
python Pull requests for the Python Semantic Kernel

Comments

@matthewbolanos
Copy link
Member

In .NET, when you run the stream the chat completion, the stream also includes chunks for when the model is sending over the details of the function call.

Notice how in the variables for .NET, the StreamingChatMessageContent has null content, and instead, has a ToolCallUpdate

image
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code python Pull requests for the Python Semantic Kernel triage labels May 15, 2024
@github-actions github-actions bot changed the title Python: Streaming chat completion is missing the chunks for function calls .Net: Python: Streaming chat completion is missing the chunks for function calls May 15, 2024
@github-actions github-actions bot changed the title .Net: Python: Streaming chat completion is missing the chunks for function calls Python: Streaming chat completion is missing the chunks for function calls May 15, 2024
@moonbox3 moonbox3 removed .NET Issue or Pull requests regarding .NET code triage labels May 17, 2024
github-merge-queue bot pushed a commit that referenced this issue May 17, 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.
-->
This pull request includes significant changes across multiple files,
mainly related to the addition of hooks and the modification of function
invocations in the `semantic_kernel` module. The changes also include
the addition of a new sample and a YAML file, and modifications to the
`__init__.py` files.

Removals:

*
[`python/semantic_kernel/events`](diffhunk://#diff-ebda9504832b19ab83239a92c9a6d5f8c744deff9fef86071c13956ec92bb010L1-L11):
Removed the previously used events.

New Exceptions:

*
[`python/semantic_kernel/exceptions/kernel_exceptions.py`](diffhunk://#diff-450aaa5595a8b22cd6ee212eb79b7d6b0d4e9c1072063ef32018a3e7d3fdf21dR41-R48):
Added new exception classes `OperationCancelledException` and
`HookInvalidSignatureError`.
[[1]](diffhunk://#diff-450aaa5595a8b22cd6ee212eb79b7d6b0d4e9c1072063ef32018a3e7d3fdf21dR41-R48)
[[2]](diffhunk://#diff-450aaa5595a8b22cd6ee212eb79b7d6b0d4e9c1072063ef32018a3e7d3fdf21dR57-R58)

Fixes: #3038 
Fixes: #6276

### 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
- [ ] I didn't break anyone 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests for the Python Semantic Kernel
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants