Commit Graph

617 Commits

Author SHA1 Message Date
AmineDiro
1fa79de859
fix: RAG service bug assertion error (#2796)
# Description

Fixes assertion error on brains of brain type integration.
!/!: temporary fix casts user_id to string for the assertion
2024-07-04 06:36:34 -07:00
AmineDiro
757bceeb95
fix: asyncpg pooling config fix (#2795)
# Description

closes #2782.

Changes `sqlalchemy` connection pooling config : 

- **pool_pre_ping=True** : pessimistic disconnect handling. 

> - It is critical to note that the pre-ping approach does not
accommodate **for connections dropped in the middle of transactions or
other SQL operations** ! But this should only happen if we lose the
database either due to network of DB server restart.

- **pool_size=10**, with no db side pooling for now, if 6 uvicorn
process workers are spawned (or 6 instances of the backed) we have a
pool of 60 processes connecting to the database.
- **pool_recycle=1800** :  Recycles the pool every 30min

Added additional session config : 
- expire_on_commit=False, When True, all instances will be fully expired
after each commit, so that all attribute/object access subsequent to a
completed transaction will load from the most recent database state.
- autoflush=False, query operations will issue a Session.flush() call to
this Session before proceeding. We are calling `session.commit` (which
flushes) on each repository method so ne need to reflush on subsequent
access
2024-07-04 05:28:02 -07:00
Chloé Daems
913217f682
feat: add megaparse (#2785)
Add megaparse as the main parser

---------

Co-authored-by: Stan Girard <girard.stanislas@gmail.com>
2024-07-04 02:23:15 -07:00
Stan Girard
2e4b80138c
chore: Update flashrank npm dependency to version 0.2.5 (#2781)
# 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):
2024-06-28 09:09:17 -07:00
Stan Girard
49c6eb686a
chore: Add supabase directory to Dockerfile (#2768)
# 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):
2024-06-27 05:02:10 -07:00
Stan Girard
1cd5ff6e78
chore: Add ci-migration.sh to Dockerfile (#2767)
# 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):
2024-06-27 04:02:15 -07:00
AmineDiro
2e75de4039
feat(backend): quivr-monorepo and quivr-core package (#2765)
# Description

closes #2722.

- Creates `quivr-monorepo` 
- Separates `quivr-core`
- Update dockerfiles and docker-compose

---------

Co-authored-by: aminediro <aminediro@github.com>
2024-06-27 03:51:01 -07:00
Stan Girard
0f51de8f41
chore: Update docker-compose files to specify platform for backend services (#2762)
This pull request updates the docker-compose files to specify the
platform for the backend services as linux/amd64. This ensures that the
services are built and run specifically for the amd64 architecture.
2024-06-26 15:46:18 -07:00
Stan Girard
d8956e55bb
fix: Update email sender parameters in backend code (#2755)
# 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):

Co-authored-by: Stan Girard <stan@quivr.app>
2024-06-26 05:21:46 -07:00
AmineDiro
cb3b795a92
closes #2756 (#2757)
# Description

closes #2756 

- Fixed torchvision cpu version in poetry
- Moved test dependencies to dev group

Co-authored-by: aminediro <aminediro@github.com>
2024-06-26 05:04:06 -07:00
AmineDiro
ca93cb9062
refacto(backend): poetry package manager and chat route refactoring (#2684)
# Description
- Added package manager
- Added precommit checks
- Rewrote dependency injection of Services and Repositories
- Integrate async SQL alchemy engine
- Migrate Chat  repository to SQLModel 
- Migrated ChatHistory repository to SQLModel
- User SQLModel
- Unit test methodology with db rollback
- Unit tests ChatRepository
- Test ChatService get_history
- Brain entity SQL Model
- Promp SQLModel
- Rewrite chat/{chat_id}/question route
- updated docker files and docker compose in dev and production

Added `quivr_core` subpackages:
- Refactored KnowledgebrainQa
- Added Rag service to interface with non-rag dependencies

---------

Co-authored-by: aminediro <aminediro@github.com>
2024-06-26 00:58:55 -07:00
Stan Girard
036201d844
feat: Improve efficiency of syncing stripe (#2719)
Fixes #2718

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

---------

Co-authored-by: Stan Girard <stan@quivr.app>
2024-06-24 13:17:48 -07:00
AmineDiro
28cb0ba7e6
fix: check user premium upsert (#2714)
# Description

closes #2713. Quick fix to upsert in `user_settings`

Co-authored-by: aminediro <aminediro@github.com>
2024-06-24 08:38:14 -07:00
Stan Girard
f546fd4d54
fix: Add logic to filter active subscriptions in check_if_is_premium_user function (#2673)
# 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):

Co-authored-by: Stan Girard <stan@quivr.app>
2024-06-13 13:45:01 -07:00
Stan Girard
52d121b96f
feat: Add timezone conversion for premium user check (#2670)
This commit adds timezone conversion to the premium user check in the
`check_if_is_premium_user` function. It imports the `pytz` library and
retrieves the current time in the "Europe/Paris" timezone. This ensures
that the comparison of the current period end with the current time is
accurate, taking into account the correct timezone. The Paris time is
logged for debugging purposes.

Co-authored-by: Stan Girard <stan@quivr.app>

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

---------

Co-authored-by: Stan Girard <stan@quivr.app>
2024-06-13 01:54:26 -07:00
Stan Girard
ec58935d9b
feat: Add premium user check in celery task (#2668)
"This pull request adds a new celery task called
`check_if_is_premium_user` that checks if a user is a premium user based
on their subscription status. The task retrieves the list of active
subscriptions and the list of customers from the Supabase database. It
then matches the subscriptions with the customers and updates the user
settings with the corresponding premium features if a match is found. If
a user is not found or their subscription is expired, the user settings
are deleted. This task will run periodically to keep the user settings
up to date with the subscription status.

---------

Co-authored-by: Stan Girard <stan@quivr.app>
2024-06-13 01:14:12 -07:00
Stan Girard
6bd1a5b334
fix: name passed in sync authorize (#2665)
# 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):

---------

Co-authored-by: Stan Girard <stan@quivr.app>
2024-06-12 05:20:10 -07:00
Stan Girard
83f06dc5d2
fix: Add error handling for syncing in tasks.py (#2663)
This pull request adds error handling for the syncing process in the
tasks.py file. Previously, if an error occurred during the syncing
process, the program would crash. With this change, any exceptions that
occur during syncing will be caught and logged, allowing the program to
continue running. This improves the stability and reliability of the
syncing functionality.

Co-authored-by: Stan Girard <stan@quivr.app>
2024-06-12 02:42:16 -07:00
Stan Girard
8e5af2c8c5
feat: Normalize file names in sync module (#2661)
This commit adds a new utility function `remove_special_characters` to
the `normalize.py` module in the `sync/utils` directory. The function
removes special characters from file names by normalizing the input
string and using regular expressions to remove non-alphanumeric
characters.

The function is then used in the `list_files.py` module in the
`sync/utils` directory to normalize the names of files retrieved from
Google Drive and Azure Drive. This ensures that the file names are free
of special characters, improving consistency and compatibility with
other parts of the system.

Co-authored-by: Stan Girard <stan@quivr.app>
2024-06-12 02:08:48 -07:00
Stan Girard
92ac7ae493
feat: Update Google authorization URL with prompt for consent (#2658)
The code changes in `google_sync_routes.py` update the authorization URL
for Google authentication. The `prompt` parameter is added with the
value "consent" to ensure that users are prompted to grant consent when
authorizing the application. This improves the user experience and
ensures that the necessary permissions are obtained.

# 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):
2024-06-11 04:36:42 -07:00
Stan Girard
9d1b2911a5
Update license to include enterprise features (#2653)
This pull request updates the license to include enterprise features.
The license now specifies that certain folders or files within the
distribution may be subject to different license terms and conditions,
which will be specified in a separate LICENSE file or within the file
itself. Additionally, a new Quivr Enterprise license has been added,
which restricts the use of the software to production environments only
if the user has a valid Quivr Enterprise license for the correct number
of user seats. The license also clarifies that modifications and patches
to the software can only be used with a valid Quivr Enterprise license.
Finally, the license includes a disclaimer of warranties and limitations
of liability.
2024-06-10 09:42:14 -07:00
Stan Girard
d0cd634d7c
feat: Add force_sync option to SyncsActiveUpdateInput (#2652)
This commit adds a new optional boolean field, force_sync, to the
SyncsActiveUpdateInput class in the sync module. The force_sync field
allows users to manually trigger a sync operation, bypassing the regular
sync interval. By default, force_sync is set to False.

The force_sync field is used in the GoogleSyncUtils and AzureSyncUtils
classes to determine whether to perform a sync operation even if the
regular sync interval has not elapsed. If force_sync is True, the
last_synced timestamp is updated and the sync operation is executed.

This enhancement provides more flexibility and control over the
synchronization process, allowing users to manually trigger sync
operations when needed.
2024-06-10 07:17:09 -07:00
Stan Girard
76930363ee
feat: telemetry improved (#2651)
# 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):
2024-06-10 06:28:14 -07:00
Stan Girard
11a2e888da
fix(google): auth is now in state (#2647)
# 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):
2024-06-09 13:23:50 -07:00
Stan Girard
7467707da4
fix: files_metadata (#2645)
# 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):
2024-06-09 10:01:36 -07:00
Antoine Dewez
3d3e6b7306
feat(frontend): sharepoint and gdrive integration (#2643)
# 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):
2024-06-09 09:43:18 -07:00
Stan Girard
47c6e24bf1
fix: integrations (#2642)
This pull request adds support for recursive folder retrieval in the
`get_files_folder_user_sync` method. Previously, the method only
retrieved files from the specified folder, but now it can also retrieve
files from all subfolders recursively. This enhancement improves the
functionality and flexibility of the method, allowing for more
comprehensive file retrieval in sync operations.
2024-06-08 02:55:11 -07:00
Stan Girard
ca6341372d
chore: Set default value for "last_synced" column in "syncs_active" table to '2024-06-01 15:30:25+00' (#2638)
# 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):
2024-06-06 10:11:10 -07:00
Stan Girard
31d3cce97f
fix: sync creation fixed (#2637)
This pull request includes updates to the `docker-compose.dev.yml` and
`Dockerfile.dev` files. The changes aim to improve performance and fix
bugs. The updates include:

- Removing unnecessary workers configuration in the
`docker-compose.dev.yml` file.

- Updating the base image in the `Dockerfile.dev` to use a slim version.

- Adjusting the schedule for a specific task in the code.

- Modifying the time interval for retrieving active syncs.

- Changing the loader class for processing PowerPoint files.

- Refactoring the file existence check logic.

- Adding debug logs for file existence check and file removal.

- Adjusting the file synchronization logic.

These changes are intended to enhance the performance and stability of
the application.
2024-06-06 10:06:21 -07:00
AmineDiro
675885c762
feat(upload): async improved (#2544)
# Description
Hey,

Here's a breakdown of what I've done:

- Reducing the number of opened fd and memory footprint: Previously, for
each uploaded file, we were opening a temporary NamedTemporaryFile to
write existing content read from Supabase. However, due to the
dependency on `langchain` loader classes, we couldn't use memory buffers
for the loaders. Now, with the changes made, we only open a single
temporary file for each `process_file_and_notify`, cutting down on
excessive file opening, read syscalls, and memory buffer usage. This
could cause stability issues when ingesting and processing large volumes
of documents. Unfortunately, there is still reopening of temporary files
in some code paths but this can be improved further in later work.
- Removing `UploadFile` class from File: The `UploadFile` ( a FastAPI
abstraction over a SpooledTemporaryFile for multipart upload) was
redundant in our `File` setup since we already downloaded the file from
remote storage and read it into memory + wrote the file into a temp
file. By removing this abstraction, we streamline our code and eliminate
unnecessary complexity.
- `async` function Adjustments: I've removed the async labeling from
functions where it wasn't truly asynchronous. For instance, calling
`filter_file` for processing files isn't genuinely async, ass async file
reading isn't actually asynchronous—it [uses a threadpool for reading
the
file](9f16bf5c25/starlette/datastructures.py (L458))
. Given that we're already leveraging `celery` for parallelism (one
worker per core), we need to ensure that reading and processing occur in
the same thread, or at least minimize thread spawning. Additionally,
since the rest of the code isn't inherently asynchronous, our bottleneck
lies in CPU operations rather than asynchronous processing.

These changes aim to improve performance and streamline our codebase. 
Let me know if you have any questions or suggestions for further
improvements!

## Checklist before requesting a review
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have ideally added tests that prove my fix is effective or that
my feature works

---------

Signed-off-by: aminediro <aminediro@github.com>
Co-authored-by: aminediro <aminediro@github.com>
Co-authored-by: Stan Girard <girard.stanislas@gmail.com>
2024-06-04 06:29:27 -07:00
Stan Girard
41dec746a7
fix: Refactor conversational_qa_chain initialization in KnowledgeBrainQA (#2629)
# 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):
2024-05-29 13:31:25 -07:00
Stan Girard
043bcd17ce
feat(sync): retrieve user email used for the connection (#2628)
# 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):
2024-05-29 06:39:13 -07:00
Stan Girard
a89db0cd5a
feat(llamaparse): Update parsing instructions in common.py (#2627)
This pull request updates the parsing instructions in the `common.py`
file for the `llamaparse` feature. The previous parsing instruction for
transforming checkboxes into text has been modified to also extract
tables and transform them into key-value pairs. Additionally, the
instruction now allows for duplicate keys if needed. The example
instructions have also been updated to provide clearer examples for both
tables and checkboxes.
2024-05-29 02:25:15 -07:00
Chloé Daems
da9a3c1897
fix: modify thought prompt (#2626)
# Description

Change the prompt of the thoughts feature to have more steps.

## 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):
2024-05-28 08:31:56 -07:00
Stan Girard
ff4ecb86e5
feat: Update QuivrRAG and run_evaluation.py files (#2615)
# 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):

---------

Co-authored-by: chloedia <chloedaems0@gmail.com>
2024-05-28 07:47:31 -07:00
Stan Girard
877e8500bb
feat(rag): follow-up questions and thoughts with spanish fix (#2618)
This pull request refactors the generate_answer and generate_stream
functions in order to improve code readability and maintainability. It
also adds new fields to the cited_answer model and updates the system
message template.
2024-05-26 08:43:38 -07:00
Stan Girard
b1fbbc8b02
feat: ragas improved testing (#2611)
# 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):
2024-05-23 01:36:10 -07:00
Stan Girard
c287fceb5b
feat: self-reflect brain (#2610)
This pull request adds the SelfBrain integration to the list of
available brain integrations.
2024-05-22 08:51:15 -07:00
Stan Girard
287cbb3347
Feat/celery import (#2608)
# 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):
2024-05-21 14:36:51 -07:00
Stan Girard
5c28f16a09
Add additional modules to celery.autodiscover_tasks() (#2607)
# 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):
2024-05-21 14:13:25 -07:00
Stan Girard
b06af57a1e
feat: add init to create packages (#2606)
# 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):
2024-05-21 13:42:07 -07:00
Stan Girard
d41a0b4be4
Feat/auth-playground (#2605)
# 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):
2024-05-21 13:20:35 -07:00
Stan Girard
848aed46ea
Revert "feat: Add Google Drive & Sharepoint sync in backend" (#2603)
Reverts QuivrHQ/quivr#2592
2024-05-21 08:37:08 -07:00
Stan Girard
8303aca9d9
feat: Add Google Drive & Sharepoint sync in backend (#2592)
# 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):
2024-05-21 07:53:04 -07:00
Stan Girard
d84b8e79d6
fix: sender email address in resend_invitation_email.py (#2600)
This pull request fixes the sender email address in the
`resend_invitation_email` function in the `resend_invitation_email.py`
file. The `from` field has been changed to `sender` to ensure that the
correct email address is used when sending the invitation email.
2024-05-21 03:27:05 -07:00
Stan Girard
1b60f59ad7
feat: Update ChatLiteLLM model and add RLS optimization for notifications (#2591)
This pull request updates the ChatLiteLLM model to "gpt-4o" and adds a
row-level security (RLS) optimization for notifications. It also
includes a new SQL script to drop and create a policy for allowing user
access to all notifications.
2024-05-14 01:43:01 -07:00
Stan Girard
cd927ebdcf
feat: Add support for gpt-4o model (#2589)
This pull request adds support for the gpt-4o model to the existing
codebase. It includes changes to the BrainConfig, openAiFreeModels,
defineMaxTokens, model_compatible_with_function_calling, create_graph,
main, and process_assistant functions.
2024-05-13 14:07:41 -07:00
Stan Girard
3086891cb7
fix: Update import statements for OllamaEmbeddings (#2584)
This pull request fixes the import statements for OllamaEmbeddings in
multiple files. The import statements are updated to use the correct
package name "langchain_community.embeddings" instead of
"langchain.embeddings.ollama". This ensures that the code can be
compiled and executed without any import errors.
2024-05-11 11:50:13 -07:00
Stan Girard
2f3cbb67d2 Update api_key default value in WebSearchTool 2024-05-10 23:49:08 +02:00
Stan Girard
b60a31e561
docs: Add docstrings to integration brains (#2582)
This pull request adds comprehensive docstrings to the Brain classes
within the `backend/modules/brain/integrations` directory, enhancing
code documentation and readability. The changes include:

- **BigBrain (`Big/Brain.py`)**: Adds a class-level docstring explaining
the purpose and functionality of the BigBrain class, along with
method-level docstrings detailing the operations performed by each
method.
- **ClaudeBrain (`Claude/Brain.py`)**: Introduces a class-level
docstring that describes the ClaudeBrain class's integration with the
Claude model for conversational AI capabilities, and method-level
docstrings that clarify the purpose of each method.
- **GPT4Brain (`GPT4/Brain.py`)**: Updates include a detailed
class-level docstring outlining the GPT4Brain's integration with GPT-4
for real-time answers and tool support, along with method-level
docstrings explaining the functionality of each method.
- **NotionBrain (`Notion/Brain.py`)**: Adds a class-level docstring that
describes the NotionBrain's role in leveraging Notion data for
knowledge-based responses.
- **ProxyBrain (`Proxy/Brain.py`)**: Incorporates a class-level
docstring explaining the ProxyBrain's function as a dynamic language
model selector and method-level docstrings detailing the operations of
each method.

These additions ensure that each Brain class and its methods are
well-documented, providing clear insights into their purposes and
functionalities.


---

For more details, open the [Copilot Workspace
session](https://copilot-workspace.githubnext.com/QuivrHQ/quivr?shareId=b4e301ad-828e-4424-95ec-6e378d5d3849).
2024-05-10 14:46:55 -07:00