fix: Performance optimizations and value error when streaming in langfuse #798
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issues
Proposed Changes:
How did you test it?
** Manual tests: **
*** Enforce flush disabled ***
*** Enforce flush enabled ***
![Bildschirmfoto 2024-06-10 um 12 53 29](https://private-user-images.githubusercontent.com/18450828/338155103-8864f44c-1991-4a68-913e-c8c5c76c6c7e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE1NTI4NTUsIm5iZiI6MTcyMTU1MjU1NSwicGF0aCI6Ii8xODQ1MDgyOC8zMzgxNTUxMDMtODg2NGY0NGMtMTk5MS00YTY4LTkxM2UtYzhjNWM3NmM2YzdlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIxVDA5MDIzNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg2MWRiOGIxMzlmZDAzNjcyZTI2ZjdiZWIwYjkyY2ViMGIxMWRlMWNjY2VjYzc4MGRhMDZlZjYwZDMyZTdhZWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._friiEUKPZc_iELk_I5eo-gVy5T00P8097ePMPX2QMw)
Notes for the reviewer
Notice the 4s to 40ms difference between the two settings. I think it is crucial to enable the user the option to flush the data lazy.
Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.