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

cap streaming chunk size #1802

Merged
merged 1 commit into from
Jan 10, 2025
Merged

Conversation

emrgnt-cmplxty
Copy link
Contributor

@emrgnt-cmplxty emrgnt-cmplxty commented Jan 10, 2025

Important

Cap streaming chunk size to 1024 bytes in rag_app() and agent_app() in retrieval_router.py and fix formatting in management_service.py.

  • Behavior:
    • Cap streaming chunk size to 1024 bytes in stream_generator() in rag_app() and agent_app() in retrieval_router.py.
  • Misc:
    • Fix formatting issue in management_service.py by removing an extra newline.

This description was created by Ellipsis for 4cbaaad. It will automatically update as commits are pushed.

@emrgnt-cmplxty emrgnt-cmplxty marked this pull request as ready for review January 10, 2025 19:59
@emrgnt-cmplxty emrgnt-cmplxty merged commit c3c455e into main Jan 10, 2025
2 of 3 checks passed
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 4cbaaad in 21 seconds

More details
  • Looked at 51 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. py/core/main/api/v3/retrieval_router.py:444
  • Draft comment:
    Consider defining the chunk size as a constant at the top of the file for better maintainability and readability.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code changes in the PR are straightforward and involve capping the chunk size to 1024 bytes in two places. This is a good practice to prevent large data chunks from being processed at once, which can help with memory management and network efficiency.
2. py/core/main/api/v3/retrieval_router.py:674
  • Draft comment:
    Consider refactoring the chunk size capping logic into a separate function to avoid code duplication.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The same chunk size capping logic is repeated in two places. It would be better to refactor this into a separate function to avoid code duplication and improve maintainability.

Workflow ID: wflow_HgAagqIbk9TRUoyK


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

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.

1 participant