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: 🎸 source documents #1598

Merged
merged 1 commit into from
Nov 6, 2023
Merged

feat: 🎸 source documents #1598

merged 1 commit into from
Nov 6, 2023

Conversation

StanGirard
Copy link
Collaborator

are kept only once

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):

are kept only once
@dosubot dosubot bot added the area: backend Related to backend functionality or under the /backend directory label Nov 6, 2023
Copy link

vercel bot commented Nov 6, 2023

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

Name Status Preview Updated (UTC)
docs 🔄 Building (Inspect) Visit Preview Nov 6, 2023 4:19pm
quivr-strapi 🔄 Building (Inspect) Visit Preview Nov 6, 2023 4:19pm
quivrapp 🔄 Building (Inspect) Visit Preview Nov 6, 2023 4:19pm

@StanGirard StanGirard merged commit 1d3554c into main Nov 6, 2023
5 of 9 checks passed
Copy link
Contributor

github-actions bot commented Nov 6, 2023

Risk Level 2 - /home/runner/work/quivr/quivr/backend/llm/qa_base.py

The code changes in this pull request are relatively safe, with a risk score of 2. The changes involve deduplication of source documents, which is a good practice to avoid redundancy. However, there are a few areas that could be improved for better code quality and maintainability:

  1. Error Handling: The code uses a broad Exception in several places for error handling. This is generally not a good practice as it can make debugging difficult. It's better to catch specific exceptions that you expect might be raised in the try block. For example, instead of:

    try:
        # some code
    except Exception as e:
        logger.error(\"Error during streaming tokens: %s\", e)

    You could use:

    try:
        # some code
    except (SpecificException1, SpecificException2) as e:
        logger.error(\"Error during streaming tokens: %s\", e)
  2. Code Comments: The code could benefit from more comments explaining the purpose of the functions and the logic behind certain operations. This would make the code easier to understand and maintain.

  3. Use of Magic Strings: The code contains magic strings (strings that are directly used in the code). It's better to define these strings as constants at the top of your file or in a separate configuration file. For example, instead of using 'Unnamed Document' directly in the code, define a constant like DEFAULT_DOCUMENT_NAME = 'Unnamed Document' and use this constant in your code.


🔍📝🪄


Powered by Code Review GPT

mamadoudicko pushed a commit that referenced this pull request Nov 7, 2023
🤖 I have created a release *beep* *boop*
---


## 0.0.107 (2023-11-06)

## What's Changed
* fix: allow to change model bro brain settings tab by @mamadoudicko in
#1590
* fix: fix notification banner display when too much items in chat list
by @mamadoudicko in #1593
* docs: add auth modes config by @mamadoudicko in
#1595
* fix: allow users to delete brains by @mamadoudicko in
#1596
* feat: 🎸 source documents by @StanGirard in
#1598


**Full Changelog**:
v0.0.106...v0.0.107

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
coolCatalyst added a commit to coolCatalyst/quivr that referenced this pull request Jun 1, 2024
🤖 I have created a release *beep* *boop*
---


## 0.0.107 (2023-11-06)

## What's Changed
* fix: allow to change model bro brain settings tab by @mamadoudicko in
QuivrHQ/quivr#1590
* fix: fix notification banner display when too much items in chat list
by @mamadoudicko in QuivrHQ/quivr#1593
* docs: add auth modes config by @mamadoudicko in
QuivrHQ/quivr#1595
* fix: allow users to delete brains by @mamadoudicko in
QuivrHQ/quivr#1596
* feat: 🎸 source documents by @StanGirard in
QuivrHQ/quivr#1598


**Full Changelog**:
QuivrHQ/quivr@v0.0.106...v0.0.107

---
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant