Commit Graph

571 Commits

Author SHA1 Message Date
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
Stan Girard
bbcca2a8fe
docs: Update GPT4 documentation with available tools and use cases (#2580)
Updates the GPT-4 documentation and the `GPT4Brain` class to include
detailed information about the tools available for GPT4Brain and their
use cases.

- **Documentation (`docs/brains/gpt4.mdx`):**
- Adds a new section titled "Tools Available for GPT4Brain" that
describes specific tools: WebSearchTool, ImageGeneratorTool,
URLReaderTool, and EmailSenderTool.
- Provides use cases for each tool, demonstrating how they can be
utilized within GPT4Brain for various scenarios, such as generating
images, reading content from URLs, and sending emails.

- **Code (`backend/modules/brain/integrations/GPT4/Brain.py`):**
- Updates the class documentation to include information about the tools
available for GPT4Brain and outlines use cases for WebSearchTool,
ImageGeneratorTool, URLReaderTool, and EmailSenderTool.
- Maintains the existing functionality of the `GPT4Brain` class,
ensuring compatibility with the newly documented tools and use cases.


---

For more details, open the [Copilot Workspace
session](https://copilot-workspace.githubnext.com/QuivrHQ/quivr?shareId=2c2c1666-e5fb-4a06-bb08-ca967f4fe276).
2024-05-10 09:33:21 -07:00
Stan Girard
01c6e7b3bb
feat(email): Add email sender tool and update image generator tool (#2579)
This pull request adds a new email sender tool and updates the image
generator tool.
2024-05-10 07:56:51 -07:00
Stan Girard
105a2b8ecc
feat(tool): Add URLReaderTool (#2577)
This pull request adds the URLReaderTool to the list of tools in the
GPT4Brain class. The URLReaderTool allows for reading the content of a
URL.
2024-05-10 05:03:21 -07:00
Stan Girard
a4e2104cad
feat(brave-search): Update GPT4Brain tools and add WebSearchTool (#2576)
# 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-10 03:22:15 -07:00
Stan Girard
03ebbe70fe
chore: tools (#2575)
# 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-10 02:42:49 -07:00
Stan Girard
9b4142d0ba
fix: NEXT_PUBLIC_AUTH_MODES in docker-compose.yml (#2572)
This pull request fixes the value of NEXT_PUBLIC_AUTH_MODES in the
docker-compose.yml file. The previous value was incorrect and has been
updated to the correct value.
2024-05-10 01:25:29 -07:00
Stan Girard
4e5b0c0373
feat(gpt4): image generation (#2569)
This pull request adds a new feature to generate images using the OpenAI
DALL-E model. The `ImageGeneratorTool` class is implemented to handle
the image generation functionality.
2024-05-09 10:00:51 -07:00
imgbot[bot]
854cf9ef7c
[ImgBot] Optimize images (#2568)
## Beep boop. Your images are optimized!

Your image file size has been reduced by **22%** 🎉

<details>
<summary>
Details
</summary>

| File | Before | After | Percent reduction |
|:--|:--|:--|:--|
| /backend/modules/assistant/ito/utils/logo.png | 65.29kb | 23.44kb |
64.09% |
| /docs/images/brain-name-description.png | 183.55kb | 117.44kb | 36.02%
|
| /docs/images/upload-docs-urls.png | 195.53kb | 125.67kb | 35.73% |
| /docs/images/supabase-table.png | 303.63kb | 200.92kb | 33.83% |
| /docs/images/2024-04-22-21-49-27.png | 103.47kb | 69.76kb | 32.58% |
| /docs/images/vercel-source.png | 419.37kb | 303.08kb | 27.73% |
| /docs/images/create-brain-doc.png | 258.97kb | 188.74kb | 27.12% |
| /frontend/public/state-of-openai.png | 2,226.61kb | 1,631.89kb |
26.71% |
| /docs/images/supabase-user-settings-models.png | 68.30kb | 51.37kb |
24.79% |
| /docs/images/supabase-user-settings.png | 234.70kb | 182.26kb | 22.34%
|
| /logo.png | 162.43kb | 138.77kb | 14.56% |
| /frontend/public/default_brain_image.png | 5.14kb | 4.39kb | 14.47% |
| /frontend/public/discord.svg | 1.99kb | 1.84kb | 7.45% |
| /frontend/public/Web capture_22-10-2023_19416_www.quivr.app.jpeg |
108.15kb | 100.97kb | 6.64% |
| /frontend/public/Web capture_22-10-2023_19154_www.quivr.app.jpeg |
106.38kb | 99.42kb | 6.54% |
| /frontend/public/twitter.svg | 0.71kb | 0.67kb | 5.87% |
| /docs/images/undraw_docusaurus_mountain.svg | 30.75kb | 29.20kb |
5.04% |
| /docs/images/undraw_docusaurus_react.svg | 35.16kb | 33.60kb | 4.43% |
| /frontend/public/logo-white.svg | 39.07kb | 37.44kb | 4.16% |
| /frontend/public/logo-accent.svg | 39.07kb | 37.44kb | 4.15% |
| /frontend/public/logo-primary.svg | 39.07kb | 37.44kb | 4.15% |
| /docs/images/logo.png | 277.32kb | 267.54kb | 3.53% |
| /frontend/public/logo.png | 277.35kb | 267.56kb | 3.53% |
| /docs/images/undraw_docusaurus_tree.svg | 11.61kb | 11.42kb | 1.62% |
| /frontend/public/vercel.svg | 0.61kb | 0.61kb | 0.16% |
| /frontend/public/Homepage/smartphone-demo.png | 461.57kb | 461.44kb |
0.03% |
| | | | |
| **Total :** | **5,655.79kb** | **4,424.34kb** | **21.77%** |
</details>

---

[📝 docs](https://imgbot.net/docs) | [:octocat:
repo](https://github.com/imgbot/ImgBot) | [🙋🏾
issues](https://github.com/imgbot/ImgBot/issues) | [🏪
marketplace](https://github.com/marketplace/imgbot)

<i>~Imgbot - Part of [Optimole](https://optimole.com/) family</i>

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
2024-05-09 07:16:31 -07:00
Stan Girard
f5cfa2f6fa
feat(gpt4): Add search functionality (#2566)
This pull request adds search functionality to the application The
search functionality allows users to search the internet for
information.
2024-05-09 07:01:33 -07:00
Stan Girard
c1c39f1f5c
ci(ecr): added build to public ecr (#2564)
This pull request adds a GitHub Actions workflow for building and
pushing Docker images to Amazon ECR. The workflow is triggered on every
push to the main branch and includes steps for configuring AWS
credentials, logging in to Amazon ECR, GitHub Container Registry, and
Docker Hub, setting up Docker Buildx, creating a Docker cache storage
backend, and building, tagging, and pushing the Docker image to Amazon
ECR.
2024-05-08 07:42:31 -07:00
Stan Girard
e33d497598
feat(crawler): Add Playwright for web crawling (#2562)
This pull request adds the Playwright library for web crawling. It
includes the necessary dependencies and updates the code to use
Playwright for crawling websites.
2024-05-08 07:20:35 -07:00
Stan Girard
cd73412e8f
Revert "feat(celery): moved assistant summary to celery" (#2558)
Reverts QuivrHQ/quivr#2557
2024-05-07 09:20:42 -07:00
Stan Girard
55834365b2
feat(celery): moved assistant summary to celery (#2557)
This pull request moves the assistant summary functionality to the
celery module for better organization and separation of concerns.
2024-05-07 09:12:31 -07:00
Chloé Daems
748733df2d
fix: utf8 encoding (#2555)
# Description

Delete the replacement of non ASCII characters into spaces

## Checklist before requesting a review

Please delete options that are not relevant.

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged

## Screenshots (if appropriate):
2024-05-07 06:28:40 -07:00
Antoine Dewez
da3880a685
feat(frontend): add notifications for document uploads (#2549)
# 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-06 08:57:02 -07:00
Stan Girard
6b229a8fc3
feat(notion): update doc (#2542)
# 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-04 11:16:24 -07:00
Stan Girard
0dd1d12e6a
Add config parameter to conversational_qa_chain (#2540)
This pull request adds a new config parameter to the
`conversational_qa_chain` function. The config parameter allows for
passing metadata, specifically the conversation ID, to the function.
This change ensures that the conversation ID is included in the metadata
when invoking the `conversational_qa_chain` function.
2024-05-04 11:05:29 -07:00
Stan Girard
21e239c208
feat(brain): Add ProxyBrain integration (#2536)
This pull request adds the ProxyBrain integration to the project. The
ProxyBrain class is responsible for handling conversational QA and
generating answers based on the provided chat history and question.
2024-05-03 06:53:51 -07:00
Stan Girard
05cb0f71d0
feat(llama-parse): improve prompt (#2535)
# 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-03 06:28:07 -07:00
Damien Mourot
6bf78d67bb
feat(backend): Add a pre_pring on Connection polling to handle disconnection (#2534)
# 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-03 01:42:17 -07:00
Antoine Dewez
8d54187713
feat(user): Delete User Data from frontend (#2476)
# 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 <girard.stanislas@gmail.com>
2024-05-02 02:31:58 -07:00
Stan Girard
76f21bc2f5
fix: Update parsing instruction in common.py (#2531)
This pull request fixes the parsing instruction in the common.py file.
The result_type has been corrected to "markdown" and the
parsing_instruction has been updated to handle checkboxes, tables, and
other elements that are hard to parse in a meaningful way.
2024-05-02 01:12:24 -07:00
Stan Girard
62bfc3c8d9
fix: Refactor chat_service.py and remove unused code (#2530)
# 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-01 15:26:14 -07:00
Stan Girard
94d100eb11 Update supabase token setting in ci-migration.sh 2024-05-02 00:04:01 +02:00
Stan Girard
4d730448af
chore: packages (#2527)
Update python packages
2024-05-01 11:20:15 -07:00
Stan Girard
e1ad3dfb2a
feat(notifications): implemented notifications with RLS and realtime (#2525)
This pull request adds the implementation of the notifications feature,
including the ability to create, update, and delete notifications.
2024-05-01 11:11:12 -07:00
Stan Girard
8b0c55de5c
feat(llamaparse): Add Llama Parse integration for complex document parsing (#2517)
This pull request adds Llama Parse integration for complex document
parsing in Quivr. Llama Parse is a tool from Llama Index that allows you
to read complex documents in Quivr. It provides an API key that needs to
be added to the `.env` file as `LLAMA_CLOUD_API_KEY`. Once configured,
you can use the Llama Parse tool to read `pdf`, `docx`, and `doc` files
in Quivr.
2024-04-29 09:31:21 -07:00
Stan Girard
5717fdc1d5 Update .env.example and backend/models/settings.py 2024-04-29 10:36:10 +02:00
Damien Mourot
fb3aae27f1
feat(backend): use SQLAlchemy instead od supabase API (#2516)
# 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-04-29 01:27:50 -07:00
Stan Girard
5de8166e46
feat(supabase): Add logging statements and refactor Supabase client creation (#2514)
# 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-04-28 07:23:14 -07:00
Stan Girard
30b9e057ff
feat(db): Add Supabase client and database instances caching (#2513)
This pull request adds caching for the Supabase client and database
instances in order to improve performance and reduce unnecessary API
calls. The `get_supabase_client()` and `get_supabase_db()` functions now
check if the instances have already been created and return the cached
instances if available. This avoids creating new instances for every
function call, resulting in faster execution times.
2024-04-28 06:46:16 -07:00
Stan Girard
bdb115ad0a
feat(profiler): Add pyinstrument package and update Makefile and backend code (#2512)
This pull request adds the pyinstrument package and updates the Makefile
and backend code. The pyinstrument package is used for profiling and the
Makefile and backend code have been modified to support profiling.
2024-04-28 06:10:21 -07:00
Stan Girard
eb360830e0 Update Dockerfile dependencies 2024-04-28 14:34:44 +02:00
Stan Girard
d2086a97d3 Refactor logging configuration and remove unused imports 2024-04-28 13:35:07 +02:00
Stan Girard
4050313078 Remove debug flag from supabase db push command 2024-04-27 15:35:24 +02:00
Stan Girard
b12fc4f4bf Remove supabase initialization from ci-migration.sh 2024-04-27 15:34:36 +02:00
Stan Girard
b3e8c3d711 Add Supabase schema, migrations, and .gitignore file 2024-04-27 15:31:43 +02:00
Stan Girard
74c0e2d72c Add Supabase to Dockerfile 2024-04-27 15:20:39 +02:00
Stan Girard
e28ef7d709 Add debug flag to supabase db push command 2024-04-27 15:09:55 +02:00
Stan Girard
5baf2f02e5 Add supabase db password to ci-migration script 2024-04-27 15:04:19 +02:00
Stan Girard
9bfa9f63c5 Update ci-migration.sh script with environment variable setup and supabase commands 2024-04-27 15:00:35 +02:00
Stan Girard
491b1f85bf Add supabase initialization to ci-migration.sh 2024-04-27 14:56:45 +02:00
Stan Girard
5c0e5db0d9
Feat/migration ci 2 (#2509)
# 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-04-27 05:49:15 -07:00
Stan Girard
cba3ac3729
Add ci-migration script (#2508)
This pull request adds a ci-migration script that sets the project ID
from an environment variable and runs the supabase link and supabase db
push commands. This script will be used for continuous integration
purposes.
2024-04-27 05:43:12 -07:00
Stan Girard
785066f9cb
fix(metadata): Removed citation from metadata (#2507)
This pull request removes the citation metadata from the generate_answer
and generate_stream functions. The citation metadata was previously
being added to the streamed_chat_history and metadata dictionaries, but
it is no longer necessary. This change improves the efficiency and
clarity of the code.
2024-04-27 05:19:13 -07:00
Stan Girard
2be6aac02a
feat(embedding): keeping citations (#2506)
This pull request updates the chunk size and overlap parameters in the
File class to improve performance. It also increases the top_n value in
the compressor for both the CohereRerank and FlashrankRerank models.
Additionally, it ensures that the page content is encoded in UTF-8
before processing.
2024-04-27 05:18:51 -07:00