Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: updated ChatOutput component not working with streaming enabled #6747

Conversation

nicholas-johnson-techxcel
Copy link
Contributor

fix: updated ChatOutput component not working with streaming enabled (#6744)

fixes: 69df913

Updated to handle the forgotten Generator case for self.input_value (encountered when streaming is enabled).

Overhauled the chat.py under outputs to (mostly) pass strict type checking, something which could have prevented this bug.

Only this file has been changed. The only type errors in this file are in the safe_convert function and are due to problems in other files.

To prevent further problems in the future, the project should work towards enabling strict type checking permanently after fixing the vast number of type problems.

…angflow-ai#6744)

fixes: 69df913

Updated to handle the forgotten Generator case for self.input_value (encountered when streaming is enabled).

Overhauled the chat.py under outputs to (mostly) pass strict type checking, something which could have prevented this bug.

Only this file has been changed. The only type errors in this file are in the safe_convert function and are due to problems in other files.

To prevent further problems in the future, the project should work towards enabling strict type checking permanently after fixing the vast number of type problems.
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Feb 21, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Feb 21, 2025
Copy link
Collaborator

@edwinjosechittilappilly edwinjosechittilappilly left a comment

Choose a reason for hiding this comment

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

Good work! Thanks for the PR
Can we handle this without changing the previous function names?
Cause we have a follow up PR from @lucaseduoli for formatting.

@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Feb 21, 2025
@edwinjosechittilappilly
Copy link
Collaborator

@lucaseduoli we might need to update the templates after this PR!

@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Feb 21, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Feb 21, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Feb 21, 2025
@edwinjosechittilappilly
Copy link
Collaborator

Changes Made

Copy link
Collaborator

@edwinjosechittilappilly edwinjosechittilappilly left a comment

Choose a reason for hiding this comment

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

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 21, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Feb 21, 2025
Copy link
Collaborator

@lucaseduoli lucaseduoli left a comment

Choose a reason for hiding this comment

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

LGTM!

@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Feb 21, 2025
Copy link

codspeed-hq bot commented Feb 21, 2025

CodSpeed Performance Report

Merging #6747 will degrade performances by 27.6%

Comparing nicholas-johnson-techxcel:fix/chat-output-no-longer-working-with-streaming-enabled (ff4ff9c) with main (4ef4c93)

Summary

⚡ 1 improvements
❌ 1 regressions
✅ 12 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
test_build_flow_invalid_job_id 12.5 ms 17.3 ms -27.6%
test_successful_run_with_output_type_any 24,786.4 ms 133.3 ms ×190

@ogabrielluiz ogabrielluiz added lgtm This PR has been approved by a maintainer and removed lgtm This PR has been approved by a maintainer labels Feb 21, 2025
@ogabrielluiz ogabrielluiz changed the title fix: updated ChatOutput component not working with streaming enabled (#6744) fix: updated ChatOutput component not working with streaming enabled Feb 21, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Feb 21, 2025
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Feb 21, 2025
@edwinjosechittilappilly edwinjosechittilappilly added this pull request to the merge queue Feb 21, 2025
Merged via the queue into langflow-ai:main with commit e82c218 Feb 21, 2025
36 checks passed
tianzhipeng-git pushed a commit to tianzhipeng-git/langflow that referenced this pull request Feb 22, 2025
…angflow-ai#6747)

* fix: updated ChatOutput component not working with streaming enabled (langflow-ai#6744)

fixes: 69df913

Updated to handle the forgotten Generator case for self.input_value (encountered when streaming is enabled).

Overhauled the chat.py under outputs to (mostly) pass strict type checking, something which could have prevented this bug.

Only this file has been changed. The only type errors in this file are in the safe_convert function and are due to problems in other files.

To prevent further problems in the future, the project should work towards enabling strict type checking permanently after fixing the vast number of type problems.

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* update templates and make sure they support streaming without making breaking chnages

* update templates

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chat Output has an error when used with an LLM with streaming enabled
4 participants