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: Add a request index to the streamed function call update content #10129

Merged
merged 11 commits into from
Jan 14, 2025

Conversation

SergeyMenshykh
Copy link
Member

@SergeyMenshykh SergeyMenshykh commented Jan 8, 2025

Motivation and Context:

Today, it's impossible to determine which request a streaming function call update belongs to or originates from. As a result, if an AI service interaction leads to multiple requests to an AI model - let's say one per function call - it's impossible to assemble the function call contents from the streamed updates. This is because the streaming function call updates from the second request override those from the first one.

Description

This PR adds the RequestIndex to the StreamingFunctionCallUpdateContent class and updates the {Azure}OpenAI connectors to set it. Finally, it updates the FunctionCallContentBuilder class to construct a composite index from RequestIndex and FunctionCallIndex and uses it to uniquely identify the function call content updates across requests.

Closes: #10006

@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel kernel.core labels Jan 8, 2025
@SergeyMenshykh SergeyMenshykh changed the title .Net: Add a request index to the streamed chat message content .Net: Add a request index to the streamed function call update content Jan 13, 2025
@SergeyMenshykh SergeyMenshykh marked this pull request as ready for review January 13, 2025 19:36
@SergeyMenshykh SergeyMenshykh requested a review from a team as a code owner January 13, 2025 19:36
@SergeyMenshykh SergeyMenshykh added this pull request to the merge queue Jan 14, 2025
Merged via the queue into microsoft:main with commit d06d230 Jan 14, 2025
17 checks passed
@SergeyMenshykh SergeyMenshykh deleted the add-request-index branch January 14, 2025 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
function_calling kernel.core kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Python: add request index to streaming chat message content to track invocation count
3 participants