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

feat: Improve user credit calculation in get_user_credits #3367

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

StanGirard
Copy link
Collaborator

Refactor the get_user_credits method in the Users class to improve the calculation of monthly chat credits for a user. This change ensures that the user's monthly chat credit is correctly deducted based on their usage. If no user settings or monthly chat credit is found, a default value of 25 is returned.

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Checklist before requesting a review

Please delete options that are not relevant.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented hard-to-understand areas
  • I have ideally added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Screenshots (if appropriate):

Refactor the get_user_credits method in the Users class to improve the calculation of monthly chat credits for a user. This change ensures that the user's monthly chat credit is correctly deducted based on their usage. If no user settings or monthly chat credit is found, a default value of 25 is returned.
Copy link

vercel bot commented Oct 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
quivrapp 🔄 Building (Inspect) Visit Preview 💬 Add feedback Oct 14, 2024 1:49pm

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. area: backend Related to backend functionality or under the /backend directory labels Oct 14, 2024
@StanGirard StanGirard merged commit 5fc349c into main Oct 14, 2024
7 of 9 checks passed
@StanGirard StanGirard deleted the feat/credits-increased branch October 14, 2024 13:53
StanGirard added a commit that referenced this pull request Oct 16, 2024
🤖 I have created a release *beep* *boop*
---


## 0.0.322 (2024-10-15)

## What's Changed
* feat: Add new documentation files by @StanGirard in
#3351
* fix: separate english and french ingredients by @chloedia in
#3358
* docs(core): init by @StanGirard in
#3365
* docs: quivr core storage by @AmineDiro in
#3366
* fix: fixing pdf parsing by @jacopo-chevallard in
#3349
* feat: Improve user credit calculation in get_user_credits by
@StanGirard in #3367
* fix unwanted parsing effect by @chloedia in
#3371
* add fallback on llamaparse by @chloedia in
#3374


**Full Changelog**:
v0.0.321...v0.0.322

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: backend Related to backend functionality or under the /backend directory size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant