Skip to content

fix: only record db content if it is the last chunk in stream #1091

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 2 commits into from
Feb 19, 2025
Merged

Conversation

yrobla
Copy link
Contributor

@yrobla yrobla commented Feb 18, 2025

For copilot chat, we are actually receiving multiple streams, and we were recording entries and alerts for each one, repeating those. So detect if we are in the last chunk and propagate it to the pipeline, so we can record it only in this case, avoiding dupes. In the case of other providers, we only receive one request, so always force saving it

Closes: #936

For copilot chat, we are actually receiving multiple streams, and
we were recording entries and alerts for each one, repeating those.
So detect if we are in the last chunk and propagate it to the
pipeline, so we can record it only in this case, avoiding dupes.
In the case of other providers, we only receive one request, so
always force saving it

Closes: #936
@yrobla yrobla requested review from aponcedeleonch, jhrozek and JAORMX and removed request for aponcedeleonch and jhrozek February 18, 2025 14:56
Copy link
Contributor

@aponcedeleonch aponcedeleonch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@yrobla yrobla merged commit b23effd into main Feb 19, 2025
11 checks passed
@yrobla yrobla deleted the issue-936 branch February 19, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Server-sent events fired 1000s times per conversation
2 participants