Commit Graph

395 Commits

Author SHA1 Message Date
Mamadou DICKO
1a5fa8ba0f
feat: update settings tab add api brain definition (#1635)
Issue: https://github.com/StanGirard/quivr/issues/1627

Demo:
<img width="1512" alt="Screenshot 2023-11-15 at 13 09 59"
src="https://github.com/StanGirard/quivr/assets/63923024/532c45ce-32d7-4af7-a71f-02eb6099538d">
2023-11-16 11:02:58 +01:00
Zineb El Bachiri
375f50356c
refactor: add modules folder (#1633)
# Description

New Modules folder with "user" module:
- controller: contains the current route
- entity: contains the current Models (TO be renamed DTO)
- repository: contains the current repo
- service: methods used by other modules 

## 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):
2023-11-15 13:17:51 +01:00
Mamadou DICKO
223af1d3f6
feat: add api brain creation frontend (#1631)
Issue: https://github.com/StanGirard/quivr/issues/1607

Demo:



https://github.com/StanGirard/quivr/assets/63923024/a087d856-e201-4b88-80b3-b001d7bb6b16
2023-11-15 12:42:19 +01:00
Zineb El Bachiri
1f21c6d7f3
refactor: packages folder be 2 (#1628)
# Description

Move some folders to packages
Remove unused code
2023-11-14 14:31:02 +01:00
Zineb El Bachiri
8f693bc92a
refactor: create "files" package (#1626)
# 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):
2023-11-14 09:52:44 +01:00
Stan Girard
5a3f284785
test(all): added (#1624)
# 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):
2023-11-14 08:36:44 +01:00
Mamadou DICKO
8ed0adf7b2
feat: remove api brain secrets and schemas on delete (#1621)
Issue: https://github.com/StanGirard/quivr/issues/1573
2023-11-13 19:08:47 +01:00
Stan Girard
ee864e6441
test(added): misc prompt onboarding (#1622)
Added tests for:

- Prompt
- Misc
- Onboarding
2023-11-13 19:02:10 +01:00
Stan Girard
6017fa2e9c test(contact): added contact route with mock 2023-11-13 17:58:11 +01:00
Stan Girard
ec60d3dbff ci(backend): added tests for user 2023-11-13 15:28:42 +01:00
Stan Girard
1e00f6929f fix: 🐛 docker
fixed multi stage
2023-11-13 15:03:55 +01:00
Mamadou DICKO
5e61445fb2
fix: update delete brain logic (#1619) 2023-11-13 15:02:10 +01:00
Stan Girard
6bc9dd1894
ci: 🎡 tests (#1615)
fixed

# 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):
2023-11-13 13:53:25 +01:00
Mamadou DICKO
f24779ff14
fix: add user id while creating default brain (#1616) 2023-11-13 12:16:38 +01:00
Mohamed Messaad
71d4a63a17
feat(docker): use multi-stage Docker builds for smaller images (#1614)
# Description

Currently, the production Docker images are very large, sitting at 4.17
GB for the frontend image, and 3.49 GB for backend images. This change
adds multi-stage builds, to optimize the image sizes, which results in
the following improvements:

- frontend image size: 4.17 GB -> 1.64 GB
- backend image size: 3.49 GB -> 1.71 GB

I hope this is appropriate as there is no open issue for this that I
know of.
I implemented this change and tested it locally, and would be glad to
discuss this and open an issue if necessary.

## 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
- [x] I have commented hard-to-understand areas
- [x] New and existing unit tests pass locally with my changes

## Screenshots (if appropriate):
Image sizes before:
<img width="1416" alt="image"
src="https://github.com/StanGirard/quivr/assets/8296549/fcbb020f-8165-4549-ae30-823318691ec6">

Image sizes after:
<img width="1416" alt="image"
src="https://github.com/StanGirard/quivr/assets/8296549/d3f43c78-be26-4c38-9d23-9c1b0e9e37f2">
2023-11-13 10:13:56 +01:00
Mamadou DICKO
db5a6e4b9b
feat: allow users to chat with apis (#1612)
You can now create a brain which can fetch data from external APIs with
or without authentification

- POST query example with authentification 


https://github.com/StanGirard/quivr/assets/63923024/15013ba9-dedb-4f24-9e06-49daad9de7f3


- Get query example with authentification and search params



https://github.com/StanGirard/quivr/assets/63923024/1763875d-a8e9-4478-b07c-e99ca7337942


- Get query without authentification and search params



https://github.com/StanGirard/quivr/assets/63923024/f2742963-790d-4cb2-864a-8173979b650a
2023-11-09 16:58:51 +01:00
Mamadou DICKO
addcd27fce
feat: add APIBrainQA (#1606)
Issue: https://github.com/StanGirard/quivr/issues/1566
2023-11-08 16:07:21 +01:00
Zineb El Bachiri
ed5de8b80c
feat: supabase vault (#1605)
# Description

https://github.com/StanGirard/quivr/issues/1551

## 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):
2023-11-07 16:57:25 +01:00
Mamadou DICKO
dd2bc1f6fc
feat: add brain_type column to brain table (#1603)
Issue: https://github.com/StanGirard/quivr/pull/1601

Demo:


https://github.com/StanGirard/quivr/assets/63923024/a7fe76a7-8809-4ec7-b1e6-d6fe36928a5c
2023-11-07 16:23:52 +01:00
Mamadou DICKO
9382762d01
feat: add api_brain_definition table (#1601)
Issue: https://github.com/StanGirard/quivr/issues/1549
2023-11-07 14:03:50 +01:00
Stan Girard
1d3554cb92
feat: 🎸 source documents (#1598)
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):
2023-11-06 17:19:26 +01:00
Mamadou DICKO
3c0819de09
fix: allow users to delete brains (#1596)
Issue: https://github.com/StanGirard/quivr/issues/1362

Demo:


https://github.com/StanGirard/quivr/assets/63923024/aa5e41f8-a738-41f2-b037-975788ad8611
2023-11-06 16:58:03 +01:00
Stan Girard
192610d008
feat: 🎸 sources (#1591)
added sources in front and backend

<img width="1536" alt="image"
src="https://github.com/StanGirard/quivr/assets/19614572/eb997288-282d-4f6e-b489-08ab3db400c6">
2023-11-06 12:09:18 +01:00
Stan Girard
ab11b384f7 fix: 🐛 parsers
pdf and odt to unstructured
2023-11-05 22:43:46 +01:00
Stan Girard
35f5fe0958 feat: 🎸 telegram
fixed a few bugs
2023-11-01 22:33:47 +01:00
Stan Girard
5eed1a05cb
feat: 🎸 telegram (#1555)
added loaders and compatibility

# 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):
2023-11-01 22:09:04 +01:00
Zineb El Bachiri
0c58a4bb0e
refactor: extract prompt from settings (#1546)
# Description

- Refactor useSettingsTab by extracting usePrompt and methods in utils
- Fix bug #1545 

## 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):
2023-11-01 16:45:22 +01:00
Stan Girard
b330370d8c
feat: 🎸 max-token (#1538)
added limit to 4k for gpt4

# 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):
2023-11-01 08:52:49 +01:00
Zineb El Bachiri
e3a99d1ace
refactor: chat_routes (#1512)
# 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):
2023-10-30 10:18:23 +01:00
Zineb El Bachiri
82bcf38b16
refactor: fix bad smells (#1399)
# 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):
2023-10-30 10:18:04 +01:00
Mamadou DICKO
c47548d3cd
feat: setup premium feature backend (#1467)
Issue: https://github.com/StanGirard/quivr/issues/1468
2023-10-23 18:19:04 +02:00
Matthieu Jacq
cee050a2e4
feat: POST on /contact to contact quivr team by email (#1466)
# Description

Issue: #1445
Epic: #1232

## ⚠️ À rajouter en variables d'environnement

```env
RESEND_CONTACT_SALES_FROM=contact_sales@resend.dev
RESEND_CONTACT_SALES_TO=<change-me>
```
2023-10-23 17:58:45 +02:00
Stan Girard
ca1ef8ccbd
refactor(backend): cleaning dead and unused code (#1432)
# 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):
2023-10-19 15:52:20 +02:00
Mamadou DICKO
a9d2145fe6
feat: add a cron to remove onboarding more than 7 days (#1397)
https://github.com/StanGirard/quivr/issues/1385
2023-10-16 16:11:34 +02:00
Mamadou DICKO
ea227df30e
feat(onboarding): add suggested questions answer (#1390)
https://github.com/StanGirard/quivr/assets/63923024/08554dd5-2765-436a-b900-48b38d582f6c



https://github.com/StanGirard/quivr/issues/1389
2023-10-12 09:39:56 +02:00
HamzaKhalid
024dd5a264
fix(user identity): User identity dict has no attribute user_id and open_api_key (#1351)
# Description
Trying to access access 'user identity' attributes as attribute of
dictionary which throws an error since the attributes are actually the
key in the dictionary not an attribute of the dictionary object.

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

## Screenshots (if appropriate):
<img width="795" alt="image"
src="https://github.com/StanGirard/quivr/assets/88370405/7db55e74-159c-43e1-b9f7-8384dad9be30">

Co-authored-by: HamzaKhalid-bboxx <127825841+HamzaKhalid-bboxx@users.noreply.github.com>
Co-authored-by: Zineb El Bachiri <100568984+gozineb@users.noreply.github.com>
2023-10-11 16:06:37 +02:00
Mamadou DICKO
b9172b7442
feat: track onboarding events (#1388)
https://github.com/StanGirard/quivr/issues/1386
2023-10-11 15:56:28 +02:00
Mamadou DICKO
1baf9ee5b0
feat: remove user onboarding on complete (#1387)
https://github.com/StanGirard/quivr/issues/1384


https://github.com/StanGirard/quivr/assets/63923024/ac05456d-2817-4196-8afc-51b34a4d8c5f
2023-10-11 09:46:57 +02:00
Matthieu Jacq
fa92243a18
feat: ⚙️🐞 configure debugger for the backend (#1345) 2023-10-09 15:23:13 +02:00
Stan Girard
b5c01efb78
fix(question): fixed with user_settings (#1349)
# 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):
2023-10-06 20:32:23 +02:00
Mamadou DICKO
16cea2c86b
feat: add onboarding_a column to onboarding table (#1340)
https://github.com/StanGirard/quivr/issues/1338

<img width="1215" alt="Screenshot 2023-10-05 at 18 05 30"
src="https://github.com/StanGirard/quivr/assets/63923024/67562c50-ddc1-4eaa-8b68-d374b2eb4b67">
2023-10-06 12:37:12 +02:00
Mamadou DICKO
28ef515458
feat: update onboarding controller and fix typo (#1333)
<img width="525" alt="Screenshot 2023-10-05 at 10 55 29"
src="https://github.com/StanGirard/quivr/assets/63923024/d7a4e7ef-e73f-46d0-8499-06c5e951f64a">


<img width="1207" alt="Screenshot 2023-10-05 at 10 49 45"
src="https://github.com/StanGirard/quivr/assets/63923024/50eba38a-b2cb-4e7d-82b1-ceca60abdad4">

https://github.com/StanGirard/quivr/issues/1328
2023-10-05 11:31:26 +02:00
Mamadou DICKO
fbdc07af2c
feat: add onboarding table (#1327)
* feat: add onboarding table

* feat: add Onboarding repository

* feat: add onboarding controller
2023-10-05 09:47:29 +02:00
Stan Girard
e62c3e0579 feat(litellm): adding huggingface compatibility mistral 2023-10-03 17:18:50 +02:00
Stan Girard
160588cfae feat(litellm): improved 2023-10-03 10:12:44 +02:00
Stan Girard
ead1ae86fc
feat(user_settings): increased (#1291) 2023-09-30 22:32:53 +02:00
Gustavo J. Maciel
3d4f25755d
fix(brains): get brains on local (#1272)
* fix(brains): get brains on local

* fix(brains): remove comments

---------

Co-authored-by: Zineb El Bachiri <100568984+gozineb@users.noreply.github.com>
2023-09-28 16:40:04 +02:00
Mamadou DICKO
c8f045dfad
feat: save last chat config and make it default one (#1266)
* fix(RBAC): skip validation for unplug

* feat(chatSettings): set last config as default

---------

Co-authored-by: Zineb El Bachiri <100568984+gozineb@users.noreply.github.com>
2023-09-26 18:41:02 +02:00
Mamadou DICKO
df03ee67be
fix(RBAC): skip validation for unplug (#1264) 2023-09-26 14:24:17 +02:00
Mamadou DICKO
a4a2d769b3
feat: allow setting public brain status to private (#1258)
* feat: refetch brains list on when new brain is added

* feat: update BrainConfig type

* feat: update useSettingsTab add usebrainFormState and useSettings tab

* feat: add <PrivateAccessConfirmationModal/> modal

* feat: update translations

* feat: handle brain status change to private

* feat: validate chat access

* test: fix failaing tests and remove deprecated
2023-09-26 10:35:52 +02:00
Mamadou DICKO
1643b54b7b
feat: allow user to unsubscribe from a brain (#1254)
* feat: update translations

* feat: add <DeleteOrUnsubscribeConfirmationModal />

* test(DeleteOrUnsubscribeConfirmationModal): update tests

* feat: redirect to /brains-management on invalid brain id

* refactor: move delete_brain_user to delete_brain_users

* feat: add /POST '/brains/{brain_id}/subscribe'

* feat: handle public brain unsubscription
2023-09-25 14:22:59 +02:00
Zineb El Bachiri
3043f3acd0
✏️ fix urls to avoid 307 (#1253) 2023-09-25 12:13:48 +02:00
Zineb El Bachiri
d2b4ef4aff
feat: knowledge tab list (#1222)
*  get all knowledge utils

*  add remove knowledge and update router

*  new knowledge provider

* 🚨 remove eslint -disable

*  new useKnowledgeApi

*  set up KnowledgeItem

*  add KnowledgeTable component in knowledge tab

* 🔥 remove DocumentData replaced by KnowledgeItem

* 🐛 fix weird characters instead of '/'

* 💄 truncate knowledge name

*  add DownloadUploadedKnowledge component

* ⚰️ unused code

* 🏷️ introduce UploadedKnowledge and CrawledKnowledge types

* 💄 remove thread

* 💄 bin for delete knowledge

* 🌐 update wording for knowledge tab

* 🔇 remove logs and comments
2023-09-22 16:06:04 +02:00
Mamadou DICKO
2c9a0c1ed2
feat: activate public brain subscription (#1241)
* feat: add public brain details modal

* feat(brain): add subscription route

* feat: activate subscription button

* feat: add last_update column to brain table

* feat: display last update on public brain details page

* feat: change RBAC rule for public brains

* feat: maintain brain last_update time
2023-09-22 11:44:09 +02:00
Stan Girard
6dac6b8561 fix(aws): fixed cpu 1 2023-09-21 11:26:58 +02:00
Stan Girard
65ace7e7ab fix(preview): pandoc making a bug 2023-09-21 11:03:06 +02:00
Mamadou DICKO
8172704b61
feat: add public brain page (#1230)
* feat: add brain library button

* feat(Field): add inputClassName key

* feat: add GET brains/public route

* feat: add brains library layout

* feat: add brain subscriber count
2023-09-21 09:35:53 +02:00
Mamadou DICKO
1593c3342c
feat: display brain status on settings page (#1221)
* feat: update GET/brains return status

* feat: add public tag on brain list

* feat: add public tag for public brain on brain settings tab

* feat: hide over tab when brain access is public
2023-09-20 16:24:56 +02:00
Stan Girard
d8e188788f
fix(gpt-3.5-instruct): bug and new version of node (#1228) 2023-09-20 16:16:50 +02:00
Zineb El Bachiri
be7acf052b
feat: get files from storage (#1205)
* 🌱 list files in storage & generate signed URL

*  add knowledge router

* 🗃️ add knowledge tables

*  add knowledge during upload

* 🚧 add knowledge a brain_knowledge models and repo

* 🔥 remove brain_knowledge

*  add upload to knowledge table

*  add crawl to knowledge table

* ✏️ fixes
2023-09-20 09:35:37 +02:00
Stan Girard
463e5d92e7
feat(question): now not rephrasing question when passed to answering llm (#1202) 2023-09-19 12:11:03 +02:00
Mamadou DICKO
1ec736b357
fix: fix some bugs (#1201)
* feat(brainSettings): add feed process instrcution to knowledge tab

* feat: prevent default brain auto fetch

* feat: prevent chat submision on submit button click

* feat: remove unrelevant toast

* feat: remove duplicated GA initialization

* feat: add brain name in notifications

* fix(test): update analytics import path

* refactor: move ChatsList utils to ChatsList directory

* fix(test): update chatlist tests
2023-09-18 21:28:07 +02:00
Stan Girard
8914c7c357
fix(chats): now in order and with a little bonus ;) (#1200)
* fix(chats): now in order and with a little bonus ;)

* style(eslint): fixed
2023-09-18 18:25:28 +02:00
Stan Girard
4a0a7abbc0
feat(prompt): improved answer readability with markdown and aerataed (#1190) 2023-09-18 00:22:57 +02:00
Stan Girard
2e4fdc80ec
feat(concurrency): added concurrency for increased performance (#1189) 2023-09-17 22:36:42 +02:00
Stan Girard
54a34c2143
feat(aws): improved size (#1188) 2023-09-16 16:49:31 +02:00
Stan Girard
83286cc9a3
fix(notifications): greater than 5 minutes ago not less (#1187)
* fix(notifications): dead notifications that are still present long after

* fix(notifications): greater than 5 minutes ago not less
2023-09-16 16:42:50 +02:00
Stan Girard
f847ee84a9
fix(notifications): dead notifications that are still present long after (#1186) 2023-09-16 16:09:38 +02:00
Stan Girard
f362269600
feat(notificatins): higher refresh rate (#1184)
* fix

* feat(notificatins): higher refresh rate
2023-09-16 13:51:08 +02:00
Stan Girard
4fb8c34efd
fix(usersettings): Fix bugs with user settings in the back always gpt-3.5-turbo (#1183)
* fix

* feat(gpt4): added support for gpt4
2023-09-16 00:22:42 +02:00
Stan Girard
4d41901106
feat(perf): increased perf embedding and search for files (#1182)
* feat(upload): changed to task

* feat(sha1): added column for better speed
2023-09-15 23:39:29 +02:00
Gustavo J. Maciel
cdf587cfde
fix(qa_base): asign max_token to llm (#1179) 2023-09-15 18:51:53 +02:00
Stan Girard
980a704002
feat(upload): changed to task (#1178) 2023-09-15 15:52:06 +02:00
Stan Girard
2ad2788046 feat(aws): increase cpu and memory task 2023-09-14 17:43:28 +02:00
Stan Girard
f46ad68aa4 feat(broker): fixed url 2023-09-14 17:23:30 +02:00
Stan Girard
dda296a95d feat(error): added better upload error display 2023-09-14 16:46:55 +02:00
Stan Girard
1d33fbd3eb
feat(file-system): added queue and filesystem (#1159)
* feat(queue): added

* feat(crawling): added queue

* fix(crawler): fixed github

* feat(docker): simplified docker compose

* feat(celery): added worker

* feat(files): now uploaded

* feat(files): missing routes

* feat(delete): added

* feat(storage): added policy and migrations

* feat(sqs): implemented

* feat(redis): added queue name variable

* fix(task): updated

* style(env): emoved unused env

* ci(tests): removed broken tests
2023-09-14 11:56:59 +02:00
Stan Girard
322ee318be
feat: the good user management (#1158)
* feat(user_management): added user management

* feat(user_management): added user management

* feat(user_management): removed print

* feat: use tanstack query for user data fecthing

* feat: add getUser to sdk

* feat: improve user page ux use tanstack query

* feat: fetch models from backend on brains settings page

* feat: update model selection on chat page

* feat: update tests

---------

Co-authored-by: mamadoudicko <mamadoudicko100@gmail.com>
2023-09-13 13:47:12 +02:00
Mamadou DICKO
7cc90ef258
feat: add polling for pending notifications (#1152)
* feat: add notification controller

* feat: add polling logic on pending notifications

* feat: refecth notifications on Feed
2023-09-12 18:00:46 +02:00
Mamadou DICKO
10af0c949a
feat: add notifications components (#1148)
* feat: rename ChatMessages to MessagesDialog

* feat: rename history to messages

* feat: add notifications to ChatContext

* feat: add getNotificationsFromChatHistory

* feat: add getMergedChatHistoryWithReducedNotifications

* refactor: update useActionBar

* refactor: update <ChatMessage />-n

* feat: update crawler and endpoint notifications content

* feat: display notifications

* test: update <MessageDialog /> tests

* feat: rename ChatMessage to QADisplay

* feat: rename ChatHistory to ChatMessage

* feat(upload): throw error when file missing

* feat: rename getMergedChatHistoryWithReducedNotifications to getMergedChatMessagesWithReducedNotifications

* feat: change history wording to message

* feat: move getFileIcon to lib

* refactor(NotificationDisplayer): move types to types.ts

* chore: improve ux

* feat: rename MessagesDialog to ChatDialogue
2023-09-12 17:44:15 +02:00
Mamadou DICKO
72659709a8
fix: update crawl and upload endpoints (#1142) 2023-09-08 11:03:14 +02:00
Mamadou DICKO
9464707d40
feat: merge chat history with chat notifications (#1127)
* feat: add chat_id to upload and crawl payload

* feat(chat): return chat_history_with_notifications

* feat: explicit notification status on create

* feat: handle notifications in frontend

* feat: delete chat notifications on chat delete request
2023-09-07 17:23:31 +02:00
Mamadou DICKO
575d9886c5
feat: add notifications table, and push notification on upload and crawl (#1125)
* feat: add notifications table

* feat: add Notification model

* feat: add notification repositories

* feat: add upload and crawl notifications

* feat: update notification message
2023-09-07 13:22:06 +02:00
Ishaan Jaff
02964c4077
feat(liteLLM): Add support for Azure OpenAI, Palm, Claude-2, Llama2, CodeLlama (100+LLMs) (#1097)
* v0 litellm

* bump versions
2023-09-05 17:38:19 +02:00
Mamadou DICKO
bd2358f425
fix: fix minor bugs (#1070)
* fix: update get_user_id_by_user_email type

* fix: update getEditorText logic

* feat(mentionSuggestions): render empty popover
2023-08-31 10:41:02 +02:00
Mamadou DICKO
ba123fe716
feat(shareBrain): prevent re inviting users with access (#1063)
* fix(shareBrain): prevent access duplication in db

* feat: remove unused function

* fix(linter): update types
2023-08-30 15:55:06 +02:00
Joey Wang
30cb91531f
feat(brain): add endpoint to return context to question (#1044) 2023-08-27 09:38:41 +02:00
Mamadou DICKO
f1d6b7892c
test: unskip qa_headless.py linter tests (#1041) 2023-08-25 14:03:57 +02:00
Mamadou DICKO
252b1cf964
test: skip failing linter tests (#1036) 2023-08-25 12:03:13 +02:00
Pat Tran
43a00b06ec
fix(dockerfile): backend Dockerfile exit code 1 (#1032) 2023-08-25 11:05:24 +02:00
Zineb El Bachiri
0ca25e2af5
🚑 fix quivr api key types (#1022) 2023-08-22 18:10:17 +02:00
Mamadou DICKO
b967c2d2d6
feat: add brain prompt overwritting from chat (#1012) 2023-08-22 14:23:27 +02:00
joelsprunger
a626b84b96
feat(backend): adds python code parsing (#1003)
Adds a python code parser and invokes it in processors.py
2023-08-22 12:05:31 +02:00
Zineb El Bachiri
9aaedcff51
Fix/requests limiting (#980)
* 🗃️ Rename users table into user_daily_usage

* 💥 replace User model with UserIdentity model

* 🗃️ New UserDailyUsage class for database interaction

* 🐛 fix daily requests rate limiting per user

* 🐛 fix user stats and properties update

* ✏️ add typing and linting

* 🚚 rename user_dialy_usage Class  into user_usage & requests_count into daily_requests_count

* 🚑 fix some rebase errors
2023-08-21 14:05:13 +02:00
Mamadou DICKO
f61b70a34f
fix: remove conflicts (#998) 2023-08-21 12:58:22 +02:00
Zineb El Bachiri
3821502c6d
add xlsx and xls parser (#997) 2023-08-21 12:56:48 +02:00
Mamadou DICKO
5a3a6fe370
fix: update backend tests (#992)
* fix: update backend tests

* fix(pytest): update types
2023-08-21 12:45:32 +02:00
MaHDi
8af6d61e76
improve (importing): reorganization of the import structure (#964)
* reorganize import level

* add __init__, reorganize import from __init__

* reorganize import level

* reorganize import level

* fix circular import error by keep the import deep as "from models.settings"

* fix the relative import

* restor unwanted staged files

* add backend/venv and backend/.env to gitignore

* clean importing
2023-08-21 12:25:16 +02:00
Stan Girard
ae7852ec3f
feat(health): added endpoint for services (#989) 2023-08-20 23:20:57 +02:00
Stan Girard
d0370ab499
feat(refacto): changed a bit of things to make better dx (#984) 2023-08-19 13:32:16 +02:00
Stan Girard
cbc8ac4946
Revert "fix: update backend tests (#975)" (#983)
This reverts commit c746eb1830.
2023-08-19 12:31:15 +02:00
Stan Girard
ce6b45e1ac
feat(preview): added service upload (#979)
* feat(docker): improved size image

* feat(preview): added upload service

* ci(aws): using matrix
2023-08-18 14:49:48 +02:00
Mamadou DICKO
c746eb1830
fix: update backend tests (#975)
* fix: update backend tests

* fix(pytest): update types
2023-08-18 14:01:14 +02:00
Stan Girard
aa623c4039
feat(docker): improved size image (#978) 2023-08-18 12:57:16 +02:00
Stan Girard
b894f8e7e5
ci(preview): fixed name service (#977)
* feat(chat-service): added task definition

* feat(ci): added ci

* feat(ci): added preview chat
2023-08-18 12:20:47 +02:00
Stan Girard
d1dfd6c7ec
Feat/microservice aws (#976)
* feat(chat-service): added task definition

* feat(ci): added ci
2023-08-18 12:02:57 +02:00
Zineb El Bachiri
74da7dde2d
Crawl/update env variables (#931)
* 📝 add env variable for crawl

* 🐛 make CharQuestion with optional attributes

* 💡 make chatQustion config optional
2023-08-18 11:59:20 +02:00
Stepan Lebedev
600ff1ede0
feat(Unplug): chatting without brain streaming (#970)
* feat(Unplug): Adds new basic headless llm

* feat(Unplug): adds chatting without brain option when no streaming

* feat(Unplug): adds chatting without brain option when streaming
2023-08-18 10:32:22 +02:00
Stan Girard
7281fd905a
feat(microservices): split into 4 quivr to better handle long services (#972)
* feat(verbose): removed

* feat(microservices): split quivr into micro services

* test(main): fixed
2023-08-18 10:18:29 +02:00
Stan Girard
ad7ac1516d
fix(windows): removed unused start script (#962) 2023-08-17 19:10:30 +02:00
Zineb El Bachiri
30060944d7
🐛 delete brain with custom prompt (#959) 2023-08-16 13:59:19 +02:00
Stan Girard
d7c5c79043
fix(crawler): using newspaper and fixed recursive by merging content (#955)
* fix(crawler): using newspaper and fixed recursive by merging content

* feat(code-review): added feedback from code review
2023-08-15 18:09:09 +02:00
Joey Wang
1fef9b0783
fix(chatMessages): Fix error on answering question (#953) 2023-08-15 15:59:30 +02:00
joelsprunger
59ddfb4882
fix(chat routes): use brain model, temp, and token (#902) 2023-08-11 20:44:48 +02:00
Tural Sadık
d4d19bbf0b
feat (926): make crawl recursively navigate linked pages (#927) 2023-08-11 08:20:12 +02:00
Mamadou DICKO
21db719796
fix(chat): update data keys (#923) 2023-08-10 17:35:30 +01:00
Mamadou DICKO
6e777327aa
feat(chatMessages): add brain_id and prompt_id columns (#912)
* feat: add prompt_id and brain_id to chat history)

* feat: add prompt_id and brain_id to chat routes
2023-08-10 10:25:08 +02:00
Stan Girard
9ba724168e
fix(sentry): some unhandled errors (#894)
* fix(answers): fixed with self.qa not existing anymore

* fix(crawling): fixed when it bugs
2023-08-08 16:15:43 +01:00
joelsprunger
b31924f71d
debug by running main.py in the backend (#888)
Co-authored-by: Joel Sprunger <joel@lendertoolkit.com>
2023-08-08 16:01:31 +01:00
Stan Girard
7028505571
feat(qa): improve code (#886)
* feat(qa): improve code

* feat: 🎸 customprompt

now in system
2023-08-07 19:53:04 +02:00
ChloeMouret
e9ebeef72a
feat: gpt4 is not available for brains if there is no given openAiKey (#850)
* rename defineMaxToken

* use gpt-3.5-turbo instead of gpt-3.5-turbo-0613

* gpt4 not available if no open ai key
2023-08-07 16:35:23 +02:00
Mamadou DICKO
61cd0a6bde
feat(backend): add custom prompt (#885) 2023-08-07 16:31:00 +02:00
Stan Girard
6d74aea729
Revert "Revert "feat: remove private prompts on related brain delete (#842)" (#870)" (#876)
This reverts commit 6184dfadfe.
2023-08-07 10:15:38 +02:00
renovate[bot]
8eb564f5bc
chore(deps): update dependency openai to v0.27.8 (#867)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-07 10:11:48 +02:00
renovate[bot]
43597b53d8
chore(deps): update dependency strenum to v0.4.15 (#875)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-07 10:09:42 +02:00
renovate[bot]
9f02d9480d
chore(deps): update dependency sqlalchemy to v2.0.19 (#874)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-07 10:09:18 +02:00
renovate[bot]
d3bf1bb1a5
chore(deps): update dependency markdown to v3.4.4 (#866)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-07 10:08:09 +02:00
Stan Girard
10d4d65c1e
perf(deps): removed (#873) 2023-08-07 10:06:58 +02:00
Stan Girard
6184dfadfe
Revert "feat: remove private prompts on related brain delete (#842)" (#870)
This reverts commit 4c15fe2bfd.
2023-08-07 09:16:43 +02:00
Mamadou DICKO
4c15fe2bfd
feat: remove private prompts on related brain delete (#842)
* feat: remove private prompts on brain deletion

* ui: improve personnality picker
2023-08-07 08:13:03 +02:00
renovate[bot]
3ebfc6868f
chore(deps): update dependency pypdf to v3.9.0 [security] (#861)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-07 00:55:43 +02:00
Mamadou DICKO
b92d058fbe
test(backend): fix failing tests (#851) 2023-08-04 20:25:09 +02:00
Stan Girard
69e2c289e5
fix(pg-database): by default variable is not implemented (#848) 2023-08-04 10:17:26 +02:00
ChloeMouret
eaa574dd19
fix upload (#847) 2023-08-04 09:58:43 +02:00
ChloeMouret
711e9fb8c9
refactor: delete common_dependencies function (#843)
* use function for get_documents_vector_store

* use function for get_embeddings

* use function for get_supabase_client

* use function for get_supabase_db

* delete lasts common_dependencies
2023-08-03 20:24:42 +02:00
ChloeMouret
fdcdf581a8
refactor: clean backend, add typing, delete dead code (#835)
* type common dependencies

* delete unused code
2023-08-03 16:20:36 +02:00
Laurens Van Keer
659e585145
fix(chats): delete chats from correct table (#834) 2023-08-03 12:15:33 +02:00
Laurens Van Keer
68f03b2416
fix(chat routes): HTTPException import correction (#833)
* fix(chat routes): HTTPException import correction

Solves "TypeError: HTTPException() takes no keyword arguments"

* fix(chat routes): error in user id comparison in metadata endpoint

current_user.id is a UUID and must be converted to a string before comparison with the chat.user_id string
2023-08-03 12:11:25 +02:00
Mamadou DICKO
4ca6c667da
feat(backend): implement brain-prompt link (#831)
* feat: add prompt_id field to brain

* feat(Prompt controller): update prompt routes

* feat: remove unused private prompts

* refactor: add BrainEntity and repo and service

* tests: partially type main Repository

* feat: add PromptStatusEnum enum

* feat: change delete prompt repository return type
2023-08-03 10:37:13 +02:00
Mamadou DICKO
e3b6114248
feat(prompt): add prompt table, entity and repository (#823)
* feat: add prompts table

* feat: add Prompt entity

* feat: add prompt router

* refactor(promptRepository): use common reposority
2023-08-03 09:53:38 +02:00
Stan Girard
c21797905d
feat(prompt): added instructions in standalone question & a bit more things (#826)
* fix(backend): temperature signature

* feat(qa): fixed temperature question generator and added doc

* feat(prompt): added instructions to standalone question

* fix(brains-rights): fixed function missing
2023-08-02 10:31:42 +02:00
Noe
303ba72028
feat: Introduce repository pattern to prepare adding other database providers (#646)
* add sqlalchemy models

* add neon settings

* add insert brain

* abstract supabase from Brain class

* abstract supabase from Brain class

* abstract supabase from /models

* update Database to Repository

* update neon_tables to pg_tables

* update chat, api-key and message

* update vector class

* update settings

* update env vars for test

* Update backend-tests.yml

* fix test

* fix fetch_user_requests_count()

* fix fetch_user_requests_count()

* fix increment_user_request_count

* fix increment_user_request_count

* fix asset upload_response message

* fix pyright

* fix brain_subscription

* fix brain_subscription

* fix brain_subscription

* fix get user request stat

* update create_brain_user

* add delete brain vector and user

* add delete brain vector and user

* correctly call function

---------

Co-authored-by: Noé Pion <noe.pion@onfido.com>
Co-authored-by: raoufchebri <raouf@chebri.com>
Co-authored-by: Stan Girard <girard.stanislas@gmail.com>
2023-08-01 23:03:47 +02:00
Mamadou DICKO
edcbb30e97
fix: bugs (#818)
* feat: add chat config modal

* feat: save chat config in localStorage

* feat: remove <ConfigPage/>

* feat: overwrite chat config with brain

* fix(SettingsPage): upload payload keys

* fix: update default brain marker logic

* feat: set new created brain as current selected brain
2023-08-01 16:25:02 +02:00
Stan Girard
c01433c841 fix(openai): user key now used for llm model 2023-08-01 13:46:53 +02:00
Mamadou DICKO
7532b558c7
feat: add user level open ai key management (#805)
* feat: add user user identity table

* feat: add user openai api key input

* feat: add encryption missing message

* chore: log more details about 422 errors

* docs(API): update api creation path

* feat: use user openai key if defined
2023-08-01 09:24:57 +02:00
Stan Girard
3166d089ee
feat(chat): added streaming (#808)
* feat(tmp): added streaming

* feat(streaming): implemented by changing order
2023-07-31 21:34:34 +02:00
Stan Girard
db40f3cccd
feat(llm): removing all llms to prepare for genoss (#804)
* feat(routes): removed all except openai

* feat(deadcode): removed some deadcode and summarization feature that wasn't used

* feat(streaming): removed privateGPT from it

* chore(requirements): increased version
2023-07-31 16:01:34 +02:00
Mamadou DICKO
3529222b95
Brain management 4 (#762)
* feat: add <ApiKeyConfig/>

* feat(SDK): add update brain

* feat: add removeUndefined helper

* feat: remove unnecessary autofocus flag

* add brain settings tab

* ui: add tab delimitor

* feat: improve ux
2023-07-25 23:12:46 +02:00
Zineb El Bachiri
e05f25b025
Feat/update brain fields (#756)
* 🗃️ update and add fields in brains table

*  update endpoints for more brain attribute

*  new set as default brain endpoint

* 🔥 remove update brain with file

* ✏️ fix wrong  auto imports

* 🐛 fix max tokens for model in front

* 🚑 post instead of put to set default brain

* 🚑 update brain creation endpoint with new fields
2023-07-25 15:22:17 +02:00
Mamadou DICKO
25f859a31e
fix: make max_brain_size overwritable (#751) 2023-07-24 14:17:33 +02:00