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

Feature/centralized limit calc and chunk limits #1782

Merged

Conversation

emrgnt-cmplxty
Copy link
Contributor

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

Important

Centralized limit calculation and updated chunk limits, with changes to user metadata handling and rate limit checks across multiple files.

  • Behavior:
    • Added metadata field to user update in users.ts and users_router.py.
    • Removed patchMetadata method in users.ts.
    • Updated chunk limit from 100,000 to 10,000 in llms.txt and r2r.toml.
    • Changed base model in r2r_azure.toml from openai to azure.
  • Rate Limiting:
    • Centralized limit calculation in limits.py with determine_effective_limits().
    • Added route-specific monthly request counting in limits.py.
    • Updated check_limits() to use new limit calculation logic.
  • Testing:
    • Added tests for route-specific and user-specific limit overrides in test_limits.py.
    • Added tests for isolated route usage and monthly usage tracking in test_limits.py.
  • Misc:
    • Updated version to 3.3.25 in pyproject.toml.

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

@emrgnt-cmplxty emrgnt-cmplxty marked this pull request as ready for review January 8, 2025 20:52
@emrgnt-cmplxty emrgnt-cmplxty merged commit eb2fa2a into main Jan 8, 2025
3 of 4 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 465b155 in 1 minute and 25 seconds

More details
  • Looked at 1788 lines of code in 11 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. py/core/pipes/ingestion/vector_storage_pipe.py:85
  • Draft comment:
    The count variable should be reset after each batch is processed to ensure correct limit checks. Consider moving count = 0 inside the loop or resetting it after processing each batch.
  • Reason this comment was not posted:
    Comment was not on a valid diff hunk.
2. py/core/main/api/v3/users_router.py:1446
  • Draft comment:
    Add metadata to the docstring to document its purpose and usage.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The metadata parameter is added to the update_user function but is not documented in the docstring. This can lead to confusion for developers using this function.
3. py/sdk/v3/users.py:357
  • Draft comment:
    Add metadata to the docstring to document its purpose and usage.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The metadata parameter is added to the update function but is not documented in the docstring. This can lead to confusion for developers using this function.

Workflow ID: wflow_h6tOHVD9Fl2pCZm0


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