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/fix app config loadout #1804

Merged
merged 2 commits into from
Jan 10, 2025
Merged

Conversation

emrgnt-cmplxty
Copy link
Contributor

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

Important

Refactor configuration loading by introducing InnerConfig and updating AppConfig inheritance, with changes to default values in r2r.toml.

  • Configuration Refactoring:
    • Introduce InnerConfig class in base.py as a base for provider configurations.
    • AppConfig now inherits from InnerConfig, replacing R2RSerializable.
    • Remove create() method from AppConfig and use InnerConfig.create() instead.
  • Behavior Changes:
    • Update R2RConfig in config.py to use AppConfig.create() for instantiation.
  • Default Values Update:
    • Change default values in r2r.toml for default_max_documents_per_user, default_max_chunks_per_user, and default_max_collections_per_user.

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

@emrgnt-cmplxty emrgnt-cmplxty marked this pull request as ready for review January 10, 2025 22:29
@emrgnt-cmplxty emrgnt-cmplxty merged commit 8be9af4 into main Jan 10, 2025
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 660b91d in 1 minute and 53 seconds

More details
  • Looked at 79 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. py/core/base/providers/base.py:17
  • Draft comment:
    model_fields is not a valid attribute for Pydantic models. Use __fields__.keys() instead.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    This is a case where the automated tool is giving outdated advice. Pydantic v2 introduced model_fields as the new way to access model fields, replacing the older __fields__ attribute. The code is actually using the newer, correct approach. The comment would make the code worse by suggesting a change to an outdated API.
    I could be wrong about which version of Pydantic is being used in this codebase. There might be a reason they need to maintain v1 compatibility.
    Even if they are using Pydantic v1, suggesting to change working code to use a deprecated API would be counterproductive. The current code is future-proof.
    The comment should be deleted as it suggests changing correct, forward-compatible code to use a deprecated API.
2. py/core/base/providers/base.py:16
  • Draft comment:
    model_fields is not a valid attribute for Pydantic models. Use __fields__.keys() instead.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_FSkIRWgwB1WW8A4E


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