Compare commits

...

995 Commits

Author SHA1 Message Date
Pavel
5a891647bf parser functions change
token_func proposed change to chunking. open_ai_func proposed change to embedding_pipeline. Late chunking first  implementation requires further testing.
2024-11-20 21:40:57 +04:00
Alex
9247f16add Merge pull request #1434 from RohittCodes/fix-1231
feat: wrapper modal
2024-11-20 10:48:30 +00:00
Alex
cce60ce101 fix: save convo messages, docsgpt provider format 2024-11-19 16:22:58 +00:00
Alex
250edf26a5 Update README.md 2024-11-17 15:01:39 +00:00
Alex
7a01376828 fix: remove more old files 2024-11-17 13:02:45 +00:00
Alex
63b547ea13 fix: delete old files 2024-11-17 12:59:34 +00:00
Alex
5971ff884e Merge pull request #1443 from siiddhantt/fix/streaming-old-answer
fix: old streaming answer gets appended to new conversation
2024-11-16 22:48:55 +00:00
rohittcodes
04959df194 refactor: upload 2024-11-16 19:45:22 +05:30
Siddhant Rai
47d687b151 fix: old streaming answer gets appended to new conversation 2024-11-16 17:13:15 +05:30
Alex
4443bc77fd Merge pull request #1441 from arc53/google-llm 2024-11-15 14:51:11 +00:00
Alex
144ab61e07 fix: ruff lint 2024-11-15 12:19:43 +00:00
Alex
a4c95fd62b feat: add google ai 2024-11-15 12:17:25 +00:00
Alex
2245f4690e fix: reddit loader validation 2024-11-15 11:02:27 +00:00
Alex
1decff2114 Merge pull request #1422 from fadingNA/multiple-files-bug
upload routes fix for multiple upload
2024-11-14 22:53:36 +00:00
Alex
c97968f6c0 Merge pull request #1439 from RohittCodes/fix-1438
refactor: loader-color
2024-11-14 22:22:52 +00:00
Alex
9deb5adcbf Merge pull request #1435 from mas-who/fix-add-prompt-modal
Improve UX for adding and editing prompts in the settings page
2024-11-14 17:31:28 +00:00
Nonthachai Plodthong
91e7c16d90 Merge branch 'main' into multiple-files-bug 2024-11-14 12:28:51 -05:00
Alex
edc81d8e6e Merge pull request #1385 from AkashJana18/fix/1219-message-box
fix: #1219 Too big top margin of message box separator
2024-11-14 16:52:59 +00:00
rohittcodes
ed8d553491 refactor: loader-color 2024-11-14 20:46:02 +05:30
Alex
a64a5e89db Merge pull request #1437 from siiddhantt/feat/chat-ui-enhancement
refactor: smooth answer appearance
2024-11-14 10:21:53 +00:00
Siddhant Rai
bd636d59dd refactor: smooth answer appearance 2024-11-14 15:35:22 +05:30
Mason Hu
f6e9f9011d fix: prevent saving prompt with same name as existing prompt 2024-11-13 15:28:16 +02:00
Mason Hu
2fe3cb2b22 fix: hide edit option for default prompts 2024-11-13 14:51:48 +02:00
Mason Hu
6b9519b56f fix: prevent previous prompt name and content from displaying when adding new prompt 2024-11-13 14:36:34 +02:00
Alex
9bbe7564a9 fix: llamacpp 2024-11-13 11:45:42 +00:00
rohittcodes
58af393968 feat: wrapper modal 2024-11-13 02:15:05 +05:30
Alex
bed4939652 Merge pull request #1419 from fadingNA/pagination
Pagination
2024-11-12 09:51:24 +00:00
Alex
ebf6109219 feat: medium size widget docs page 2024-11-11 22:53:00 +00:00
Alex
ad602f22c8 Merge pull request #1427 from ManishMadan2882/main
(fix:upload) UI enhance
2024-11-11 12:52:18 +00:00
ManishMadan2882
70f44fcaca (fix:upload) UI enhance 2024-11-11 18:16:52 +05:30
Alex
1f32e7cf82 Merge pull request #1426 from ManishMadan2882/main
React Widget v0.4.7
2024-11-11 10:55:59 +00:00
ManishMadan2882
00390200ec (updata:widget) v0.4.7 2024-11-11 16:08:43 +05:30
Alex
0a11a3afee fix: attribution link 2024-11-10 23:23:19 +00:00
Alex
9f77b03643 Merge pull request #1425 from arc53/feat/cooler-bounce
feat: widget bounciness
2024-11-10 22:18:36 +00:00
Alex
c6dc1675d8 fix: smoother animation on large modal close 2024-11-10 22:13:48 +00:00
Alex
e475a4cc7c fix: large size animation 2024-11-10 22:11:20 +00:00
Alex
dfc3cdd5d4 fix: open cooler morph 2024-11-10 21:53:10 +00:00
fadingNA
6974db5fd8 fix manage sync 2024-11-10 15:33:33 -05:00
fadingNA
32c67c2a02 add property sync and etc ... to align with original source 2024-11-10 15:33:19 -05:00
fadingNA
6c585de6d3 add paginated to store, and fix upload docs property 2024-11-10 14:53:52 -05:00
fadingNA
1056c943d3 fix remove button on navigation sidebar and setting/document 2024-11-10 14:39:56 -05:00
fadingNA
839f0a3b95 remove log on api, add paginatedDoc on redux 2024-11-10 14:39:20 -05:00
fadingNA
b19e9cae23 backend fix passing id to paginated docs 2024-11-10 14:38:51 -05:00
Alex
84a15ef54d fix: z-index sidebar bug 2024-11-10 19:38:48 +00:00
Alex
d4b409e166 fix: align buttons 2024-11-10 18:46:26 +00:00
Alex
ba1c0ab6fb fix: large closing 2024-11-10 16:36:14 +00:00
Alex
eddafcfdfb fix: morphing feel 2024-11-10 14:27:07 +00:00
fadingNA
8a225e279f multiple-file missing task ingest
restore upload to pack all file together instead one by one
2024-11-10 03:00:22 -05:00
fadingNA
d5cce88108 Merge branch 'main' of https://github.com/fadingNA/DocsGPT into multiple-files-bug 2024-11-10 01:55:12 -05:00
fadingNA
e00c6f2c14 add min width for delete button, dropdown dakrtheme 2024-11-09 16:59:00 -05:00
fadingNA
0837295bd3 fix table responsive issue 2024-11-09 16:24:21 -05:00
fadingNA
f3a005a667 remove params on getDocs 2024-11-09 14:57:30 -05:00
fadingNA
d59ffaf0bd fix sorting on /sources 2024-11-09 14:57:15 -05:00
Alex
e133c29b2c feat: widget bounciness 2024-11-09 18:46:31 +00:00
Alex
f64bf7daa0 Merge pull request #1424 from ManishMadan2882/main
React Widget: published v0.4.6
2024-11-09 13:24:07 +00:00
ManishMadan2882
ef24318c17 (upgrade:docs) widget version 2024-11-09 18:42:11 +05:30
ManishMadan2882
33fe0ffc93 (upgrade: widget) v0.4.6 2024-11-09 18:41:18 +05:30
Alex
243b036ae7 Merge pull request #1423 from ManishMadan2882/main
(feat: widget): smooth transitions
2024-11-09 13:04:46 +00:00
ManishMadan2882
06518c209a (feat:Widget) enhanced transition, buttonText param 2024-11-09 18:33:31 +05:30
fadingNA
3482474265 Pagination 2024-11-09 02:12:35 -05:00
fadingNA
5debb48265 Paginated With MongoDB / Create New Endpoint
change routes /combine name, add route /api/source/paginated
add new endpoint source/paginated
fixing table responsive
create new function to handling api/source/paginated
2024-11-09 02:09:01 -05:00
ManishMadan2882
84377eed07 (fix:widget) broken for modals 2024-11-09 00:44:56 +05:30
fadingNA
dd9589b37a fixing type error 2024-11-08 11:02:13 -05:00
ManishMadan2882
7c00099919 (feat: widget): smooth transitions 2024-11-08 19:21:19 +05:30
fadingNA
bc840900a3 change logically to upload file one by one instead of send all in one 2024-11-08 02:34:31 -05:00
fadingNA
4429755c09 add paramter type prevent warning lint 2024-11-07 23:23:01 -05:00
fadingNA
a2967afb55 adjust Setting/Document to use pagination data from backend 2024-11-07 23:22:28 -05:00
fadingNA
3d03826db5 add overload function to gettotalpage, and new type 2024-11-07 23:22:03 -05:00
fadingNA
7ff86a2aee remove default value since provide on getDocs 2024-11-07 23:21:26 -05:00
fadingNA
2a68cc9989 calculate totalPage, totalDoc(futreUse) 2024-11-07 23:21:06 -05:00
Alex
855365fba6 Merge pull request #1418 from ManishMadan2882/main
React Widget: udpated to v0.4.5
2024-11-07 10:18:16 +00:00
fadingNA
928303f27b fix small bug name of page 2024-11-06 22:36:59 -05:00
fadingNA
df2f69e85f adjust table of document with mx auto, add pagination to Documents Component 2024-11-06 22:33:26 -05:00
fadingNA
ec3407df7e add 2 fiels for make request to api/combine 2024-11-06 22:32:37 -05:00
fadingNA
5dae074c95 pagination component 2024-11-06 22:31:56 -05:00
fadingNA
a35be6ae57 add arrow icons for pagination 2024-11-06 22:31:41 -05:00
fadingNA
101935ae46 add pagination with default code format 2024-11-06 22:20:25 -05:00
fadingNA
d68e731ffd revert format code 2024-11-06 22:19:16 -05:00
fadingNA
bf0dd6946e add page, row_per_page to api/combine 2024-11-06 22:16:00 -05:00
fadingNA
41cbcbc07f fixing type on env-sample to .env-template 2024-11-06 22:15:35 -05:00
GH Action - Upstream Sync
73f93946b0 Merge branch 'main' of https://github.com/arc53/DocsGPT 2024-11-07 01:19:24 +00:00
ManishMadan2882
181d2504e5 (update:widget) v0.4.5 2024-11-07 02:45:28 +05:30
ManishMadan2882
b0423d987e (update:widget) v0.4.5 2024-11-07 02:45:07 +05:30
ManishMadan2882
9157fe7323 fix(widget): avoid external css override 2024-11-07 02:39:56 +05:30
Alex
e02718947a Merge pull request #1416 from siiddhantt/fix/sources-pending
fix: pending sources even when no sources provided
2024-11-06 16:27:22 +00:00
Siddhant Rai
ebbd47c9cb fix: pending sources even when no sources provided 2024-11-06 21:34:57 +05:30
ManishMadan2882
ad810b3740 (widget): footer tagline 2024-11-06 17:20:12 +05:30
Alex
c3e85d747a Merge pull request #1415 from ManishMadan2882/main
React Widget update - v0.4.4
2024-11-06 11:09:19 +00:00
ManishMadan2882
8e092cbe1c (docs): update widget 2024-11-06 16:32:30 +05:30
ManishMadan2882
9a35609bc7 upgrade(widget): version 0.4.4 2024-11-06 16:30:33 +05:30
Alex
7fed92d6b3 Merge pull request #1407 from zc277584121/main
fix milvus issues
2024-11-06 10:33:27 +00:00
Alex
1f52461cd9 Merge pull request #1414 from ManishMadan2882/main
React widget: Exacting the design
2024-11-06 10:32:18 +00:00
AkashJana18
fe16743d16 fix/scrollbar in input textarea 2024-11-06 12:39:38 +05:30
ChengZi
7fd8e57bdc remove milvus dependency from req.txt
Signed-off-by: ChengZi <chen.zhang@zilliz.com>
2024-11-06 10:30:18 +08:00
GH Action - Upstream Sync
ed6cd9890a Merge branch 'main' of https://github.com/arc53/DocsGPT 2024-11-06 01:01:16 +00:00
ManishMadan2882
f876f9e20e (fix:widget): perfecting design 2024-11-06 05:11:41 +05:30
Alex
62b15f2d6f Merge pull request #1389 from ayaan-qadri/main
Added custom size and Default widget open in <DocsGPTWidget />
2024-11-05 11:23:25 +00:00
Alex
89529f4df5 Merge pull request #1408 from ManishMadan2882/main
Adding sorting in documents, minor UI changes
2024-11-05 11:17:04 +00:00
ManishMadan2882
042519005c fix(all sources): text overflows 2024-11-05 01:36:54 +05:30
ManishMadan2882
7e24995afe fix(nav): minor ui 2024-11-05 00:48:12 +05:30
ManishMadan2882
877b165a9a (feat:docs) sort 2024-11-05 00:44:02 +05:30
ayaan-qadri
64f72ada28 Added sizesConfig for controlling sizes(large, medium, small and custom) from one point 2024-11-04 16:55:49 +05:30
ChengZi
171916e1a4 fix milvus issues
Signed-off-by: ChengZi <chen.zhang@zilliz.com>
2024-11-04 17:58:56 +08:00
Alex
dbfc1bb68f Update labeler.yml 2024-11-03 21:22:34 +00:00
Alex
5d4c067d80 Merge pull request #1394 from arc53/dependabot/github_actions/docker/build-push-action-6
build(deps): bump docker/build-push-action from 4 to 6
2024-11-03 18:39:07 +00:00
Alex
3f10a775ba Merge pull request #1395 from arc53/dependabot/github_actions/docker/setup-qemu-action-3
build(deps): bump docker/setup-qemu-action from 1 to 3
2024-11-03 18:38:48 +00:00
Alex
2f05a47de3 Merge pull request #1396 from arc53/dependabot/github_actions/actions/labeler-5
build(deps): bump actions/labeler from 4 to 5
2024-11-03 18:38:05 +00:00
Alex
9ca079c95a feat: elevenlabs tts 2024-11-02 16:43:28 +00:00
AkashJana18
2d37083719 minor changes 2024-11-02 11:22:39 +05:30
GH Action - Upstream Sync
0b890e1d70 Merge branch 'main' of https://github.com/arc53/DocsGPT 2024-11-01 01:38:22 +00:00
Alex
0bb014c965 Update README.md 2024-10-31 22:24:42 +00:00
Alex
0684449c2a Update lexeu-competition.md 2024-10-31 22:24:19 +00:00
Alex
a23806d16a Merge pull request #1405 from JeevaRamanathan/feature/file-pptx_parser
feat: `.pptx` Presentation parser implementation
2024-10-31 18:01:01 +00:00
Alex
0b7be94d13 fix: dependecy version 2024-10-31 17:56:32 +00:00
Alex
4ac996cfe6 Merge pull request #1382 from shatanikmahanty/fix-safari-font
Fix: Fonts on Safari browser
2024-10-31 17:34:14 +00:00
Alex
78c819f976 fix: history bug 2024-10-31 17:33:09 +00:00
Alex
365537f74e Merge pull request #1362 from CBID2/add-edit-buttons
feat: add edit buttons
2024-10-31 14:55:23 +00:00
JeevaRamanathan M
5c756348a5 feat: Presentation parser implementation
Signed-off-by: JeevaRamanathan M <jeevaramanathan.m@infosys.com>
2024-10-31 11:47:12 +00:00
Alex
ed12c2d527 Merge pull request #1335 from kom-senapati/feature/mongodb-connection-refactor
refactor: use MongoDB singleton for connection management
2024-10-31 11:36:01 +00:00
Alex
82189b0a3c capitalisation 2024-10-31 11:32:39 +00:00
Alex
23889f7f16 Minor word change 2024-10-31 11:32:17 +00:00
Alex
45e14bc2f5 Merge pull request #1386 from AranavMahalpure/patch-1
Update run-with-docker-compose.sh
2024-10-31 11:18:23 +00:00
GH Action - Upstream Sync
0746f30645 Merge branch 'main' of https://github.com/arc53/DocsGPT 2024-10-31 01:25:45 +00:00
Alex
daedfc0a57 Merge pull request #1403 from arc53/discord-fix
fix: bot chunking
2024-10-30 15:28:09 +00:00
Alex
2cc3372b86 fix: bot chunking 2024-10-30 15:27:14 +00:00
Alex
e024452610 Merge pull request #1402 from arc53/discord-fix
fix: slightly better discord bot formatting
2024-10-30 15:18:54 +00:00
Alex
06e4a05e41 fix: slightly better discord bot formatting 2024-10-30 15:17:37 +00:00
Alex
256514fefc Merge pull request #1401 from arc53/discord-fix
fix: discord bot
2024-10-30 13:18:25 +00:00
Alex
3f64ff8194 fix: discord bot 2024-10-30 12:59:28 +00:00
Alex
af2cef1bfc Merge pull request #1381 from Srayash/feature-TTS
Feature: Added Text-To-Speech Functionality
2024-10-30 10:56:33 +00:00
Alex
3be74b1fdd Merge pull request #1343 from JeevaRamanathan/enhancement/conversation-loading-state
Enhancement: Added loading state for conversation list
2024-10-30 10:55:40 +00:00
GH Action - Upstream Sync
e2a705806a Merge branch 'main' of https://github.com/arc53/DocsGPT 2024-10-30 01:24:58 +00:00
Srayash
5c99615edf UI changes: add loading animation while audio response is being fetched 2024-10-30 00:03:08 +05:30
Srayash
605f168c7e remove unused modules (easy-speech) 2024-10-29 23:51:25 +05:30
Srayash
b223cf05d9 use /api/tts endpoint for TTS feature 2024-10-29 23:36:09 +05:30
Srayash
419b98b50f Merge branch 'arc53:main' into feature-TTS 2024-10-29 23:01:12 +05:30
Shatanik Mahanty
b99b3b844a Merge branch 'arc53:main' into fix-safari-font 2024-10-29 21:48:01 +05:30
Alex
d9787e849e Merge pull request #1384 from ManishMadan2882/main
Fix: empty doc selection in /stream
2024-10-29 10:11:22 +00:00
Alex
631e77ce65 Merge pull request #1397 from arc53/tts
Add endpoint for Text-To-Speech conversion
2024-10-29 09:57:57 +00:00
ManishMadan2882
7ff3a31e72 (feat:TTS) create gtts over abstraction 2024-10-29 03:11:51 +05:30
dependabot[bot]
331dfdbab4 build(deps): bump actions/labeler from 4 to 5
Bumps [actions/labeler](https://github.com/actions/labeler) from 4 to 5.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 21:07:28 +00:00
dependabot[bot]
c83ff2237c build(deps): bump docker/setup-qemu-action from 1 to 3
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v1...v3)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 21:07:26 +00:00
dependabot[bot]
9972435525 build(deps): bump docker/build-push-action from 4 to 6
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 21:07:25 +00:00
ayaan-qadri
409d0e4084 Added custom size N Default widget open in <DocsGPTWidget /> 2024-10-29 01:19:47 +05:30
kom-senapati
18ed255f5a fix: import settings object of Settings class in mongo_db.py 2024-10-28 19:30:38 +05:30
Srayash
4a8e9bf04e Enhancement: Switched to easy-speech from webspeechAPI.
Enhancement: Switched to easy-speech from webspeechAPI.
2024-10-28 02:56:02 +05:30
Srayash
0b1a302995 Update package.json 2024-10-28 02:53:51 +05:30
Srayash
6978e7439f Update package-lock.json 2024-10-28 02:53:07 +05:30
Srayash
fcb6bec474 Update TextToSpeechButton.tsx 2024-10-28 02:52:13 +05:30
Srayash
91690ff99a Resize speaker icon. 2024-10-27 23:02:52 +05:30
Arnav Mahalpure
45f930a9e2 Update run-with-docker-compose.sh
Source Environment Variables:

source .env loads environment variables from the .env file, making them available within the script.
Conditional Check for Azure Configuration:

The if condition checks if all required Azure variables are set (non-empty).
If they are, it runs Docker Compose with docker-compose-azure.yaml.
Otherwise, it defaults to the standard configuration with docker-compose.yaml.
Build and Run Services:

Depending on the condition, the script either builds and runs services with Azure settings (docker-compose-azure.yaml) or the standard configuration (docker-compose.yaml).
2024-10-27 14:53:47 +05:30
Srayash
09a1879f3e Merge branch 'arc53:main' into feature-TTS 2024-10-27 10:46:36 +05:30
AkashJana18
4bc14dbdd0 fix: 1219 2024-10-27 02:46:27 +05:30
ManishMadan2882
1627d424e7 Merge branch 'main' of https://github.com/ManishMadan2882/docsgpt 2024-10-27 01:28:12 +05:30
ManishMadan2882
0aa9da39a9 fix(isNoneDoc): empty doc assumed as default 2024-10-27 01:27:59 +05:30
shatanikmahanty
8564c2ba72 Fix: Fonts on Safari browser 2024-10-26 22:00:22 +05:30
Alex
1c791f240a Merge pull request #1377 from JeevaRamanathan/feature/file-json
feat: JSON Parser Implementation
2024-10-26 17:28:57 +01:00
Alex
bea0ccaa6c Merge pull request #1337 from Devparihar5/fix-github
fix:GitHubLoader to Handle Binary Files
2024-10-26 16:59:02 +01:00
Srayash
05f756963c Feature: Added Text-To-Speech Functionality 2024-10-26 03:29:54 +05:30
JeevaRamanathan
54ad6ad1c7 Merge branch 'main' into feature/file-json 2024-10-25 16:47:09 +05:30
Alex
c44ff77e09 Merge pull request #1349 from JeevaRamanathan/issue/file_type
hotfix: Added missing file extension `.xlsx` for file processing and recognition
2024-10-25 10:08:27 +01:00
JeevaRamanathan M
c77d415893 feat: JSON parser implementation
Signed-off-by: JeevaRamanathan M <jeevaramanathan.m@infosys.com>
2024-10-24 20:36:47 +00:00
Alex
92c9612dee Merge pull request #1375 from marceloams/fix/help-is-not-aligned-with-settings-1374
Fix alignment of the help button in the navigation bar
2024-10-24 14:59:05 +01:00
Marcelo Amorim
b40417fcfe (#1374) Fix alignment of the help button in the navigation bar 2024-10-23 22:00:31 -03:00
Alex
13c890b212 Merge pull request #1300 from AkashJana18/table-redsign
Feature: Table redesign
2024-10-23 22:59:44 +01:00
Alex
741ab6e43c Merge pull request #1363 from lakshmi930/ln/fix-like-hover-dark
Fix like hovering state in dark mode
2024-10-23 22:57:31 +01:00
Alex
3db46ecd68 Merge pull request #1372 from lakshmi930/ln/fix-discord-icon
Fix Discord icon
2024-10-23 22:53:41 +01:00
Lakshmi N
a972bb8827 Merge branch 'arc53:main' into ln/fix-discord-icon 2024-10-23 14:53:38 +01:00
Lakshmi N
2e4e080329 Merge branch 'arc53:main' into ln/fix-like-hover-dark 2024-10-23 14:53:23 +01:00
lakshmi930
5fe4c40ec1 Fix lint 2024-10-23 14:50:56 +01:00
AkashJana18
d18cb373fc error fixed 2024-10-23 18:56:08 +05:30
AkashJana18
1b1771e4eb Merge remote-tracking branch 'upstream/main' into table-redsign 2024-10-23 18:17:15 +05:30
Alex
51e450cc4b Update README.md 2024-10-23 10:20:25 +01:00
Akash Jana
67a97a7e51 Merge branch 'main' into table-redsign 2024-10-23 12:33:14 +05:30
JeevaRamanathan M
1e88c86378 updated loader state
Signed-off-by: JeevaRamanathan M <jeevaramanathan.m@infosys.com>
2024-10-22 23:34:32 +00:00
JeevaRamanathan M
fcb5f946dd fixed according to suggestion
Signed-off-by: JeevaRamanathan M <jeevaramanathan.m@infosys.com>
2024-10-22 22:37:56 +00:00
JeevaRamanathan
2e69e9bef3 Merge branch 'main' into enhancement/conversation-loading-state 2024-10-23 03:30:13 +05:30
Alex
88623754cf Merge pull request #1370 from arc53/dependabot/github_actions/actions/setup-python-5
Bump actions/setup-python from 4 to 5
2024-10-22 19:34:51 +01:00
Alex
886bcef7b0 Merge pull request #1369 from arc53/dependabot/github_actions/docker/setup-buildx-action-3
Bump docker/setup-buildx-action from 1 to 3
2024-10-22 19:34:36 +01:00
Alex
cc414da744 Merge pull request #1365 from arc53/dependabot/npm_and_yarn/docs/mermaid-10.9.3
Bump mermaid from 10.6.1 to 10.9.3 in /docs
2024-10-22 19:34:17 +01:00
dependabot[bot]
6e88ecc2da Bump actions/setup-python from 4 to 5
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-22 18:33:10 +00:00
dependabot[bot]
88d2420163 Bump docker/setup-buildx-action from 1 to 3
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-22 18:32:59 +00:00
Alex
7e71ee1aae Merge pull request #1368 from arc53/dependabot/github_actions/docker/login-action-3
Bump docker/login-action from 2 to 3
2024-10-22 19:32:09 +01:00
Alex
c6d78e27c6 Merge pull request #1367 from arc53/dependabot/github_actions/actions/checkout-4
Bump actions/checkout from 3 to 4
2024-10-22 19:31:46 +01:00
Alex
b6d06dcfc3 Merge pull request #1366 from arc53/dependabot/github_actions/codecov/codecov-action-4
Bump codecov/codecov-action from 3 to 4
2024-10-22 19:31:08 +01:00
dependabot[bot]
756c46c026 Bump docker/login-action from 2 to 3
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-22 18:22:16 +00:00
dependabot[bot]
5afba6e30f Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-22 18:22:14 +00:00
dependabot[bot]
02a23a65e7 Bump codecov/codecov-action from 3 to 4
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-22 18:22:12 +00:00
Alex
e7de16833d Merge pull request #1333 from Juneezee/gh-actions-dependabot
Configure Dependabot for GitHub Actions
2024-10-22 19:21:23 +01:00
dependabot[bot]
990c6d1c64 Bump mermaid from 10.6.1 to 10.9.3 in /docs
Bumps [mermaid](https://github.com/mermaid-js/mermaid) from 10.6.1 to 10.9.3.
- [Release notes](https://github.com/mermaid-js/mermaid/releases)
- [Changelog](https://github.com/mermaid-js/mermaid/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/mermaid-js/mermaid/compare/v10.6.1...v10.9.3)

---
updated-dependencies:
- dependency-name: mermaid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-22 18:20:50 +00:00
Alex
f78a8c6fea Merge pull request #1346 from mousumi2002/feat/slack_bot
Add slack integration
2024-10-22 16:25:25 +01:00
AkashJana18
5580d19b75 table redesign 2024-10-22 20:41:18 +05:30
Mousumi Pal
c035e3c7c6 Refactor: Remove source_id from payload 2024-10-22 18:59:07 +05:30
kom-senapati
1502adfb85 Merge branch 'feature/mongodb-connection-refactor' of https://github.com/kom-senapati/DocsGPT into feature/mongodb-connection-refactor 2024-10-22 18:03:49 +05:30
kom-senapati
3b76b3ddce fix: Settings import 2024-10-22 18:03:46 +05:30
kom-senapati
e4a1730a5b fix: MongoDB imports 2024-10-22 17:58:41 +05:30
lakshmi930
4aa66170c5 Fix discord icon 2024-10-22 00:03:55 +01:00
lakshmi930
24352b56af Fix like hovering state in dark mode 2024-10-21 23:41:30 +01:00
Christine
cbea17b4d5 feat: add edit buttons
Signed-off-by: Christine <shecoder30@gmail.com>
2024-10-21 20:52:44 +00:00
Alex
4dd0d65db4 Update holopin.yml 2024-10-21 16:23:46 +01:00
Alex
cdfdcc7d03 Update holopin.yml 2024-10-21 16:08:01 +01:00
Alex
b4082b2cfa Merge pull request #1356 from ManishMadan2882/main 2024-10-21 16:37:59 +02:00
ManishMadan2882
fae3cfc58f (help): update support email 2024-10-21 19:56:00 +05:30
ManishMadan2882
ad038784cc (extensions): version update to 0.4.3 2024-10-21 19:55:13 +05:30
ManishMadan2882
7e69dd5ff0 (extensions): version update to 0.4.3 2024-10-21 19:54:59 +05:30
Alex
8720ec65ab Merge pull request #1330 from Niharika0104/Fixes-1292
Fixes - 1292
2024-10-21 15:46:33 +02:00
Alex
3098f99eba Merge pull request #1354 from sayanm16/fix/api-key-list-state
Fix/api key list state
2024-10-21 15:43:50 +02:00
Alex
98b90b82c4 Merge pull request #1355 from Srayash/Srayash/issue#1283
Bug Fix: react web widget prints undefined before printing an answer.
2024-10-21 15:42:10 +02:00
Mousumi Pal
01268a37e3 Remove commented out history fetch operation 2024-10-21 16:49:01 +05:30
sayanm16
0c46f3c205 Remove log 2024-10-21 16:25:19 +05:30
sayanm16
b442cc186a Fix: Handle json correctly on delete response recieved 2024-10-21 16:24:41 +05:30
Srayash
2353276aa7 Bug Fix:react rect web widget prints undefined before printing an answer 2024-10-21 16:21:16 +05:30
JeevaRamanathan M
8c034d3e78 Added missing file extensions
Signed-off-by: JeevaRamanathan M <jeevaramanathan.m@infosys.com>
2024-10-20 21:23:49 +00:00
Alex
2c25f4a4c0 Merge pull request #1345 from ManishMadan2882/main
Bug fix: /api/share route
2024-10-20 20:43:39 +02:00
Alex
d2a988a715 Merge pull request #1339 from Prathamesh010/docsgpt-help
fix: help button margin
2024-10-20 18:35:58 +02:00
Mousumi Pal
bd12eac145 Create Readme and update gitignore 2024-10-20 21:39:46 +05:30
mousumi
ebc44273c9 Add slack integration 2024-10-20 11:15:17 +05:30
ManishMadan2882
b781d78cc6 fix(shared conv): bug fix 2024-10-20 02:11:22 +05:30
Alex
3f7c8bdba5 Merge pull request #1122 from akashAD98/feature_n/lancedb
Feature n/lancedb
2024-10-19 16:22:47 +01:00
Alex
fd8e277530 Merge branch 'main' into feature_n/lancedb 2024-10-19 16:22:39 +01:00
JeevaRamanathan M
6a024b0ced update catch block 2024-10-19 04:46:46 +00:00
JeevaRamanathan M
a185b2a12a retaining original state 2024-10-19 04:45:00 +00:00
JeevaRamanathan M
2366c2cd94 enhancement: added loading state for conversation 2024-10-19 04:24:14 +00:00
Prathamesh Gawas
567c01e302 fix: help button margin 2024-10-18 11:19:02 +00:00
Niharika Goulikar
b3d2c1a5d1 Merge branch 'main' into Fixes-1292 2024-10-18 16:47:34 +05:30
Niharika Goulikar
7b3ecb5c2f resolving merge conflicts 2024-10-18 11:09:40 +00:00
Niharika Goulikar
f4abed43ba resolved merge conflicts 2024-10-18 10:31:53 +00:00
Niharika Goulikar
5854202f22 Fixed the redux state changes 2024-10-18 09:55:33 +00:00
devendra.parihar
d3238de8ab fix: lint error 2024-10-18 12:23:17 +05:30
devendra.parihar
09a2705311 fix:GitHubLoader to Handle Binary Files 2024-10-18 12:08:08 +05:30
devendra.parihar
a4c0861cf4 fix:GitHubLoader to Handle Binary Files 2024-10-18 12:07:44 +05:30
kom-senapati
5ba917c5e4 chore: remove unused imports 2024-10-18 09:22:27 +05:30
kom-senapati
83f2fb1e62 refactor: Use MongoDB singleton for connection management 2024-10-18 09:18:15 +05:30
Alex
7bf79675c1 Merge pull request #1233 from JeevaRamanathan/fix/1227-share_button
fix: share button available in mobile view
2024-10-17 23:55:10 +01:00
Eng Zer Jun
f33aa9c71b Configure Dependabot for GitHub Actions
Reference: https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2024-10-17 22:32:46 +08:00
Niharika Goulikar
ac1c21c784 Merge branch 'arc53:main' into Fixes-1292 2024-10-17 10:07:48 +05:30
Niharika Goulikar
1757ce23af Removed newChatIcon when current converstation has no queries 2024-10-17 04:35:38 +00:00
Alex
3f1bae3044 Merge pull request #1321 from Juneezee/refactor/share-conversation-isPromptable-parse
refactor(user/routes): simplify parsing of isPromptable
2024-10-17 00:41:40 +01:00
Alex
20bd7ca2cc Merge pull request #1297 from RohittCodes/fix-1291
fix: height for md-devices
2024-10-17 00:41:14 +01:00
AkashJana18
a2b0204a95 Add new button triggers modal 2024-10-17 01:01:17 +05:30
AkashJana18
f7063d03f1 added search funtionality 2024-10-17 00:40:44 +05:30
Alex
9be3043e0f Merge pull request #1188 from prathamesh424/main
Reusable  Attractive  Skeleton  Loader Component is  added  [Fixes #1181]
2024-10-16 00:29:08 +01:00
Niharika Goulikar
4aeeaf185c Made ui/ux changes 2024-10-15 16:43:00 +00:00
Prathamesh Gursal
a25d5d98a4 package installed 2024-10-15 21:23:32 +05:30
Prathamesh Gursal
973304e0d7 changes 2024-10-15 21:11:00 +05:30
Prathamesh Gursal
590a735f99 conflict fixing 2024-10-15 21:10:37 +05:30
Alex
42185a011b Merge pull request #1306 from ayaan-qadri/main
Solved / #1294
2024-10-15 12:14:46 +01:00
Alex
e7b872a5df Merge pull request #1319 from Mayurakshi-mondal/chore/upgrade-python-deps-for-duckduckgo
Upgrade duck duck go dependency constraints
2024-10-15 12:05:36 +01:00
Alex
2bf75c36e4 Merge pull request #1314 from Mayurakshi-mondal/issues/1313
Fix: Pass retriever name to streaming api
2024-10-15 11:58:36 +01:00
Alex
bcd9005b53 Merge pull request #1308 from fadingNA/caching-docsgpt
Caching docsgpt
2024-10-15 11:56:30 +01:00
Alex
cca6297a64 fix: tests 2024-10-15 11:52:33 +01:00
Alex
39e94d4a5e fix: docker compose config 2024-10-15 11:37:11 +01:00
Alex
204b1b1963 fix: add singleton, logging, connection handle 2024-10-15 11:35:37 +01:00
Mayurakshi Mondal
b2e45e8af3 Merge branch 'arc53:main' into chore/upgrade-python-deps-for-duckduckgo 2024-10-15 14:56:45 +05:30
Mayurakshi Mondal
27797581ba Merge branch 'arc53:main' into issues/1313 2024-10-15 14:56:20 +05:30
GH Action - Upstream Sync
a797801d4c Merge branch 'main' of https://github.com/arc53/DocsGPT 2024-10-15 01:24:54 +00:00
Alex
d7c09e3493 Merge pull request #1326 from ManishMadan2882/main
Minor UI adjustments in Navigation > Help
2024-10-14 22:41:21 +01:00
ManishMadan2882
085542c861 feat(help): sync locales 2024-10-15 02:33:20 +05:30
ManishMadan2882
7ccd74b022 fix(help): ui 2024-10-15 02:05:25 +05:30
Eng Zer Jun
047afeebb6 refactor(user/routes): simplify parsing of isPromptable
We can use the `inputs.boolean` from flask-restx [1] to parse boolean
for us.

[1]: https://flask-restx.readthedocs.io/en/latest/api.html?highlight=boolean#flask_restx.inputs.boolean

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2024-10-15 01:37:59 +08:00
Mayurakshi Mondal
a6eab324b8 Merge branch 'arc53:main' into issues/1313 2024-10-14 23:01:21 +05:30
Mayurakshi Mondal
74a11da9bd Merge branch 'arc53:main' into chore/upgrade-python-deps-for-duckduckgo 2024-10-14 23:01:01 +05:30
Mayurakshi
473cd79af1 Upgrade duck duck go dependency constraints 2024-10-14 22:27:02 +05:30
fadingNA
b3c075714c restore lock json 2024-10-14 12:32:18 -04:00
fadingNA
f5661b3b1e add comment and align time from gen and stream to 30mins 2024-10-14 12:09:13 -04:00
fadingNA
8ce1fd561d adapt test case to align with function 2024-10-14 11:54:36 -04:00
fadingNA
adb2cf35d4 add redis mock to anthropic and sagemaker 2024-10-14 11:54:22 -04:00
fadingNA
3e32724729 change the method to save the whole conversation history instead of one msg 2024-10-14 11:53:52 -04:00
JeevaRamanathan
b59aa2f3e7 Merge branch 'main' into fix/1227-share_button 2024-10-14 21:11:48 +05:30
Alex
44405b250c Merge pull request #1213 from sccalabr/1204
Replacing About with a Help dropdown that has contact and documentati…
2024-10-14 15:57:48 +01:00
Alex
2b547f71f4 Merge pull request #1316 from shelar1423/main
DocsGPT DEMO UPDATED
2024-10-14 15:09:30 +01:00
Digvijay Shelar
56e3a1c3b2 DocsGPT DEMO UPDATED 2024-10-14 17:08:47 +05:30
Mayurakshi
644a66c983 Fix: Pass retriever name to streaming api 2024-10-14 16:53:40 +05:30
sccalabr
5f62c0d57a fixing look 2024-10-13 09:34:32 -07:00
JeevaRamanathan
c440e6f8fa fixed overlapping 2024-10-13 15:32:17 +05:30
JeevaRamanathan
706bd6126a Merge branch 'arc53:main' into fix/1227-share_button 2024-10-13 14:00:16 +05:30
ayaan-qadri
f8544cf14b Added Scrollbar visible when popup is opened 2024-10-13 10:42:35 +05:30
fadingNA
a8bb992569 add possible scenario test case 2024-10-12 18:05:54 -04:00
fadingNA
ddafb96eba adapt cache and add proper comment docs string 2024-10-12 18:05:40 -04:00
fadingNA
1dfb5d29c3 remove unused import from previous cache 2024-10-12 18:05:07 -04:00
fadingNA
3c64abceb8 improve abstract for caching streaming 2024-10-12 15:25:36 -04:00
fadingNA
3c43b87e9f adding time for perform streaming response 2024-10-12 15:25:06 -04:00
fadingNA
d7fe1150dc cache.py for holding help function use on BASE ABC 2024-10-12 10:55:52 -04:00
fadingNA
3e55be910b hashlib helper to gen cachekey 2024-10-12 10:47:33 -04:00
fadingNA
1ae0af56cc add new feature for handling decorator cache , token 2024-10-12 10:47:10 -04:00
fadingNA
b329ede52a add redis configuration 2024-10-12 10:46:37 -04:00
akashmangoai
a9f6a06446 lazy import & fixed other issue 2024-10-11 22:58:18 +05:30
akashmangoai
24383997ef removed cloud based parameter which are not needed 2024-10-11 21:53:29 +05:30
penw0lf
48ec0ae44c Solved / #1294 2024-10-11 21:42:49 +05:30
sccalabr
ea49095b0a Addressing comments 2024-10-11 08:47:38 -07:00
Alex
f3ff3920d9 Merge pull request #1299 from shatanikmahanty/feat/check_docker_daemon_running
Feat: Add ability to start docker if it's not running
2024-10-11 15:27:06 +01:00
AkashJana18
3e20934e20 Added search bar and button 2024-10-11 12:15:51 +05:30
shatanikmahanty
ec5db5d2c7 Refactor: remove docker start script for windows platform 2024-10-11 11:50:18 +05:30
shatanikmahanty
cc25b5e856 Feat: Add ability to start docker if it's not running 2024-10-11 11:37:12 +05:30
rohittcodes
c06f232589 fix: height for md-devices 2024-10-11 09:14:09 +05:30
sccalabr
e1a8184c2e Fixing build issues 2024-10-10 11:33:13 -07:00
sccalabr
fc24eb08cb Changing dropdown to support not going off screen. 2024-10-10 11:33:13 -07:00
sccalabr
345ab8ea9e Addressing comments and using dropdown instead of button 2024-10-10 11:33:13 -07:00
Alex
65547bad87 Merge pull request #1288 from AkashJana18/tab-redesign
🚀 Feature: Tabs in settings redesign
2024-10-10 18:13:46 +01:00
Prathamesh Gursal
4402442e54 updated chatbot loader 2024-10-10 21:00:31 +05:30
Alex
5bfd7d5e6c Merge pull request #1274 from RohittCodes/fix-1210
fix upload
2024-10-10 10:42:13 +01:00
Alex
09537ec0dd Merge pull request #1235 from ovindu-a/issue-1230
Fix formatting of mobile retry button
2024-10-09 23:02:06 +01:00
rohittcodes
5ad4ba6abd wait text-color 2024-10-10 01:56:32 +05:30
rohittcodes
4decb34f99 Merge branch 'main' of https://github.com/RohittCodes/DocsGPT into fix-1210 2024-10-10 01:54:20 +05:30
AkashJana18
947014945f feat:hover-effect for better UI/UX 2024-10-09 21:23:03 +05:30
Ovindu Atukorala
b6710beadc Conditionally render retry button 2024-10-09 10:26:17 +00:00
Alex
c2c5f07ffa Merge pull request #1249 from shatanikmahanty/patch-1
Update localhost port to 3000 in readme
2024-10-09 10:13:30 +01:00
Alex
95a60adfcc Update lexeu-competition.md 2024-10-09 10:10:44 +01:00
Alex
59eeb73b60 Update HACKTOBERFEST.md 2024-10-09 10:09:14 +01:00
Alex
0173a4d7fa Update CONTRIBUTING.md 2024-10-09 10:07:01 +01:00
Alex
e2e7ee1893 Merge pull request #1281 from ANDROIDHASSAN/patch-1
Update lexeu-competition.md
2024-10-09 10:03:01 +01:00
Hassan Kazi - Web Dev / Software Engineer
58dfc58622 Update lexeu-competition.md
I have corrected the spelling of gather in the documentation
2024-10-09 14:15:41 +05:30
rohittcodes
c8bfc52fab fix gap b/w buttons 2024-10-09 06:11:36 +05:30
rohittcodes
3e50fe1aa9 fix button-color 2024-10-09 05:51:21 +05:30
rohittcodes
e7c760e68b Merge branch 'main' of https://github.com/RohittCodes/DocsGPT into fix-1210 2024-10-09 05:40:13 +05:30
Alex
fa9ca221b4 Merge pull request #1042 from PeterDaveHelloKitchen/Add-zhTW-locale
Add Traditional Chinese(zhTW) locale
2024-10-08 23:33:32 +01:00
Alex
cff76c672c Merge pull request #1280 from yeger00/Fix-typos
Fix some typos
2024-10-08 23:30:47 +01:00
Alex
2395785337 Merge pull request #1279 from mousumi2002/issues/1262
Fix: Prevent flash on dark theme
2024-10-08 23:30:00 +01:00
Alex
862ea5fa36 Merge pull request #1278 from anasKhafaga/feat/ci-enable-images-tagging
Feat(273): CI enable images tagging
2024-10-08 23:26:23 +01:00
Alex
aa0964d99f Merge pull request #1263 from utin-francis-peter/fix/issue#1261
Remove Icon Next to Question Bubble and Label Change
2024-10-08 23:18:36 +01:00
Prathamesh Gursal
5b5281e50c added customize loader for each section 2024-10-09 01:28:54 +05:30
Peter Dave Hello
8bcf7bdade Add Traditional Chinese(zhTW) locale 2024-10-09 03:22:53 +08:00
GURSAL PRATHAMESH APPASAHEB
57cfafeb34 Merge branch 'arc53:main' into main 2024-10-09 00:32:11 +05:30
yeger00
5ea8706ba9 Fix some typos 2024-10-08 21:11:21 +03:00
Mousumi Pal
68f497517d Merge branch 'arc53:main' into issues/1262 2024-10-08 23:00:29 +05:30
Mousumi Pal
8308bd0039 Fix: Prevent flash in dark mode 2024-10-08 23:00:11 +05:30
Anas Khafaga
b7f00324bc feat(CI): Build docker images 2024-10-08 18:37:53 +03:00
Anas Khafaga
77f5328ab9 feat(CI): Build docker images for development purposes 2024-10-08 18:37:38 +03:00
Alex
bb82b9a9d3 Merge pull request #1277 from arc53/fix-paths-2 2024-10-08 16:20:21 +01:00
Alex
355fd2b5d7 fix: file check 2024-10-08 15:56:48 +01:00
Ovindu Atukorala
1e6cc95f09 Replace copy icon with retry icon 2024-10-08 12:17:21 +00:00
utin-francis-peter
bb8b4cae79 style: adjusted left padding in ConversationTile 2024-10-08 12:36:36 +01:00
rohittcodes
faef061d74 fix upload 2024-10-08 17:04:53 +05:30
utin-francis-peter
62af7549c7 chore: removed mssg icon that's beside a conversationTile name 2024-10-08 10:34:22 +01:00
utin-francis-peter
04b4db763c chore: updated lang variant of "Source" across locales 2024-10-08 10:18:55 +01:00
utin-francis-peter
c95b4d1305 Revert "chore: rm icon next to question bubble"
This reverts commit 565b0c5a9c.
2024-10-08 10:12:06 +01:00
Shatanik Mahanty
40b8aa42cc Merge branch 'arc53:main' into patch-1 2024-10-08 12:52:28 +05:30
Alex
e66535c572 Merge pull request #1264 from PROSENJIT-RONI/issues/1256
Fix: Menu position on conversation list scroll
2024-10-08 00:33:01 +01:00
Prathamesh Gursal
81c8511316 added single loader with window responsiveness 2024-10-08 01:20:34 +05:30
Prathamesh Gursal
b59170078d make single loader more responsive 2024-10-08 01:19:26 +05:30
GURSAL PRATHAMESH APPASAHEB
453c653975 Merge branch 'arc53:main' into main 2024-10-08 00:39:20 +05:30
Prosenjit Swarnakar
976e7b6765 Fix: Menu position on conversation list scroll 2024-10-07 22:11:26 +05:30
Alex
94a8c42311 Merge pull request #1248 from shatanikmahanty/issues/1226
Fix: Minimise sidebar on nav item click on Mobile
2024-10-07 17:05:36 +01:00
shatanikmahanty
534b650c10 Merge branch 'issues/1226' of https://github.com/shatanikmahanty/DocsGPT into issues/1226 2024-10-07 21:17:25 +05:30
shatanikmahanty
f01c04bb24 Fix: Add type to parameter in handlePostDocumentSelect callback 2024-10-07 21:14:13 +05:30
utin-francis-peter
fcc0449076 chore: Source Docs is now Source 2024-10-07 16:44:00 +01:00
utin-francis-peter
565b0c5a9c chore: rm icon next to question bubble 2024-10-07 16:39:47 +01:00
Shatanik Mahanty
c204d37ac7 Merge branch 'arc53:main' into issues/1226 2024-10-07 21:07:45 +05:30
Alex
c5adea6993 Merge pull request #1259 from utin-francis-peter/fix/issue#1222
fix: hard breaking long string words and intelligent word breaks
2024-10-07 16:11:30 +01:00
utin-francis-peter
c8648101a7 build: style key fix 2024-10-07 15:57:47 +01:00
utin-francis-peter
1f9c167bd2 fix: hard breaking long string words and intelligently breaking or skipping hyphenated/whitespace to next line for good reading XP 2024-10-07 12:54:11 +01:00
Alex
cbae7bd500 Merge pull request #1246 from kom-senapati/llm/groq
Groq llms added
2024-10-07 11:17:13 +01:00
shatanikmahanty
27f97bc55d Fix: Close nav bar on conversation click 2024-10-07 10:12:18 +05:30
shatanikmahanty
601ba40cb0 Merge remote-tracking branch 'origin/main' into issues/1226 2024-10-07 10:11:05 +05:30
Alex
4632531f2d Merge pull request #1242 from Piyush-Tilokani/main
Make logo clickable
2024-10-07 00:05:05 +01:00
Alex
c9e95a9146 Merge pull request #1184 from Devparihar5/ExcelParser
new: added ExcelParser(tested) to read .xlsx files
2024-10-06 23:19:37 +01:00
Piyush Tilokani
c48d4ae7df Adjust positioning of logo 2024-10-06 18:48:16 +05:30
Alex
4895d389e4 Merge pull request #1243 from ayaan-qadri/main 2024-10-06 13:53:46 +01:00
Alex
92916e42c1 Merge pull request #1247 from anasKhafaga/feat/1228-mobile-settings-menu 2024-10-06 11:42:46 +01:00
Shatanik Mahanty
1a8499cf26 Update localhost port to 3000 in readme
Yarn dev by default runs the application on port 3000. Changed the port accordingly in readme to maintain consistency.
2024-10-06 13:52:01 +05:30
shatanikmahanty
81a912c93f Merge remote-tracking branch 'origin/main' into issues/1226 2024-10-06 12:26:05 +05:30
shatanikmahanty
989d6eee0f Fix: Minimise sidebar on nav item click on Mobile 2024-10-06 11:56:26 +05:30
Prathamesh Gursal
a8d371045b updated the loader in settings 2024-10-06 11:40:58 +05:30
Prathamesh Gursal
b80726e942 updated logs and analytics 2024-10-06 11:32:23 +05:30
Prathamesh Gursal
0fc48ea03f applying loader in the settings respective components 2024-10-06 11:13:01 +05:30
Alex
afc86efe28 Merge pull request #1238 from ManishMadan2882/main
Bug Fix: Crash, abnormal update while switching conversation Ids
2024-10-05 23:14:01 +01:00
Alex
ab1ebeb7e0 Merge pull request #1205 from arc53/dartpain/add-github-loader
Github remote loader
2024-10-05 22:06:00 +01:00
Alex
6932c7e3e9 feat: add filename to the top 2024-10-05 21:56:47 +01:00
Alex
c04687fdd1 fix: github loader metadata clickable 2024-10-05 21:53:30 +01:00
Alex
7717242112 fix(lint): ruff var 2024-10-05 21:37:55 +01:00
Alex
1ad82c22d9 fix: headers 2024-10-05 21:36:04 +01:00
Alex
8fa88175c1 fix: translation + auth 2024-10-05 21:33:58 +01:00
Anas Khafaga
b05fec93bb feat: enhance the appearance of scrollable setting menu in the mobile view 2024-10-05 19:17:13 +03:00
Anas Khafaga
802311a06a fix: remove the extra margin on screens greater than medium size 2024-10-05 17:45:48 +03:00
kom-senapati
dc0f26d3d8 fix: unused import of setting 2024-10-05 19:05:20 +05:30
Alex
36c32fd968 Merge pull request #1236 from anasKhafaga/fix/1220-border-styles
Fix(1220): border styles
2024-10-05 14:12:33 +01:00
kom-senapati
0001963a04 feat: groq llms added 2024-10-05 18:36:12 +05:30
penw0lf
6a264a45e2 Removed @vercel/analytics from frontend due to being flagged by AdBlocker, causing rendering issues. 2024-10-05 17:46:40 +05:30
Piyush Tilokani
d897315355 Make logo clickable 2024-10-05 17:26:58 +05:30
Alex
d536b9d8c6 Merge pull request #1203 from negativenagesh/hacktoberfest
Documentation error in "Hacktoberfest.md"
2024-10-05 12:35:16 +01:00
ManishMadan2882
6af7d4e6e8 Merge branch 'main' of https://github.com/ManishMadan2882/docsgpt 2024-10-05 02:46:55 +05:30
ManishMadan2882
67dddcb224 fix(stream): while updating conv id 2024-10-05 02:46:32 +05:30
Anas Khafaga
aad12aa227 fix: update tables styles 2024-10-04 23:07:17 +03:00
Anas Khafaga
d71675f3d2 feat: create a custom global tailwind component (table) styles 2024-10-04 23:07:05 +03:00
Anas Khafaga
88fb35552a fix: folloup cards borders 2024-10-04 23:06:25 +03:00
Ovindu Atukorala
8a084a05c9 Fix formatting of mobile retry button 2024-10-04 19:40:54 +00:00
Alex
90ef7ddacb Merge pull request #1209 from JeevaRamanathan/bugfix/conversation_reset
fix: navigation and deletion issues in conversations
2024-10-04 20:28:12 +01:00
GURSAL PRATHAMESH APPASAHEB
034dfffb85 added the skeleton loader reusable component 2024-10-04 23:47:37 +05:30
Devendra Parihar
09a15e2e59 Delete mlb_teams_2012.csv:Zone.Identifier 2024-10-04 22:59:40 +05:30
Alex
7859a0d001 Merge pull request #1198 from Yash-2707/patch-1
Update migrate_to_v1_vectorstore.py
2024-10-04 18:17:31 +01:00
JeevaRamanathan
085e1b6c41 fix: share button available in mobile view
Signed-off-by: JeevaRamanathan <jeevaramanathan.m@infosys.com>
2024-10-04 21:34:40 +05:30
Alex
5b01664d53 Update README.md 2024-10-03 21:42:39 +01:00
JeevaRamanathan
03adfd4898 fix:navigation and deletion issues in conversations
Signed-off-by: JeevaRamanathan <jeevaramanathan.m@infosys.com>
2024-10-03 23:34:56 +05:30
negativenagesh
1616124fa2 Documentation error in Hacktoberfest.md 2024-10-03 16:22:54 +05:30
Alex
2611550ffd 2024-10-02 23:44:29 +01:00
YASH
2989be47cc Update migrate_to_v1_vectorstore.py
Enhancement made in the code by  error handling and logging batch processing and new functionalities like backup , progress tracking
2024-10-02 22:38:43 +05:30
Devendra Parihar
9b7a346380 Merge branch 'main' into ExcelParser 2024-10-02 22:25:09 +05:30
Alex
8c8bf8702f Merge pull request #1183 from Devparihar5/main
Refactor FaissStore to enhance error handling, add improve type hints, and document methods for better maintainability and usability
2024-10-02 12:17:54 +01:00
Alex
eb8c2a9277 Merge pull request #1178 from anasKhafaga/feat/1169-empty-tables
Feat(1169): Handle state of empty tables
2024-10-02 10:57:53 +01:00
Alex
350c91889e Update HACKTOBERFEST.md 2024-10-02 10:35:31 +01:00
Alex
43018840d1 Update HACKTOBERFEST.md 2024-10-02 10:35:00 +01:00
Alex
4daf443db8 Merge pull request #1190 from kom-senapati/feature/math-equations-support
feat: Add support for mathematical equations in Markdown
2024-10-02 10:25:06 +01:00
Anas Khafaga
a85f214fdb fix: sharp corner of the cell 2024-10-02 07:01:27 +03:00
Kom Senapati
ab77c4e616 feat: Add support for mathematical equations in Markdown 2024-10-02 03:59:24 +00:00
Alex
19315f72a0 Update README.md 2024-10-01 23:15:33 +01:00
Prathamesh Gursal
3683d4a759 loader component is created 2024-10-01 23:07:44 +05:30
devendra.parihar
e9a7722915 new: added ExcelParser(tested) to read .xlsx files 2024-10-01 22:11:17 +05:30
devendra.parihar
7794129929 new: added ExcelParser(tested) to read .xlsx files 2024-10-01 22:03:10 +05:30
Devendra Parihar
2ee2067634 Merge pull request #2 from Devparihar5/test_v1
fix: Fix unused exception variable in FaissStore.
2024-10-01 20:48:16 +05:30
Devendra Parihar
ef6ec3fcb8 fix: Fix unused exception variable in FaissStore. 2024-10-01 14:32:08 +00:00
Devendra Parihar
c57ff3ae51 Merge pull request #1 from Devparihar5/test_v1
fix: Refactor FaissStore to enhance error handling, improve type hint…
2024-10-01 19:43:26 +05:30
Devendra Parihar
aa7f59f88c fix: Refactor FaissStore to enhance error handling, improve type hints, and document methods for better maintainability and usability 2024-10-01 14:10:06 +00:00
Alex
3b4a95ef33 Merge pull request #1177 from DhruvKadam-git/master
Master
2024-10-01 14:55:38 +01:00
Anas Khafaga
09ba14b8ca feat: add a row for no chatbot state 2024-10-01 15:38:53 +03:00
Anas Khafaga
b5dc7281f9 feat: add a row for no document state 2024-10-01 15:29:58 +03:00
DhruvKadam-git
deca7726f4 Merge remote-tracking branch 'upstream/main'
This merge includes several important updates:

1. Error Handling: Added try-except blocks for file operations and network requests.
2. Logging Enhancements: Improved logging to capture more detailed information.
3. Code Refactoring: Created download_file and upload_index functions to avoid code repetition.
4. Configuration: Used constants for MIN_TOKENS, MAX_TOKENS, and RECURSION_DEPTH.
2024-10-01 17:55:33 +05:30
DhruvKadam-git
058e0279b4 Merge remote-tracking branch 'upstream/main'
This merge includes several important updates:

1. Error Handling: Added try-except blocks for file operations and network requests.
2. Logging Enhancements: Improved logging to capture more detailed information.
3. Code Refactoring: Created download_file and upload_index functions to avoid code repetition.
4. Configuration: Used constants for MIN_TOKENS, MAX_TOKENS, and RECURSION_DEPTH.
2024-10-01 17:44:30 +05:30
DhruvKadam-git
5e604950c5 Add .env-template 2024-10-01 17:39:31 +05:30
Alex
af1b81097f datetime sources 2024-10-01 11:55:30 +01:00
Manish Madan
08e713d381 Merge pull request #1163 from arc53/dependabot/npm_and_yarn/frontend/prettier-plugin-tailwindcss-0.6.8
chore(deps-dev): bump prettier-plugin-tailwindcss from 0.6.6 to 0.6.8 in /frontend
2024-10-01 16:16:12 +05:30
dependabot[bot]
a2c228c09f chore(deps-dev): bump prettier-plugin-tailwindcss in /frontend
Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.6.6 to 0.6.8.
- [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.6.6...v0.6.8)

---
updated-dependencies:
- dependency-name: prettier-plugin-tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-01 10:42:26 +00:00
Manish Madan
4e6afebf9e Merge pull request #1161 from arc53/dependabot/npm_and_yarn/frontend/vercel/analytics-1.3.1
chore(deps): bump @vercel/analytics from 0.1.10 to 1.3.1 in /frontend
2024-10-01 16:10:50 +05:30
dependabot[bot]
13d274202e chore(deps): bump @vercel/analytics from 0.1.10 to 1.3.1 in /frontend
Bumps [@vercel/analytics](https://github.com/vercel/analytics/tree/HEAD/packages/web) from 0.1.10 to 1.3.1.
- [Release notes](https://github.com/vercel/analytics/releases)
- [Commits](https://github.com/vercel/analytics/commits/1.3.1/packages/web)

---
updated-dependencies:
- dependency-name: "@vercel/analytics"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-01 10:35:57 +00:00
Manish Madan
f56acac656 Merge pull request #1162 from arc53/dependabot/npm_and_yarn/frontend/eslint-plugin-unused-imports-4.1.4
chore(deps-dev): bump eslint-plugin-unused-imports from 2.0.0 to 4.1.4 in /frontend
2024-10-01 16:04:05 +05:30
dependabot[bot]
68d325b5b5 chore(deps-dev): bump eslint-plugin-unused-imports in /frontend
Bumps [eslint-plugin-unused-imports](https://github.com/sweepline/eslint-plugin-unused-imports) from 2.0.0 to 4.1.4.
- [Commits](https://github.com/sweepline/eslint-plugin-unused-imports/commits/v4.1.4)

---
updated-dependencies:
- dependency-name: eslint-plugin-unused-imports
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-01 10:25:46 +00:00
Manish Madan
40907a2584 Merge pull request #1164 from arc53/dependabot/npm_and_yarn/frontend/typescript-5.6.2
chore(deps-dev): bump typescript from 4.9.5 to 5.6.2 in /frontend
2024-10-01 15:52:42 +05:30
Alex
f4f5d99ec9 Merge pull request #1172 from ManishMadan2882/main
Fix: Auto select newly trained document
2024-10-01 11:16:27 +01:00
Alex
0475e55518 Merge pull request #1173 from sahil9001/system-theme-unless-set
feat: added theme check unless already set
2024-10-01 10:56:04 +01:00
Alex
872b390cfa Merge pull request #1154 from siiddhantt/feat/openapi-spec
feature: OpenAPI specification compliant endpoints
2024-10-01 10:51:51 +01:00
Alex
dc4c539607 Update HACKTOBERFEST.md 2024-10-01 10:43:14 +01:00
Alex
69f8c76ce2 Update HACKTOBERFEST.md 2024-10-01 10:36:50 +01:00
Alex
cbdcca7fd8 Create lexeu-competition.md 2024-10-01 10:35:52 +01:00
Sahil Silare
1e7fa988da feat: added theme check unless already set 2024-10-01 10:02:51 +05:30
Manish Madan
3cfe771b8b Merge branch 'arc53:main' into main 2024-10-01 03:15:00 +05:30
ManishMadan2882
8b4d6d0868 (fix:upload): select the newbie doc 2024-10-01 03:14:15 +05:30
Alex
ba35e1422b Update README.md 2024-09-30 22:41:06 +01:00
dependabot[bot]
8db9b09c96 chore(deps-dev): bump typescript from 4.9.5 to 5.6.2 in /frontend
Bumps [typescript](https://github.com/microsoft/TypeScript) from 4.9.5 to 5.6.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v4.9.5...v5.6.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-30 20:37:44 +00:00
Alex
78e99d1171 Merge pull request #1156 from anasKhafaga/feat/docker/enable-debugging
feat(Docker): Configure debugging with vscode and chrome
2024-09-30 16:43:37 +03:00
Alex
6a12f96fdc Update HACKTOBERFEST.md 2024-09-30 13:42:50 +01:00
Alex
b79a20151c fix: uploads 2024-09-30 13:28:42 +01:00
Siddhant Rai
c9976020dd fix: lint error 2024-09-30 01:15:36 +05:30
Siddhant Rai
e8988e82d0 refactor: answer routes to comply with OpenAPI spec using flask-restx 2024-09-30 00:41:34 +05:30
Anas Khafaga
ff95570da6 feat(Docker): Configure debugging with vscode and chrome 2024-09-29 14:39:16 +03:00
Dhruv Kadam
6698a000e6 Update worker.py
1. Error Handling: Added try-except blocks for file operations and 
    network requests.

2. Logging Enhancements: Improved logging to capture more 
    detailed information.

3. Code Refactoring: Created download_file and upload_index 
   functions to avoid code repetition.

4. Configuration: Used constants for MIN_TOKENS, MAX_TOKENS, 
    and RECURSION_DEPTH.
2024-09-29 14:49:40 +05:30
Siddhant Rai
b084e3074d refactor: user routes to comply with OpenAPI spec using flask-restx 2024-09-27 20:08:46 +05:30
Alex
bc4f9c3442 Merge pull request #1153 from utin-francis-peter/update-run-with-docker-compose
fix: updated docker execution script from `docker-compose` to `docker…
2024-09-26 14:30:56 +01:00
utin-francis-peter
ecf88e7ea1 fix: updated docker execution script from docker-compose to docker compose so it works on latest versions of docker used across contributors machine 2024-09-26 12:09:44 +01:00
Alex
d6cb66cd2f Update README.md 2024-09-26 11:04:01 +01:00
Alex
bc2241f67a Merge pull request #1152 from siiddhantt/feature/sync-remote
feat: sync remote sources
2024-09-25 14:17:57 +01:00
Siddhant Rai
3d292aa485 feat: sync remote sources through celery periodic tasks 2024-09-25 15:20:11 +05:30
Manish Madan
21f46a8aea Merge pull request #1148 from arc53/dependabot/npm_and_yarn/frontend/lint-staged-15.2.10
chore(deps-dev): bump lint-staged from 15.2.8 to 15.2.10 in /frontend
2024-09-24 21:06:37 +05:30
dependabot[bot]
ba6d61cc35 chore(deps-dev): bump lint-staged from 15.2.8 to 15.2.10 in /frontend
Bumps [lint-staged](https://github.com/lint-staged/lint-staged) from 15.2.8 to 15.2.10.
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/master/CHANGELOG.md)
- [Commits](https://github.com/lint-staged/lint-staged/compare/v15.2.8...v15.2.10)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-24 15:30:57 +00:00
Manish Madan
27b43c11bd Merge pull request #1151 from arc53/dependabot/npm_and_yarn/frontend/rollup-4.22.4
chore(deps): bump rollup from 4.20.0 to 4.22.4 in /frontend
2024-09-24 18:20:33 +05:30
Alex
a5292c4473 Update README.md 2024-09-24 12:50:27 +01:00
Alex
f3923488a5 Merge pull request #1143 from arc53/dependabot/pip/application/tzdata-2024.2
chore(deps): bump tzdata from 2024.1 to 2024.2 in /application
2024-09-23 23:33:53 +01:00
Alex
d964ebfff8 Merge pull request #1149 from arc53/dependabot/npm_and_yarn/frontend/react-i18next-15.0.2
chore(deps): bump react-i18next from 15.0.1 to 15.0.2 in /frontend
2024-09-23 23:33:43 +01:00
Alex
e420eeece4 Merge pull request #1144 from arc53/dependabot/pip/application/elasticsearch-8.15.1
chore(deps): bump elasticsearch from 8.14.0 to 8.15.1 in /application
2024-09-23 23:30:15 +01:00
dependabot[bot]
f34713545e chore(deps): bump react-i18next from 15.0.1 to 15.0.2 in /frontend
Bumps [react-i18next](https://github.com/i18next/react-i18next) from 15.0.1 to 15.0.2.
- [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/react-i18next/compare/v15.0.1...v15.0.2)

---
updated-dependencies:
- dependency-name: react-i18next
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-23 22:30:09 +00:00
Alex
2b513c7d87 Merge pull request #1146 from arc53/dependabot/npm_and_yarn/frontend/i18next-23.15.1
chore(deps): bump i18next from 23.14.0 to 23.15.1 in /frontend
2024-09-23 23:29:09 +01:00
Alex
7e28893613 Merge pull request #1145 from arc53/dependabot/pip/application/pandas-2.2.3
chore(deps): bump pandas from 2.2.2 to 2.2.3 in /application
2024-09-23 23:26:41 +01:00
dependabot[bot]
822674ca78 chore(deps): bump i18next from 23.14.0 to 23.15.1 in /frontend
Bumps [i18next](https://github.com/i18next/i18next) from 23.14.0 to 23.15.1.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.14.0...v23.15.1)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-23 22:21:26 +00:00
dependabot[bot]
35ebf97fdf chore(deps): bump rollup from 4.20.0 to 4.22.4 in /frontend
Bumps [rollup](https://github.com/rollup/rollup) from 4.20.0 to 4.22.4.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.20.0...v4.22.4)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-23 22:20:49 +00:00
Alex
b456c0ca9f Merge pull request #1147 from arc53/dependabot/npm_and_yarn/frontend/eslint-plugin-import-2.30.0
chore(deps-dev): bump eslint-plugin-import from 2.27.5 to 2.30.0 in /frontend
2024-09-23 23:19:49 +01:00
dependabot[bot]
bae49891be chore(deps-dev): bump eslint-plugin-import in /frontend
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.27.5 to 2.30.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.27.5...v2.30.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-23 20:32:45 +00:00
dependabot[bot]
dfb4a67d87 chore(deps): bump pandas from 2.2.2 to 2.2.3 in /application
Bumps [pandas](https://github.com/pandas-dev/pandas) from 2.2.2 to 2.2.3.
- [Release notes](https://github.com/pandas-dev/pandas/releases)
- [Commits](https://github.com/pandas-dev/pandas/compare/v2.2.2...v2.2.3)

---
updated-dependencies:
- dependency-name: pandas
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-23 20:14:39 +00:00
dependabot[bot]
8e727a3253 chore(deps): bump elasticsearch from 8.14.0 to 8.15.1 in /application
Bumps [elasticsearch](https://github.com/elastic/elasticsearch-py) from 8.14.0 to 8.15.1.
- [Release notes](https://github.com/elastic/elasticsearch-py/releases)
- [Commits](https://github.com/elastic/elasticsearch-py/compare/v8.14.0...v8.15.1)

---
updated-dependencies:
- dependency-name: elasticsearch
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-23 20:14:33 +00:00
dependabot[bot]
d6f03d7a07 chore(deps): bump tzdata from 2024.1 to 2024.2 in /application
Bumps [tzdata](https://github.com/python/tzdata) from 2024.1 to 2024.2.
- [Release notes](https://github.com/python/tzdata/releases)
- [Changelog](https://github.com/python/tzdata/blob/master/NEWS.md)
- [Commits](https://github.com/python/tzdata/compare/2024.1...2024.2)

---
updated-dependencies:
- dependency-name: tzdata
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-23 20:14:30 +00:00
Alex
5ada5bf1a0 Create HACKTOBERFEST.md 2024-09-23 17:30:58 +01:00
Alex
ae9c935c5c Merge pull request #1140 from ManishMadan2882/main
Stream sources
2024-09-23 15:18:41 +01:00
Alex
95618001aa Merge pull request #1135 from anasKhafaga/fix/mock-json-server
fix(deps): downgrade json-server to v0.17.4
2024-09-23 11:48:16 +01:00
ManishMadan2882
40c361968e feat(shared): sync sources flow; clean up 2024-09-23 01:33:41 +05:30
Manish Madan
757abda654 Merge branch 'arc53:main' into main 2024-09-21 17:53:08 +05:30
ManishMadan2882
862807e863 feat(conv): sync source stream in fe 2024-09-21 17:51:36 +05:30
ManishMadan2882
d188db887c feat(stream): stream sources before ans 2024-09-21 17:50:56 +05:30
ManishMadan2882
59b6c56262 feat(stream): yield sources in stream 2024-09-21 01:50:02 +05:30
Manish Madan
f92658de82 Merge pull request #1095 from arc53/dependabot/npm_and_yarn/extensions/react-widget/micromatch-4.0.8
chore(deps): bump micromatch from 4.0.7 to 4.0.8 in /extensions/react-widget
2024-09-20 18:20:12 +05:30
Alex
f2b3402c17 Merge pull request #1124 from arc53/dependabot/pip/application/openapi3-parser-1.1.18
chore(deps): bump openapi3-parser from 1.1.16 to 1.1.18 in /application
2024-09-20 12:59:05 +01:00
Alex
24badf65a4 Merge pull request #1126 from arc53/dependabot/pip/application/html2text-2024.2.26
chore(deps): bump html2text from 2020.1.16 to 2024.2.26 in /application
2024-09-20 12:58:38 +01:00
dependabot[bot]
86442f212f chore(deps): bump html2text from 2020.1.16 to 2024.2.26 in /application
Bumps [html2text](https://github.com/Alir3z4/html2text) from 2020.1.16 to 2024.2.26.
- [Release notes](https://github.com/Alir3z4/html2text/releases)
- [Changelog](https://github.com/Alir3z4/html2text/blob/master/ChangeLog.rst)
- [Commits](https://github.com/Alir3z4/html2text/compare/2020.1.16...2024.2.26)

---
updated-dependencies:
- dependency-name: html2text
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-20 11:13:59 +00:00
dependabot[bot]
9b6d6ecc32 chore(deps): bump openapi3-parser from 1.1.16 to 1.1.18 in /application
Bumps [openapi3-parser](https://github.com/manchenkoff/openapi3-parser) from 1.1.16 to 1.1.18.
- [Release notes](https://github.com/manchenkoff/openapi3-parser/releases)
- [Commits](https://github.com/manchenkoff/openapi3-parser/compare/v1.1.16...v1.1.18)

---
updated-dependencies:
- dependency-name: openapi3-parser
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-20 11:13:57 +00:00
Alex
1f51277004 Merge pull request #1139 from arc53/dependabot/pip/application/langchain-core-0.3.2
chore(deps): bump langchain-core from 0.2.38 to 0.3.2 in /application
2024-09-20 12:12:55 +01:00
Alex
68cc646a3e fix(test): better test + cov 2024-09-20 12:07:17 +01:00
dependabot[bot]
420ca1b3b4 chore(deps): bump micromatch in /extensions/react-widget
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.7 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/4.0.8/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.7...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-20 11:02:34 +00:00
Alex
a83e68815a fix(test): only 3.11 python 2024-09-20 11:53:50 +01:00
Alex
d87aebb718 fix(deps): now it works better 2024-09-20 11:51:57 +01:00
Alex
a9a4d14e8a Merge pull request #1132 from ManishMadan2882/main
Fix UI for mobile devices
2024-09-20 11:39:57 +01:00
dependabot[bot]
9ed2fc7359 chore(deps): bump langchain-core from 0.2.38 to 0.3.2 in /application
Bumps [langchain-core](https://github.com/langchain-ai/langchain) from 0.2.38 to 0.3.2.
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-core==0.2.38...langchain-core==0.3.2)

---
updated-dependencies:
- dependency-name: langchain-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-20 10:37:01 +00:00
Alex
caad382a95 Merge pull request #1128 from arc53/dependabot/pip/application/anthropic-0.34.2
chore(deps): bump anthropic from 0.34.0 to 0.34.2 in /application
2024-09-20 11:35:26 +01:00
Alex
ea39fc9c48 Merge pull request #1133 from arc53/dependabot/pip/scripts/langchain-0.2.10
chore(deps): bump langchain from 0.1.4 to 0.2.10 in /scripts
2024-09-20 11:33:18 +01:00
ManishMadan2882
bf7cce52db fix(conv): /search after setting id 2024-09-20 02:59:15 +05:30
ManishMadan2882
63a15a3359 fix(retry btn): overlflow in mobile 2024-09-20 02:25:00 +05:30
ManishMadan2882
db34392210 fix(conv): scroll btn; css clean up 2024-09-20 01:06:58 +05:30
Alex
cc4e0ba6c1 Merge pull request #1138 from anasKhafaga/fix/local-docker-bind-mount
fix(Docker): Integrate a bind mount in the local docker compose file
2024-09-19 19:24:27 +01:00
Anas Khafaga
38989f9c68 fix(Docker): Integrate a bind mount in the local docker compose file 2024-09-19 17:48:26 +03:00
Anas Khafaga
c78c92e539 fix(deps): downgrade json-server to v0.17.4 2024-09-19 16:34:35 +03:00
Alex
31e694f50d Merge pull request #1069 from arc53/dependabot/npm_and_yarn/frontend/reduxjs/toolkit-2.2.7
chore(deps): bump @reduxjs/toolkit from 1.9.2 to 2.2.7 in /frontend
2024-09-18 23:36:49 +01:00
ManishMadan2882
5368199517 fix(store.ts): type err 2024-09-19 01:10:16 +05:30
ManishMadan2882
6bbb9176fc Merge branch 'dependabot/npm_and_yarn/frontend/reduxjs/toolkit-2.2.7' of https://github.com/arc53/docsgpt into dependabot/npm_and_yarn/frontend/reduxjs/toolkit-2.2.7 2024-09-18 14:48:25 +05:30
dependabot[bot]
4209eee2f8 chore(deps): bump @reduxjs/toolkit from 1.9.2 to 2.2.7 in /frontend
Bumps [@reduxjs/toolkit](https://github.com/reduxjs/redux-toolkit) from 1.9.2 to 2.2.7.
- [Release notes](https://github.com/reduxjs/redux-toolkit/releases)
- [Commits](https://github.com/reduxjs/redux-toolkit/compare/v1.9.2...v2.2.7)

---
updated-dependencies:
- dependency-name: "@reduxjs/toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-18 09:01:06 +00:00
Manish Madan
f65ebb6b71 Merge pull request #1096 from arc53/dependabot/npm_and_yarn/frontend/types/react-syntax-highlighter-15.5.13
chore(deps-dev): bump @types/react-syntax-highlighter from 15.5.6 to 15.5.13 in /frontend
2024-09-18 14:29:11 +05:30
dependabot[bot]
ef8107e56a chore(deps-dev): bump @types/react-syntax-highlighter in /frontend
Bumps [@types/react-syntax-highlighter](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-syntax-highlighter) from 15.5.6 to 15.5.13.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-syntax-highlighter)

---
updated-dependencies:
- dependency-name: "@types/react-syntax-highlighter"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-18 08:52:35 +00:00
Manish Madan
2293a30f19 Merge pull request #1130 from arc53/dependabot/npm_and_yarn/frontend/eslint-8.57.1
chore(deps-dev): bump eslint from 8.33.0 to 8.57.1 in /frontend
2024-09-18 14:20:14 +05:30
dependabot[bot]
d7678fd355 chore(deps-dev): bump eslint from 8.33.0 to 8.57.1 in /frontend
Bumps [eslint](https://github.com/eslint/eslint) from 8.33.0 to 8.57.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.33.0...v8.57.1)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-18 08:40:22 +00:00
Manish Madan
27d8a5cf99 Merge pull request #1098 from arc53/dependabot/npm_and_yarn/frontend/eslint-config-prettier-9.1.0
chore(deps-dev): bump eslint-config-prettier from 8.6.0 to 9.1.0 in /frontend
2024-09-18 14:09:04 +05:30
dependabot[bot]
03f6c58ac6 chore(deps-dev): bump eslint-config-prettier in /frontend
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.6.0 to 9.1.0.
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.6.0...v9.1.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-18 08:30:58 +00:00
Manish Madan
4fb52dc6fc Merge pull request #1131 from arc53/dependabot/npm_and_yarn/frontend/vite-5.4.6
chore(deps-dev): bump vite from 5.3.5 to 5.4.6 in /frontend
2024-09-18 13:59:20 +05:30
Alex
0232ba3f25 Merge pull request #1134 from arc53/dependabot/npm_and_yarn/docs/next-14.2.12
chore(deps): bump next from 14.1.1 to 14.2.12 in /docs
2024-09-18 09:18:01 +01:00
dependabot[bot]
5987e4c8e1 chore(deps): bump next from 14.1.1 to 14.2.12 in /docs
Bumps [next](https://github.com/vercel/next.js) from 14.1.1 to 14.2.12.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.1.1...v14.2.12)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-18 01:11:06 +00:00
ManishMadan2882
18ce7c8f2f fix(mobile): minor changes 2024-09-18 03:21:46 +05:30
dependabot[bot]
177c9da8b5 chore(deps): bump langchain from 0.1.4 to 0.2.10 in /scripts
Bumps [langchain](https://github.com/langchain-ai/langchain) from 0.1.4 to 0.2.10.
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-ai21==0.1.4...langchain==0.2.10)

---
updated-dependencies:
- dependency-name: langchain
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-17 21:45:01 +00:00
ManishMadan2882
b5f1a8e90f fix(mobile): vertical overflows 2024-09-18 01:44:34 +05:30
dependabot[bot]
494c3dd1bd chore(deps-dev): bump vite from 5.3.5 to 5.4.6 in /frontend
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.3.5 to 5.4.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-17 20:06:05 +00:00
dependabot[bot]
ad8f78d51e chore(deps): bump anthropic from 0.34.0 to 0.34.2 in /application
Bumps [anthropic](https://github.com/anthropics/anthropic-sdk-python) from 0.34.0 to 0.34.2.
- [Release notes](https://github.com/anthropics/anthropic-sdk-python/releases)
- [Changelog](https://github.com/anthropics/anthropic-sdk-python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/anthropics/anthropic-sdk-python/compare/v0.34.0...v0.34.2)

---
updated-dependencies:
- dependency-name: anthropic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-16 20:24:48 +00:00
Alex
5112801c37 Merge pull request #1123 from ManishMadan2882/main 2024-09-13 16:02:41 +01:00
ManishMadan2882
226adfdba2 fix: mobile overflows 2024-09-13 19:13:53 +05:30
ManishMadan2882
22c0375dca fix(ui): overflow in queries 2024-09-13 19:01:38 +05:30
akashAD98
66ebfef619 added lancedb in pacage 2024-09-12 18:55:01 +05:30
akashAD98
7e75513151 added support for lacedb as vectordb 2024-09-12 18:51:29 +05:30
Alex
e77f6c9f6f Merge pull request #1097 from arc53/dependabot/npm_and_yarn/frontend/prettier-plugin-tailwindcss-0.6.6
chore(deps-dev): bump prettier-plugin-tailwindcss from 0.2.2 to 0.6.6 in /frontend
2024-09-12 09:27:18 +01:00
dependabot[bot]
5bd7c0ab8b chore(deps-dev): bump prettier-plugin-tailwindcss in /frontend
Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.2.2 to 0.6.6.
- [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.2.2...v0.6.6)

---
updated-dependencies:
- dependency-name: prettier-plugin-tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-11 22:53:49 +00:00
Alex
97f7f6f7d2 Merge pull request #1121 from arc53/dependabot/npm_and_yarn/frontend/tailwindcss-3.4.11
chore(deps-dev): bump tailwindcss from 3.2.4 to 3.4.11 in /frontend
2024-09-11 23:52:34 +01:00
dependabot[bot]
d65fc70f07 chore(deps-dev): bump tailwindcss from 3.2.4 to 3.4.11 in /frontend
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.2.4 to 3.4.11.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.11/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.2.4...v3.4.11)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-11 22:32:46 +00:00
Alex
dcae85eae8 Merge pull request #1114 from Shubham-EV/patch-1
Removed repetitive text in docs
2024-09-11 23:30:13 +01:00
Alex
686a48298b Merge pull request #1120 from ManishMadan2882/main
Load sources on shared conversations
2024-09-11 20:02:54 +01:00
Alex
8ca590559d fix(lint): types 2024-09-11 19:01:42 +01:00
ManishMadan2882
70251222cc Merge: branch main from upstream 2024-09-11 23:12:15 +05:30
Alex
e55c68d27e Merge pull request #1116 from siiddhantt/feat/analytics-and-logs
Feature: Analytics and Logs Dashboard
2024-09-11 15:10:40 +01:00
Siddhant Rai
da4f2ef6b3 fix: linting issue 2024-09-11 18:02:47 +05:30
Siddhant Rai
dbf2cabd38 fix: linting issue 2024-09-11 18:01:23 +05:30
Siddhant Rai
72e68a163c Merge branch 'main' into feat/analytics-and-logs 2024-09-11 17:58:04 +05:30
ManishMadan2882
919a87bf47 fix: load sources on shared conversations 2024-09-11 17:55:31 +05:30
Siddhant Rai
bea0bbfcdb feat: user logs section in settings 2024-09-11 17:45:54 +05:30
Alex
c12d7a8d82 Merge pull request #1102 from arc53/dependabot/pip/application/flask-3.0.3
chore(deps): bump flask from 3.0.1 to 3.0.3 in /application
2024-09-10 14:16:42 +01:00
Alex
711ad1750a Merge pull request #1100 from arc53/dependabot/pip/application/werkzeug-3.0.4
chore(deps): bump werkzeug from 3.0.3 to 3.0.4 in /application
2024-09-10 14:16:31 +01:00
dependabot[bot]
825567d449 chore(deps): bump flask from 3.0.1 to 3.0.3 in /application
Bumps [flask](https://github.com/pallets/flask) from 3.0.1 to 3.0.3.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/flask/compare/3.0.1...3.0.3)

---
updated-dependencies:
- dependency-name: flask
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-10 13:12:34 +00:00
dependabot[bot]
800439d29e chore(deps): bump werkzeug from 3.0.3 to 3.0.4 in /application
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 3.0.3 to 3.0.4.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/werkzeug/compare/3.0.3...3.0.4)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-10 13:11:59 +00:00
Alex
e3517dde13 Merge pull request #1104 from arc53/dependabot/pip/application/transformers-4.44.2
chore(deps): bump transformers from 4.44.0 to 4.44.2 in /application
2024-09-10 14:10:48 +01:00
dependabot[bot]
f2da8473a4 chore(deps): bump transformers from 4.44.0 to 4.44.2 in /application
Bumps [transformers](https://github.com/huggingface/transformers) from 4.44.0 to 4.44.2.
- [Release notes](https://github.com/huggingface/transformers/releases)
- [Commits](https://github.com/huggingface/transformers/compare/v4.44.0...v4.44.2)

---
updated-dependencies:
- dependency-name: transformers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-10 13:02:52 +00:00
Alex
9cc9a6e9b4 Merge pull request #1103 from arc53/dependabot/pip/application/tqdm-4.66.5
chore(deps): bump tqdm from 4.66.3 to 4.66.5 in /application
2024-09-10 14:01:55 +01:00
dependabot[bot]
873406732f chore(deps): bump tqdm from 4.66.3 to 4.66.5 in /application
Bumps [tqdm](https://github.com/tqdm/tqdm) from 4.66.3 to 4.66.5.
- [Release notes](https://github.com/tqdm/tqdm/releases)
- [Commits](https://github.com/tqdm/tqdm/compare/v4.66.3...v4.66.5)

---
updated-dependencies:
- dependency-name: tqdm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-10 12:13:16 +00:00
Alex
14ab950a6c fix: pinning sentence-transformers==3.0.1 2024-09-10 13:12:00 +01:00
Alex
6cd8e71f4f Merge pull request #1119 from arc53/dependabot/npm_and_yarn/mock-backend/multi-4314d4edfb
chore(deps): bump path-to-regexp and json-server in /mock-backend
2024-09-10 12:42:16 +01:00
Alex
4aeaec9dc7 Merge pull request #1117 from ManishMadan2882/main
Adding option to collect feedback in React widget
2024-09-10 12:18:08 +01:00
ManishMadan2882
e318228a08 purge unwanted linting 2024-09-10 16:26:13 +05:30
dependabot[bot]
d22efbf745 chore(deps): bump path-to-regexp and json-server in /mock-backend
Removes [path-to-regexp](https://github.com/pillarjs/path-to-regexp). It's no longer used after updating ancestor dependency [json-server](https://github.com/typicode/json-server). These dependencies need to be updated together.


Removes `path-to-regexp`

Updates `json-server` from 0.17.4 to 1.0.0-beta.2
- [Release notes](https://github.com/typicode/json-server/releases)
- [Commits](https://github.com/typicode/json-server/compare/v0.17.4...v1.0.0-beta.2)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-type: indirect
- dependency-name: json-server
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-10 09:47:05 +00:00
Alex
90309d5552 feat: user logging api operations level 2024-09-10 01:30:47 +01:00
Alex
72842ecd7a Merge pull request #1118 from arc53/1059-migrating-database-to-new-model 2024-09-10 00:17:59 +01:00
Alex
a1b32ffca9 fix: type 2024-09-10 00:06:43 +01:00
Alex
44d225e6ca Merge branch 'main' into 1059-migrating-database-to-new-model 2024-09-09 23:55:25 +01:00
ManishMadan2882
37ab5f9d7a Merge branch 'main' of https://github.com/ManishMadan2882/docsgpt 2024-09-10 03:28:09 +05:30
ManishMadan2882
61fdcec511 minor change 2024-09-10 03:27:49 +05:30
Manish Madan
45cc4fd97a Merge branch 'arc53:main' into main 2024-09-10 03:01:37 +05:30
ManishMadan2882
3228b88312 widget: minor changes 2024-09-10 02:44:10 +05:30
Alex
a1d3592d08 fix: typo 2024-09-09 21:06:30 +01:00
Alex
c686d950d0 Merge pull request #1062 from ManishMadan2882/1059-migrating-database-to-new-model
Migrating database to new model
2024-09-09 21:01:04 +01:00
Alex
ca779bb0af lint: ruff fix 2024-09-09 20:24:15 +01:00
Alex
90f64e2527 fix: references on shar / api keys 2024-09-09 20:22:03 +01:00
Alex
444d50f751 fix: faiss source name 2024-09-09 16:43:20 +01:00
Alex
2f9c72c1cf feat: migrate store to source_id 2024-09-09 15:46:18 +01:00
Alex
1bb81614a5 fix: metadata things 2024-09-09 13:37:11 +01:00
Alex
888e13e198 feat: mongo vector migrate script 2024-09-09 13:01:58 +01:00
Alex
8166642ff9 fix: write id instead of old path on remote db's 2024-09-09 12:00:59 +01:00
ManishMadan2882
51c42790b7 widget: add option to collect feedback 2024-09-09 16:20:07 +05:30
Alex
f105fd1b2c lint: final fix 2024-09-08 23:19:10 +01:00
Alex
fe78e9a336 lint: more lintingg 2024-09-08 22:55:45 +01:00
Alex
2fce25b0c8 fix: Doc type 2024-09-08 22:52:09 +01:00
Alex
6c0da2ea94 lint: ruff fix 2024-09-08 17:02:48 +01:00
Alex
a353e69648 feat: new vectors structure 2024-09-08 16:59:51 +01:00
Siddhant Rai
ac930d5504 feat: analytics dashboard with respective endpoints 2024-09-07 14:44:35 +05:30
Shubham
d4cf8037b7 Removed repetitive text in docs 2024-09-06 06:06:26 +05:30
Alex
fb1fd851b0 Merge pull request #1045 from Jacksonxhx/Jackson
Integrated Milvus Vector DB into main
2024-09-05 23:57:41 +01:00
Alex
2ff8c0b128 Merge branch 'main' into Jackson 2024-09-05 23:43:17 +01:00
Alex
d232229abf feat Milvus integration 2024-09-05 23:41:51 +01:00
Alex
490e58fb52 Merge pull request #1113 from ManishMadan2882/main
Refining the scrolling functionality while streaming
2024-09-05 00:03:45 +01:00
ManishMadan2882
a8582be54d smooth transition to new input 2024-09-05 03:17:14 +05:30
ManishMadan2882
30bb8449e9 fix: wrap code without a match 2024-09-05 03:07:32 +05:30
ManishMadan2882
adb7132e02 conversation: refined scrolling 2024-09-05 02:34:15 +05:30
Manish Madan
4a1e488bd7 Merge branch 'arc53:main' into main 2024-09-04 00:21:01 +05:30
ManishMadan2882
d200db0eeb clean pkg json after publish 2024-09-04 00:20:42 +05:30
Siddhant Rai
28e06fa684 fix: minor ui inconsistencies 2024-09-03 16:11:24 +05:30
Alex
c4cb9b07cb Merge pull request #1112 from arc53/feat/openai-proxy
feat: added easy way to proxy
2024-09-02 20:14:29 +01:00
Alex
817fc5d4b3 fix: little nextra edit 2024-09-02 20:11:31 +01:00
Alex
2de1e5f71a chore: open ai compatable data 2024-09-02 20:09:16 +01:00
Alex
5246d85f11 fix: ruff 2024-09-02 20:00:24 +01:00
Alex
9526ed0258 feat: added easy way to proxy 2024-09-02 19:46:25 +01:00
Alex
736add031c Merge pull request #1111 from ManishMadan2882/main
Widget: Replaced deprecated dependency
2024-09-02 16:29:01 +01:00
ManishMadan2882
d4042ebaa2 minor change 2024-09-02 17:44:46 +05:30
ManishMadan2882
54e31be3b2 adding markdown-it 2024-09-02 17:12:03 +05:30
Alex
b630be8c8a fix: remove logtail 2024-09-01 11:10:54 +01:00
Alex
0aca41f9a6 fix: faiss dependency 2024-09-01 11:09:24 +01:00
Alex
a3fed0f84b Merge pull request #1101 from arc53/dependabot/pip/application/pandas-2.2.2
chore(deps): bump pandas from 2.2.0 to 2.2.2 in /application
2024-08-31 19:21:02 +01:00
Alex
1414ad6d50 Merge pull request #1109 from aameraryan/csv-upload
CSV upload
2024-08-31 19:18:22 +01:00
Alex
ed6b4dabf8 Merge pull request #1110 from arc53/logging
feat: logging
2024-08-31 19:17:46 +01:00
Alex
d9309ebc6e feat: better token counter 2024-08-31 17:07:40 +01:00
Alex
c49b7613e0 fix: langchain warning 2024-08-31 12:53:37 +01:00
Alex
4f88b6dc71 feat: logging 2024-08-31 12:30:03 +01:00
Aamer Aryan
5c9e6404cc fix: bump eslint-plugin-prettier from 4.2.1 to 5.2.1
Committer: Aamer Aryan <aameraryan@gmail.com>
2024-08-31 04:58:47 +05:30
Aamer Aryan
80df494787 fix: add .csv support to file upload input 2024-08-31 04:54:01 +05:30
Alex
c0886c2785 Merge pull request #1107 from ManishMadan2882/main
React-widget: Adding "large" option for widget size
2024-08-28 23:30:28 +01:00
ManishMadan2882
a83a56eecd update script 2024-08-29 03:14:57 +05:30
ManishMadan2882
130eb56d09 add script: automate publish 2024-08-29 03:10:27 +05:30
ManishMadan2882
b60b473e02 fix(warn): update prop name 2024-08-29 03:08:33 +05:30
Alex
e0504eb957 Merge pull request #1105 from arc53/dependabot/npm_and_yarn/extensions/chrome/braces-3.0.3
chore(deps-dev): bump braces from 3.0.2 to 3.0.3 in /extensions/chrome
2024-08-28 18:14:41 +01:00
dependabot[bot]
3886e41e94 chore(deps-dev): bump braces from 3.0.2 to 3.0.3 in /extensions/chrome
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-28 17:04:55 +00:00
ManishMadan2882
edc54c7120 update script 2024-08-28 16:03:43 +05:30
ManishMadan2882
cef1167ef1 update script 2024-08-28 16:02:10 +05:30
ManishMadan2882
f456500f3a size: add large 2024-08-28 04:30:47 +05:30
dependabot[bot]
59328ea44d chore(deps): bump pandas from 2.2.0 to 2.2.2 in /application
Bumps [pandas](https://github.com/pandas-dev/pandas) from 2.2.0 to 2.2.2.
- [Release notes](https://github.com/pandas-dev/pandas/releases)
- [Commits](https://github.com/pandas-dev/pandas/compare/v2.2.0...v2.2.2)

---
updated-dependencies:
- dependency-name: pandas
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 20:48:56 +00:00
Alex
0dc840dc8e Merge pull request #1094 from ManishMadan2882/main
Update docs: minor fixes, version update
2024-08-26 11:15:44 +01:00
ManishMadan2882
6700028bd1 fix: docs, update version; update readme 2024-08-26 02:29:04 +05:30
Alex
213b1d1d0d Merge pull request #1093 from shelar1423/main
Widget Documentation update
2024-08-25 11:00:18 +01:00
Alex
feab64b09a fix: numbered list 2024-08-25 10:58:28 +01:00
digvijay shelar
f9f096cca8 Widget Documentation update 2024-08-25 13:09:57 +05:30
Alex
535d174c2b Merge pull request #1092 from ManishMadan2882/main
React widget: Sync with the Stream endpoint, error handling
2024-08-23 14:41:23 +01:00
ManishMadan2882
11d2401970 version update 2024-08-23 18:25:37 +05:30
ManishMadan2882
232b36d4ae fix: sync with the error handling 2024-08-23 17:58:57 +05:30
Alex
b38b159f4e Merge pull request #1089 from ManishMadan2882/main
Upgrading options in React widget
2024-08-23 12:10:12 +01:00
Alex
606bf1ff58 Merge pull request #1090 from siiddhantt/fix/minor-bugs
fix: minor ui bug
2024-08-23 12:05:08 +01:00
Siddhant Rai
46cec638dd fix: chatbot table out of bounds 2024-08-23 11:57:24 +05:30
ManishMadan2882
8637397c86 options: theme, button icon and bg 2024-08-23 02:55:00 +05:30
Alex
7502e1881f Merge pull request #1087 from shriyaMadan/main
Fix streaming issue on new conversation ID
2024-08-22 11:22:42 +01:00
Alex
734d5e50c5 Merge pull request #1088 from ManishMadan2882/main
React Widget: Fix for Next.js
2024-08-21 23:46:01 +01:00
Alex
052ff6727b Merge pull request #1082 from arc53/dependabot/pip/application/anthropic-0.34.0
chore(deps): bump anthropic from 0.12.0 to 0.34.0 in /application
2024-08-21 21:42:29 +01:00
Alex
2962dbd6b8 Merge pull request #1081 from arc53/dependabot/pip/application/qdrant-client-1.11.0
chore(deps): bump qdrant-client from 1.9.0 to 1.11.0 in /application
2024-08-21 21:42:21 +01:00
ManishMadan2882
392afd6f33 fix(Next): window is not defined 2024-08-22 00:26:09 +05:30
“Shriya
fc3f4dff10 Merge remote-tracking branch 'refs/remotes/origin/main' 2024-08-21 06:00:19 +05:30
“Shriya
24d6889b24 abort stream when conversationId updates 2024-08-21 05:50:04 +05:30
Alex
27e3e22703 Merge pull request #1076 from arc53/dependabot/pip/scripts/nltk-3.9
chore(deps): bump nltk from 3.8.1 to 3.9 in /scripts
2024-08-20 23:29:55 +01:00
dependabot[bot]
7b7f609c47 chore(deps): bump qdrant-client from 1.9.0 to 1.11.0 in /application
Bumps [qdrant-client](https://github.com/qdrant/qdrant-client) from 1.9.0 to 1.11.0.
- [Release notes](https://github.com/qdrant/qdrant-client/releases)
- [Commits](https://github.com/qdrant/qdrant-client/compare/v1.9.0...v1.11.0)

---
updated-dependencies:
- dependency-name: qdrant-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-20 22:25:35 +00:00
Alex
5389c8858a Merge pull request #1083 from arc53/dependabot/pip/application/pymongo-4.8.0
chore(deps): bump pymongo from 4.6.3 to 4.8.0 in /application
2024-08-20 23:24:27 +01:00
Alex
c2d2fbba96 Merge pull request #1086 from siiddhantt/fix/remark-gfm-incompatible
fix: updated both remark-gfm and react-markdown to compatible versions
2024-08-20 18:02:18 +01:00
Siddhant Rai
cfc039dae1 fix: refactor code for react-markdown 9.0.1 2024-08-20 22:06:55 +05:30
Siddhant Rai
edf24dc992 fix: updated both remark-gfm and react-markdown to compatible versions 2024-08-20 14:18:15 +05:30
Alex
97710296ac Merge pull request #1085 from siiddhantt/fix/remark-gfm-incompatible
fix: revert to remark-gfm 3.0.1
2024-08-20 09:32:34 +01:00
Siddhant Rai
acbfc0bb81 fix: remark-gfm 4.0.0 incompatible with react-markdown 8.0.7 2024-08-20 13:56:20 +05:30
Alex
e1fe2fb093 Merge pull request #1084 from ManishMadan2882/main
Extensions: Add size option to react-widget
2024-08-20 00:34:09 +01:00
ManishMadan2882
dd5c1ec9ed minor design change 2024-08-20 04:23:16 +05:30
dependabot[bot]
c7f7614646 chore(deps): bump @reduxjs/toolkit from 1.9.2 to 2.2.7 in /frontend
Bumps [@reduxjs/toolkit](https://github.com/reduxjs/redux-toolkit) from 1.9.2 to 2.2.7.
- [Release notes](https://github.com/reduxjs/redux-toolkit/releases)
- [Commits](https://github.com/reduxjs/redux-toolkit/compare/v1.9.2...v2.2.7)

---
updated-dependencies:
- dependency-name: "@reduxjs/toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 21:43:00 +00:00
Alex
d604398642 Merge pull request #1080 from arc53/dependabot/npm_and_yarn/frontend/postcss-8.4.41
chore(deps-dev): bump postcss from 8.4.40 to 8.4.41 in /frontend
2024-08-19 22:38:01 +01:00
Alex
d40b1d8937 Merge pull request #1079 from arc53/dependabot/npm_and_yarn/frontend/multi-ec30208de6
chore(deps): bump react-dom and @types/react-dom in /frontend
2024-08-19 22:37:52 +01:00
Alex
49b4b476dc Merge pull request #1078 from arc53/dependabot/npm_and_yarn/frontend/vitejs/plugin-react-4.3.1
chore(deps-dev): bump @vitejs/plugin-react from 4.2.1 to 4.3.1 in /frontend
2024-08-19 22:37:36 +01:00
Alex
c0ec689be9 Merge pull request #1077 from arc53/dependabot/npm_and_yarn/frontend/i18next-23.14.0
chore(deps): bump i18next from 23.11.5 to 23.14.0 in /frontend
2024-08-19 22:37:00 +01:00
Alex
8e26decb5b Merge pull request #1075 from siiddhantt/feat/new-conversation-ui
feat: new ui for sources in conversation
2024-08-19 22:36:35 +01:00
ManishMadan2882
921efcbf4b add size prop - small/medium 2024-08-20 02:25:39 +05:30
dependabot[bot]
705ab58bfb chore(deps): bump pymongo from 4.6.3 to 4.8.0 in /application
Bumps [pymongo](https://github.com/mongodb/mongo-python-driver) from 4.6.3 to 4.8.0.
- [Release notes](https://github.com/mongodb/mongo-python-driver/releases)
- [Changelog](https://github.com/mongodb/mongo-python-driver/blob/master/doc/changelog.rst)
- [Commits](https://github.com/mongodb/mongo-python-driver/compare/4.6.3...4.8.0)

---
updated-dependencies:
- dependency-name: pymongo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 20:54:54 +00:00
dependabot[bot]
b42e32a955 chore(deps): bump anthropic from 0.12.0 to 0.34.0 in /application
Bumps [anthropic](https://github.com/anthropics/anthropic-sdk-python) from 0.12.0 to 0.34.0.
- [Release notes](https://github.com/anthropics/anthropic-sdk-python/releases)
- [Changelog](https://github.com/anthropics/anthropic-sdk-python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/anthropics/anthropic-sdk-python/compare/v0.12.0...v0.34.0)

---
updated-dependencies:
- dependency-name: anthropic
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 20:54:50 +00:00
dependabot[bot]
dec60a0fdd chore(deps-dev): bump postcss from 8.4.40 to 8.4.41 in /frontend
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.40 to 8.4.41.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.40...8.4.41)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 20:40:15 +00:00
dependabot[bot]
fa84d5c502 chore(deps): bump react-dom and @types/react-dom in /frontend
Bumps [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) and [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom). These dependencies needed to be updated together.

Updates `react-dom` from 18.2.0 to 18.3.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react-dom)

Updates `@types/react-dom` from 18.0.10 to 18.3.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

---
updated-dependencies:
- dependency-name: react-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: "@types/react-dom"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 20:40:08 +00:00
dependabot[bot]
34c763caf5 chore(deps-dev): bump @vitejs/plugin-react in /frontend
Bumps [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react) from 4.2.1 to 4.3.1.
- [Release notes](https://github.com/vitejs/vite-plugin-react/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-react/commits/v4.3.1/packages/plugin-react)

---
updated-dependencies:
- dependency-name: "@vitejs/plugin-react"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 20:39:57 +00:00
dependabot[bot]
e5709dfabc chore(deps): bump i18next from 23.11.5 to 23.14.0 in /frontend
Bumps [i18next](https://github.com/i18next/i18next) from 23.11.5 to 23.14.0.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v23.11.5...v23.14.0)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 20:39:49 +00:00
Siddhant Rai
5f4f4a8ab9 fix: skeleton shown for 0 chunks and 'None' doc 2024-08-19 18:14:49 +05:30
Siddhant Rai
ca9e71087b fix: revert changes 2024-08-19 17:40:46 +05:30
Siddhant Rai
6da483b3ef fix: minor ui fix + added req changes 2024-08-19 17:33:15 +05:30
Alex
e300145263 Merge pull request #1070 from arc53/dependabot/npm_and_yarn/frontend/typescript-eslint/parser-5.62.0
chore(deps-dev): bump @typescript-eslint/parser from 5.51.0 to 5.62.0 in /frontend
2024-08-19 10:28:55 +01:00
dependabot[bot]
eb3f0035fe chore(deps): bump nltk from 3.8.1 to 3.9 in /scripts
Bumps [nltk](https://github.com/nltk/nltk) from 3.8.1 to 3.9.
- [Changelog](https://github.com/nltk/nltk/blob/develop/ChangeLog)
- [Commits](https://github.com/nltk/nltk/compare/3.8.1...3.9)

---
updated-dependencies:
- dependency-name: nltk
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 09:28:28 +00:00
Alex
6be3a2a142 Merge pull request #1072 from arc53/dependabot/npm_and_yarn/frontend/eslint-plugin-n-15.7.0
chore(deps-dev): bump eslint-plugin-n from 15.6.1 to 15.7.0 in /frontend
2024-08-19 10:28:26 +01:00
Alex
e23893a419 Merge pull request #1073 from arc53/dependabot/npm_and_yarn/frontend/react-i18next-15.0.1
chore(deps): bump react-i18next from 14.1.2 to 15.0.1 in /frontend
2024-08-19 10:28:08 +01:00
Alex
7b4c1dcde0 Merge pull request #1071 from arc53/dependabot/npm_and_yarn/frontend/remark-gfm-4.0.0
chore(deps): bump remark-gfm from 3.0.1 to 4.0.0 in /frontend
2024-08-19 10:27:34 +01:00
Siddhant Rai
4b7cb2a22a fix: minor fix 2024-08-17 15:26:22 +05:30
Siddhant Rai
344a8a3887 fix: added required changes 2024-08-17 14:42:48 +05:30
Siddhant Rai
0afda5dc27 feat: new sources section + sidebar component 2024-08-15 18:23:13 +05:30
ManishMadan2882
0891ef6d0a frontend: adapting to migration 2024-08-14 17:15:20 +05:30
dependabot[bot]
cdb64ecb19 chore(deps): bump react-i18next from 14.1.2 to 15.0.1 in /frontend
Bumps [react-i18next](https://github.com/i18next/react-i18next) from 14.1.2 to 15.0.1.
- [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/react-i18next/compare/v14.1.2...v15.0.1)

---
updated-dependencies:
- dependency-name: react-i18next
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 20:56:04 +00:00
dependabot[bot]
b05ac4f2a4 chore(deps-dev): bump eslint-plugin-n from 15.6.1 to 15.7.0 in /frontend
Bumps [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) from 15.6.1 to 15.7.0.
- [Release notes](https://github.com/eslint-community/eslint-plugin-n/releases)
- [Changelog](https://github.com/eslint-community/eslint-plugin-n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint-community/eslint-plugin-n/compare/15.6.1...15.7.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-n
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 20:55:59 +00:00
dependabot[bot]
411189a076 chore(deps): bump remark-gfm from 3.0.1 to 4.0.0 in /frontend
Bumps [remark-gfm](https://github.com/remarkjs/remark-gfm) from 3.0.1 to 4.0.0.
- [Release notes](https://github.com/remarkjs/remark-gfm/releases)
- [Commits](https://github.com/remarkjs/remark-gfm/compare/3.0.1...4.0.0)

---
updated-dependencies:
- dependency-name: remark-gfm
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 20:55:53 +00:00
dependabot[bot]
63cf4d46c9 chore(deps-dev): bump @typescript-eslint/parser in /frontend
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.51.0 to 5.62.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.62.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 20:55:46 +00:00
Alex
3c683f2192 Merge pull request #1067 from arc53/dependabot/pip/application/elasticsearch-8.14.0
chore(deps): bump elasticsearch from 8.12.0 to 8.14.0 in /application
2024-08-12 21:49:51 +01:00
Alex
d46e59bcd4 Merge pull request #1065 from arc53/dependabot/pip/application/pydantic-settings-2.4.0
chore(deps): bump pydantic-settings from 2.1.0 to 2.4.0 in /application
2024-08-12 21:45:07 +01:00
Alex
c45e76ec31 Merge pull request #1068 from arc53/dependabot/pip/application/transformers-4.44.0
chore(deps): bump transformers from 4.43.4 to 4.44.0 in /application
2024-08-12 21:42:00 +01:00
Alex
44828707ea Merge pull request #1066 from arc53/dependabot/pip/application/gunicorn-23.0.0
chore(deps): bump gunicorn from 22.0.0 to 23.0.0 in /application
2024-08-12 21:39:05 +01:00
dependabot[bot]
74c047d249 chore(deps): bump transformers from 4.43.4 to 4.44.0 in /application
Bumps [transformers](https://github.com/huggingface/transformers) from 4.43.4 to 4.44.0.
- [Release notes](https://github.com/huggingface/transformers/releases)
- [Commits](https://github.com/huggingface/transformers/compare/v4.43.4...v4.44.0)

---
updated-dependencies:
- dependency-name: transformers
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 20:22:59 +00:00
dependabot[bot]
50abfb98fe chore(deps): bump elasticsearch from 8.12.0 to 8.14.0 in /application
Bumps [elasticsearch](https://github.com/elastic/elasticsearch-py) from 8.12.0 to 8.14.0.
- [Release notes](https://github.com/elastic/elasticsearch-py/releases)
- [Commits](https://github.com/elastic/elasticsearch-py/compare/v8.12.0...v8.14.0)

---
updated-dependencies:
- dependency-name: elasticsearch
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 20:22:27 +00:00
dependabot[bot]
6104657970 chore(deps): bump gunicorn from 22.0.0 to 23.0.0 in /application
Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 22.0.0 to 23.0.0.
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](https://github.com/benoitc/gunicorn/compare/22.0.0...23.0.0)

---
updated-dependencies:
- dependency-name: gunicorn
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 20:22:24 +00:00
dependabot[bot]
02116d4c05 chore(deps): bump pydantic-settings from 2.1.0 to 2.4.0 in /application
Bumps [pydantic-settings](https://github.com/pydantic/pydantic-settings) from 2.1.0 to 2.4.0.
- [Release notes](https://github.com/pydantic/pydantic-settings/releases)
- [Commits](https://github.com/pydantic/pydantic-settings/compare/v2.1.0...v2.4.0)

---
updated-dependencies:
- dependency-name: pydantic-settings
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 20:22:21 +00:00
Alex
23f993bb54 Merge pull request #1064 from arc53/dartpain-patch-1
Upgrade unstructured
2024-08-12 16:44:11 +01:00
Alex
16aedd61da fix: ruff lint 2024-08-12 16:37:03 +01:00
Alex
5a2f3ad616 feat: remove dep 2024-08-12 16:35:23 +01:00
Alex
54971104f8 Upgrade unstructured 2024-08-12 16:03:02 +01:00
ManishMadan2882
deeffbf77d fix(retriever):classic should not override 2024-08-12 15:52:36 +05:30
ManishMadan2882
7e8dd6bba8 fix: get api keys endpoint 2024-08-12 01:06:21 +05:30
ManishMadan2882
dc4078d744 migration(fixes): retriver/sharing endpoints 2024-08-11 21:26:30 +05:30
ManishMadan2882
1eb168be55 vector indexes to be named after mongo _id 2024-08-11 19:33:31 +05:30
ManishMadan2882
3c6fd365fb store only local docs as location 2024-08-09 18:27:54 +05:30
Siddhant Rai
53c9184057 Merge pull request #1061 from arc53/dependabot/pip/application/transformers-4.43.4
chore(deps): bump transformers from 4.36.2 to 4.43.4 in /application
2024-08-07 21:14:04 +05:30
Siddhant Rai
16c9872571 Merge pull request #1052 from arc53/dependabot/pip/application/dataclasses-json-0.6.7
chore(deps): bump dataclasses-json from 0.6.3 to 0.6.7 in /application
2024-08-07 20:28:11 +05:30
Siddhant Rai
17160bc467 Merge pull request #1051 from arc53/dependabot/pip/application/duckduckgo-search-6.2.6
chore(deps): bump duckduckgo-search from 5.3.0 to 6.2.6 in /application
2024-08-07 20:23:28 +05:30
Siddhant Rai
3b39e58cf3 Merge pull request #1058 from arc53/dependabot/npm_and_yarn/frontend/lint-staged-15.2.8
chore(deps-dev): bump lint-staged from 13.1.1 to 15.2.8 in /frontend
2024-08-07 15:17:28 +05:30
dependabot[bot]
7db055116c chore(deps-dev): bump lint-staged from 13.1.1 to 15.2.8 in /frontend
Bumps [lint-staged](https://github.com/lint-staged/lint-staged) from 13.1.1 to 15.2.8.
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/master/CHANGELOG.md)
- [Commits](https://github.com/lint-staged/lint-staged/compare/v13.1.1...v15.2.8)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-07 09:19:07 +00:00
Siddhant Rai
0262ff1aac Merge pull request #1054 from arc53/dependabot/npm_and_yarn/frontend/prettier-3.3.3
chore(deps-dev): bump prettier from 2.8.4 to 3.3.3 in /frontend
2024-08-07 14:47:52 +05:30
dependabot[bot]
14def09ce3 chore(deps-dev): bump prettier from 2.8.4 to 3.3.3 in /frontend
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.4 to 3.3.3.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.4...3.3.3)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-07 09:09:10 +00:00
Siddhant Rai
96e59da6bc Merge pull request #1057 from arc53/dependabot/npm_and_yarn/frontend/eslint-plugin-react-7.35.0
chore(deps-dev): bump eslint-plugin-react from 7.32.2 to 7.35.0 in /frontend
2024-08-07 14:37:56 +05:30
Siddhant Rai
8f75b0a0c0 Merge pull request #1056 from arc53/dependabot/npm_and_yarn/frontend/vite-5.3.5
chore(deps-dev): bump vite from 5.0.13 to 5.3.5 in /frontend
2024-08-07 14:35:26 +05:30
dependabot[bot]
70a40cfc45 chore(deps-dev): bump eslint-plugin-react in /frontend
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.32.2 to 7.35.0.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.32.2...v7.35.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-07 09:01:23 +00:00
Siddhant Rai
ef6b8b9ebc Merge pull request #1053 from arc53/dependabot/npm_and_yarn/frontend/eslint-plugin-promise-6.6.0
chore(deps-dev): bump eslint-plugin-promise from 6.1.1 to 6.6.0 in /frontend
2024-08-07 14:30:08 +05:30
ManishMadan2882
f9dbaa9407 migrate: link source to vector collection 2024-08-07 03:41:31 +05:30
dependabot[bot]
ed338668d1 chore(deps): bump transformers from 4.36.2 to 4.43.4 in /application
Bumps [transformers](https://github.com/huggingface/transformers) from 4.36.2 to 4.43.4.
- [Release notes](https://github.com/huggingface/transformers/releases)
- [Commits](https://github.com/huggingface/transformers/compare/v4.36.2...v4.43.4)

---
updated-dependencies:
- dependency-name: transformers
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 20:32:46 +00:00
Alex
1e5d94a958 Merge pull request #1060 from siiddhantt/fix/conversation-textarea
fix: no safe-area for iOS browser, input not fixed
2024-08-05 18:12:38 +01:00
Siddhant Rai
51553c565f feat: replaced select source modal with hook to set default doc 2024-08-05 22:28:58 +05:30
Alex
ae36805aa1 Merge pull request #1050 from arc53/dependabot/pip/application/boto3-1.34.153
chore(deps): bump boto3 from 1.34.6 to 1.34.153 in /application
2024-08-05 16:54:18 +01:00
Siddhant Rai
22b7445ac4 fix: no safe-area for iOS browser, input not fixed 2024-08-05 19:05:34 +05:30
dependabot[bot]
9c278d7d0b chore(deps-dev): bump vite from 5.0.13 to 5.3.5 in /frontend
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.13 to 5.3.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.3.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 10:13:09 +00:00
dependabot[bot]
3a1592692e chore(deps-dev): bump eslint-plugin-promise in /frontend
Bumps [eslint-plugin-promise](https://github.com/eslint-community/eslint-plugin-promise) from 6.1.1 to 6.6.0.
- [Release notes](https://github.com/eslint-community/eslint-plugin-promise/releases)
- [Changelog](https://github.com/eslint-community/eslint-plugin-promise/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint-community/eslint-plugin-promise/compare/v6.1.1...v6.6.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-promise
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 10:12:55 +00:00
dependabot[bot]
bdec956708 chore(deps): bump dataclasses-json from 0.6.3 to 0.6.7 in /application
Bumps [dataclasses-json](https://github.com/lidatong/dataclasses-json) from 0.6.3 to 0.6.7.
- [Release notes](https://github.com/lidatong/dataclasses-json/releases)
- [Commits](https://github.com/lidatong/dataclasses-json/compare/v0.6.3...v0.6.7)

---
updated-dependencies:
- dependency-name: dataclasses-json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 10:12:52 +00:00
dependabot[bot]
d0d8a8a3af chore(deps): bump duckduckgo-search from 5.3.0 to 6.2.6 in /application
Bumps [duckduckgo-search](https://github.com/deedy5/duckduckgo_search) from 5.3.0 to 6.2.6.
- [Release notes](https://github.com/deedy5/duckduckgo_search/releases)
- [Commits](https://github.com/deedy5/duckduckgo_search/compare/v5.3.0...v6.2.6)

---
updated-dependencies:
- dependency-name: duckduckgo-search
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 10:12:50 +00:00
dependabot[bot]
f787962be8 chore(deps): bump boto3 from 1.34.6 to 1.34.153 in /application
Bumps [boto3](https://github.com/boto/boto3) from 1.34.6 to 1.34.153.
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](https://github.com/boto/boto3/compare/1.34.6...1.34.153)

---
updated-dependencies:
- dependency-name: boto3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 10:12:48 +00:00
Alex
57b9b369b7 Create dependabot.yml 2024-08-05 11:12:00 +01:00
Alex
ccda5bdb7e Merge pull request #1049 from siiddhantt/fix/conversation-textarea
fix: changed query box from div to textarea
2024-08-05 10:06:57 +01:00
Siddhant Rai
bd5fa83fe0 fix: handleInput after submission of query 2024-08-05 14:25:21 +05:30
Siddhant Rai
59caf381f7 fix: changed query box from div to textarea for handling paste, autoscroll 2024-08-05 14:17:21 +05:30
Alex
181cb1b1bd Update README.md 2024-08-02 16:08:21 +01:00
Alex
ba2dd2d872 chore: run triage only on main 2024-08-01 17:40:28 +01:00
Alex
4dc5acd68e Update README.md 2024-08-01 17:32:23 +01:00
Alex
f57116afbe Merge pull request #1048 from PeterDaveHelloKitchen/Dockerfile
Optimize Dockerfile to reduce image size and improve build efficiency
2024-08-01 17:16:59 +01:00
Peter Dave Hello
99c41c7e34 Optimize Dockerfile to reduce image size and improve build efficiency
- Merge apt-related RUN commands in builder and final stages
- Remove redundant apt-get clean (automatically handled by base image)
- Consolidate cleanup operations within the same layer for effective
  size reduction

Reference:
- https://docs.docker.com/build/building/best-practices/#apt-get
2024-08-01 23:45:13 +08:00
Alex
d7b38d9513 Change api key name to chatbots 2024-07-31 10:40:35 +01:00
Alex
2c7aad1dcd Merge pull request #1043 from PeterDaveHelloKitchen/Dockerfile
Optimize Dockerfile by unifying download tools to `wget`
2024-07-30 16:42:07 +01:00
Alex
593dba72a8 Merge pull request #1047 from ManishMadan2882/main
UI Fixes
2024-07-30 16:24:11 +01:00
ManishMadan2882
09f2f2a9e7 (fix) dark theme,train modal 2024-07-30 18:01:49 +05:30
Jackson
6c583eedb9 Merge branch 'arc53:main' into Jackson 2024-07-30 17:45:06 +08:00
Jacksonxhx
1c4d7a6ad1 integrated milvus db 2024-07-30 17:44:27 +08:00
Alex
f75ed4bc66 Merge pull request #1039 from ManishMadan2882/main
Feature(Sharing): Introducing Promptable conversations
2024-07-29 21:25:20 +01:00
Alex
f487deb7b9 Merge pull request #1044 from arc53/fix/minor-bugs
fix: delete all method type
2024-07-29 21:25:12 +01:00
ManishMadan2882
ad30a8476c fix(shared): UI 2024-07-30 01:13:47 +05:30
Siddhant Rai
60db807443 Update Navigation.tsx 2024-07-29 12:17:05 +05:30
Siddhant Rai
d1dedff9ca fix: delete all method type 2024-07-29 12:15:18 +05:30
Peter Dave Hello
9a04506b0d Optimize Dockerfile by unifying download tools to wget
Replace curl with wget to streamline the build process. Remove
unnecessary curl installation to reduce dependency complexity and
installation time.
2024-07-29 00:48:16 +08:00
ManishMadan2882
a58369fbb1 share modal :translate option 2024-07-28 20:06:24 +05:30
ManishMadan2882
d63b5d71a1 prevent event bubble, open menu onhover 2024-07-28 19:48:48 +05:30
ManishMadan2882
360d790282 save further queries to localstorage 2024-07-28 00:58:55 +05:30
ManishMadan2882
a0dd8f8e0f integrated stream for shared(prompt) conv 2024-07-27 02:42:33 +05:30
ManishMadan2882
db7c001076 exclude the models only in root 2024-07-26 15:47:51 +05:30
Alex
c96f905d2b Merge pull request #1041 from arc53/dependabot/pip/scripts/langchain-community-0.2.9
chore(deps): bump langchain-community from 0.0.16 to 0.2.9 in /scripts
2024-07-26 11:10:21 +01:00
ManishMadan2882
4b3f04083b synced with upstream 2024-07-26 15:36:27 +05:30
ManishMadan2882
8276b6c9a9 (shared conv) centralised into redux state 2024-07-26 15:19:38 +05:30
Alex
43d6e788dc Merge pull request #1040 from siiddhantt/enhancement/reusable-api-client
enhancement: reusable api client in frontend
2024-07-25 11:48:31 +01:00
Siddhant Rai
0c062a8485 enhancement: implement api client in remaining places 2024-07-24 23:08:42 +05:30
dependabot[bot]
99b649f24e chore(deps): bump langchain-community from 0.0.16 to 0.2.9 in /scripts
Bumps [langchain-community](https://github.com/langchain-ai/langchain) from 0.0.16 to 0.2.9.
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/commits/langchain-community==0.2.9)

---
updated-dependencies:
- dependency-name: langchain-community
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-24 17:36:19 +00:00
Siddhant Rai
7c6532f145 enhancement: reusable api client setup + replaced in settings, conversation 2024-07-24 21:33:36 +05:30
ManishMadan2882
052669a0b0 complete_stream: no storing for api key req, fe:update shared conv 2024-07-24 02:03:53 +05:30
ManishMadan2882
0cf86d3bbc share api key through response 2024-07-20 03:35:57 +05:30
Alex
56a16b862a Merge pull request #1038 from nayelimdejesus/ux-ehancement
Ux Enhancement
2024-07-19 12:28:23 +01:00
ManishMadan2882
b2fffb2e23 feat(share): enable route to share promptable conv 2024-07-19 03:24:35 +05:30
Nayeli De Jesus
3f7a27cdbb Updated Ux-enhancement
I worked on deleting the button since we want training modal to close automatically upon completion. I added the set variables into TrainingProgress().
2024-07-18 05:35:12 -07:00
Nayeli De Jesus
58e30b8c88 Created Branch 2024-07-18 05:28:30 -07:00
Alex
4025e55b95 Merge pull request #1028 from utin-francis-peter/fix/issue#1023
Fix: adjusted alignment of submit query icon within its container
2024-07-17 00:25:42 +01:00
utin-francis-peter
e1e63ebd64 Merge branch 'main' of https://github.com/utin-francis-peter/DocsGPT into fix/issue#1023 2024-07-16 22:05:12 +01:00
utin-francis-peter
8279df48bf removed shrink 2024-07-16 22:04:26 +01:00
Alex
d86a06fab0 Merge pull request #1027 from utin-francis-peter/feat/issue#1017
Feat Implementation for issue#1017
2024-07-16 14:35:18 +01:00
Siddhant Rai
90b24dd915 fix: removed unused TextArea component 2024-07-16 18:20:13 +05:30
Alex
bacd2a6893 Merge pull request #1034 from ManishMadan2882/main
Feat: sharing endpoints
2024-07-16 12:28:59 +01:00
Alex
0f059f247d fix: ruff lint 2024-07-16 12:28:43 +01:00
ManishMadan2882
e2b76d9c29 feat(share): share btn above conversations 2024-07-16 02:09:36 +05:30
ManishMadan2882
1107a2f2bc refactor App.tsx: better convention 2024-07-15 17:56:23 +05:30
ManishMadan2882
efd43013da minor fix 2024-07-15 05:13:28 +05:30
ManishMadan2882
7b8458b47d fix layout 2024-07-15 05:00:13 +05:30
ManishMadan2882
84eed09a17 feedback visible conditioned, update meta info in shared 2024-07-15 02:55:38 +05:30
ManishMadan2882
35b1a40d49 feat(share) translate 2024-07-14 04:13:25 +05:30
ManishMadan2882
81d7fe3fdb refactor App, add /shared/id page 2024-07-14 03:29:06 +05:30
ManishMadan2882
02187fed4e add timetamp in iso, remove sources 2024-07-14 03:27:53 +05:30
ManishMadan2882
019bf013ac add css class: no-scrollbar 2024-07-12 02:51:59 +05:30
ManishMadan2882
d6e59a6a0a conversation tile: add menu, add share modal 2024-07-11 21:45:47 +05:30
utin-francis-peter
46aa862943 Merge branch 'main' of https://github.com/utin-francis-peter/DocsGPT into feat/issue#1017 2024-07-09 13:34:49 +01:00
utin-francis-peter
0413cab0d9 chore: removed all TextArea related entities from branch as it's outiside scope of branch/issue 2024-07-09 13:32:46 +01:00
Manish Madan
3357ce8f33 Merge branch 'arc53:main' into main 2024-07-09 16:29:04 +05:30
Alex
1776f6e7fd Merge pull request #1024 from blackviking27/feat-bubble-width 2024-07-09 09:06:39 +04:00
ManishMadan2882
edfe5e1156 restrict redundant sharing, add user field 2024-07-08 15:59:19 +05:30
ManishMadan2882
0768992848 add route to share and fetch public conversations 2024-07-08 03:03:46 +05:30
FIRST_NAME LAST_NAME
1224f94879 moved the three icons to the bottom of conversation bubble 2024-07-07 21:52:20 +05:30
Alex
b58c5344b8 Merge pull request #1033 from arc53/dependabot/npm_and_yarn/extensions/web-widget/braces-3.0.3
chore(deps-dev): bump braces from 3.0.2 to 3.0.3 in /extensions/web-widget
2024-07-07 17:24:03 +04:00
dependabot[bot]
7175bc0595 chore(deps-dev): bump braces in /extensions/web-widget
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-07 13:20:00 +00:00
Alex
b7a6f5696d Merge pull request #1032 from utin-francis-peter/fix/issue#1016
FEAT: Auto Language Detection using User's Browser Default
2024-07-07 17:19:32 +04:00
utin-francis-peter
abf5b89c28 refactor: handling applied styles based on colorVariant in a neater manner 2024-07-07 08:33:02 +01:00
utin-francis-peter
d554444b0e chore: updated Input prop from hasSilverBorder to colorVariant 2024-07-06 21:22:41 +01:00
utin-francis-peter
16ae0725e6 chore: took off the option of looking-up docsgpt-locale lang key in localStorage on first load 2024-07-06 20:41:21 +01:00
utin-francis-peter
61feced541 Merge branch 'feat/issue#1017' of https://github.com/utin-francis-peter/DocsGPT into feat/issue#1017 2024-07-05 21:57:46 +01:00
utin-francis-peter
a1d4db2f1e Merge branch 'main' of https://github.com/utin-francis-peter/DocsGPT into feat/issue#1017 2024-07-05 12:15:38 +01:00
Utin Francis Peter
357e9af627 chore: typo elimination
Co-authored-by: Siddhant Rai <47355538+siiddhantt@users.noreply.github.com>
2024-07-05 12:07:33 +01:00
utin-francis-peter
a41519be63 fix: minor typo 2024-07-05 11:41:12 +01:00
FIRST_NAME LAST_NAME
870e6b07c8 Merge branch 'main' of https://github.com/blackviking27/DocsGPT into feat-bubble-width 2024-07-04 19:12:04 +05:30
utin-francis-peter
6f41759519 Merge branch 'main' of https://github.com/utin-francis-peter/DocsGPT into fix/issue#1016 2024-07-04 10:11:57 +01:00
utin-francis-peter
6727c42f18 feat: auto browser lang detection on first visit 2024-07-04 10:05:54 +01:00
utin-francis-peter
90c367842f chore: added browser lang detector package by i18next 2024-07-04 09:00:14 +01:00
Alex
a0bb6e370e Merge pull request #1018 from utin-francis-peter/fix/issue#1014 2024-07-04 00:35:29 +04:00
Alex
f2910ab9d1 Merge pull request #1029 from arc53/dependabot/npm_and_yarn/docs/braces-3.0.3
chore(deps): bump braces from 3.0.2 to 3.0.3 in /docs
2024-07-03 23:11:43 +04:00
utin-francis-peter
b4bfed2ccb style: query submission icon centering 2024-07-03 15:46:35 +01:00
dependabot[bot]
2fcde61b6d chore(deps): bump braces from 3.0.2 to 3.0.3 in /docs
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-03 13:10:18 +00:00
Alex
ffddf10de5 Merge pull request #1026 from ManishMadan2882/main 2024-07-03 17:09:46 +04:00
utin-francis-peter
6e3bd5e6f3 fix: adjusted alignment of submit query icon within its container 2024-07-03 13:29:34 +01:00
utin-francis-peter
b21230c4d6 chore: migrated to using custom Input component to address redundant twClasses 2024-07-03 12:34:13 +01:00
utin-francis-peter
0a533b64e1 chore: migrated prop type definition into a types declaration file for components. other components prop types will live here 2024-07-03 11:49:49 +01:00
utin-francis-peter
15b0e321bd chore: TextArea component to replace Div contentEditable for entering prompts 2024-07-03 11:24:29 +01:00
ManishMadan2882
4d749340a2 fix: lint error - semantic ambiguity 2024-07-03 13:25:47 +05:30
utin-francis-peter
0ef6ffa452 gap between y-borders and prompts input + border-radius reduction as prompts input grows 2024-07-02 19:48:19 +01:00
FIRST_NAME LAST_NAME
d7b1310ba3 conversation bubble width fix 2024-07-02 22:11:21 +05:30
utin-francis-peter
7408454a75 chore: prompts input now uses useState hook for state change and inbuilt autoFocus 2024-07-01 19:54:31 +01:00
utin-francis-peter
07b71468cc style: removed custom padding and used twClasses 2024-06-29 20:45:33 +01:00
utin-francis-peter
522e966194 refactor: custom input component is used. inputRef is also replaced with state value 2024-06-29 18:58:13 +01:00
utin-francis-peter
937c60c9cf style: updated custom css class to match textInput component's 2024-06-29 18:55:10 +01:00
utin-francis-peter
bbb1e22163 style: spacings... 2024-06-28 20:19:01 +01:00
utin-francis-peter
a16e83200a style fix: gap between conversations wrapper and prompts input wrapper 2024-06-28 15:16:55 +01:00
utin-francis-peter
d437521710 style fix: response bubble padding and radius 2024-06-28 14:45:14 +01:00
utin-francis-peter
5cbf4cf352 style fix: padding and radius of question bubble 2024-06-28 14:24:34 +01:00
Alex
2985e3b75b Merge pull request #1013 from arc53/fix/singleton-llama-cpp
fix: use singleton in llama_cpp
2024-06-25 18:25:01 +01:00
Alex
f34a75fc5b Merge pull request #1004 from utin-francis-peter/fix/traning-progress
Fix/training progress
2024-06-25 14:57:26 +01:00
Alex
5aa88714b8 refactor: Add thread lock 2024-06-25 14:41:04 +01:00
Alex
ce56a414e0 fix: use singleton 2024-06-25 14:37:00 +01:00
Alex
ba4a7dcd45 Merge pull request #1012 from siiddhantt/fix/input-box-cutting-content
fix: input box improvements
2024-06-25 13:38:08 +01:00
Siddhant Rai
85c648da6c fix: large spacing + padding issue in input box 2024-06-25 17:58:16 +05:30
Alex
483f8eb690 Merge pull request #1011 from arc53/dependabot/npm_and_yarn/braces-3.0.3
chore(deps-dev): bump braces from 3.0.2 to 3.0.3
2024-06-25 13:10:18 +01:00
dependabot[bot]
93c868d698 chore(deps-dev): bump braces from 3.0.2 to 3.0.3
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-25 12:05:49 +00:00
Alex
a14e70e3f4 Merge pull request #1006 from arc53/dependabot/npm_and_yarn/frontend/braces-3.0.3
chore(deps-dev): bump braces from 3.0.2 to 3.0.3 in /frontend
2024-06-25 13:04:35 +01:00
Alex
a6ff606cae Merge pull request #1008 from utin-francis-peter/fix/issue#998
Fix/issue#998
2024-06-24 22:14:24 +01:00
utin-francis-peter
651eb3374c chore: on language change when active tab is general, active tab is persisted as general 2024-06-23 23:33:27 +01:00
utin-francis-peter
68c71adc5a chore: i18n "General" tab title 2024-06-23 23:29:59 +01:00
utin-francis-peter
0c4ca9c94d refactor: selected language gets stored in local state, triggering an effect that updates lang value in local storage and change language 2024-06-23 23:27:43 +01:00
utin-francis-peter
8c04f5b3f1 chore: selected language isn't included in language options 2024-06-23 23:19:14 +01:00
Alex
35b29a0a1e Merge pull request #1005 from siiddhantt/fix/modals-and-sidebar
fix: modals close on clicking outside
2024-06-23 12:51:51 +01:00
dependabot[bot]
d289f432b1 chore(deps-dev): bump braces from 3.0.2 to 3.0.3 in /frontend
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-21 18:49:54 +00:00
Siddhant Rai
e16e269775 fix: dropdown closes on clicking outside 2024-06-21 23:35:03 +05:30
utin-francis-peter
4e5d0c2e84 Merge branch 'main' of https://github.com/utin-francis-peter/DocsGPT into fix/traning-progress 2024-06-21 18:06:55 +01:00
utin-francis-peter
c9a2034936 chore: adjusted delay time before training starts 2024-06-21 18:04:30 +01:00
Alex
b70fc1151d fix: print error to console 2024-06-21 14:54:32 +01:00
utin-francis-peter
c11034edcd chore: slight delay between uploading and learning progress transition 2024-06-20 23:35:39 +01:00
utin-francis-peter
804d9b42a5 Merge branch 'main' of https://github.com/utin-francis-peter/DocsGPT into fix/traning-progress 2024-06-20 22:33:44 +01:00
utin-francis-peter
b1bb4e6758 fix: uploading/training progress bar 2024-06-20 22:18:18 +01:00
Alex
76ed8f0ba2 Merge pull request #1002 from ManishMadan2882/main
Better Error handling on /stream endpoint
2024-06-20 20:00:55 +01:00
Alex
4dde7eaea1 feat: Improve error handling in /stream route 2024-06-20 19:51:35 +01:00
Alex
2e2149c110 fix: stream stuff 2024-06-20 19:40:29 +01:00
ManishMadan2882
70bb9477c5 update err msg, if req fails from client 2024-06-20 18:21:19 +05:30
Alex
ec5363e9c1 Merge pull request #1001 from utin-francis-peter/latest-srcdoc-as-active
Fix: Set Uploaded/Trained/Latest Source Doc as Selected/Active Source Doc
2024-06-20 13:31:10 +01:00
ManishMadan2882
dba3b1c559 sort local vectors in latest first order 2024-06-20 17:58:59 +05:30
utin-francis-peter
9606e3f80c chore: handleDeleteClick now accepts only doc as param 2024-06-20 06:00:32 +01:00
utin-francis-peter
7bc7b500f5 refactor/chore: migrated away from manually removing a deleted source doc from UI / latest docs are fetched after deletion to update UI 2024-06-20 05:58:39 +01:00
utin-francis-peter
c6e804fa10 Merge branch 'main' of https://github.com/utin-francis-peter/DocsGPT into latest-srcdoc-as-active 2024-06-20 00:19:09 +01:00
utin-francis-peter
1cbaf9bd9d chore: updates from upstream 2024-06-20 00:05:14 +01:00
utin-francis-peter
45145685d5 fix: upon successful training of newly uploaded src doc, the latest doc is auto set as selected doc 2024-06-19 23:41:38 +01:00
utin-francis-peter
2fbec6f21f chore: added cleanup fxn for TrainingProgress timeout fxn 2024-06-19 23:39:16 +01:00
ManishMadan2882
ad29d2765f fix: add reducers to raise error, handle complete_stream() 2024-06-20 00:10:29 +05:30
Alex
e47e751142 fix link 2024-06-19 12:35:30 +01:00
Alex
c63d4ccf3e Merge pull request #1000 from arc53/feat/upgrade-ubuntu-docker
upgrade docker to 24.04
2024-06-19 11:57:37 +01:00
Alex
e5c30cf841 upgrade docker to 24.04 2024-06-19 11:45:37 +01:00
Alex
c80678aac5 Merge pull request #994 from xucailiang/fix-celery-import-error
rename celery.py
2024-06-19 09:47:52 +01:00
xucai
1754570057 rename celery_init.py 2024-06-19 16:17:09 +08:00
xucailiang
d87b411193 Merge branch 'arc53:main' into fix-celery-import-error 2024-06-19 15:16:39 +08:00
utin-francis-peter
8fc6284317 chore: on deleting an uploaded doc, default doc gets set as selected source doc 2024-06-18 23:33:49 +01:00
Alex
eae49d2367 Merge pull request #996 from arc53/feat/memory-embedding-singleton
chore: Refactor embeddings instantiation to use a singleton pattern
2024-06-18 11:52:27 +01:00
ManishMadan2882
69287c5198 feat: err handling /stream 2024-06-18 16:12:18 +05:30
Alex
e6b3984f78 Merge pull request #988 from utin-francis-peter/fix/retry-btn
Fix/retry-btn
2024-06-15 11:36:46 +01:00
Alex
547fe888d4 Merge pull request #991 from vedantbhatter/vedant-branch
Adding in Mandarin translation into DocsGPT
2024-06-14 15:13:45 +01:00
Alex
3454309cbc chore: Refactor embeddings instantiation to use a singleton pattern 2024-06-14 12:58:35 +01:00
utin-francis-peter
544c46cd44 chore: retry btn is side-by-side with error mssg 2024-06-14 00:31:33 +01:00
utin-francis-peter
2c100825cc Merge branch 'main' of https://github.com/utin-francis-peter/DocsGPT into fix/retry-btn 2024-06-13 23:25:33 +01:00
Alex
558ecd84a6 Merge pull request #993 from siiddhantt/fix/input-bar-hidden-safari
fix: input field covered by url bar in safari
2024-06-13 14:18:26 +01:00
utin-francis-peter
df24cfff4f style: improve visibility of bottom-most message bubble 2024-06-12 22:52:43 +01:00
Siddhant Rai
bd5d93a964 fix: unfixed input bar + safe area inset for Safari (iOS) 2024-06-13 00:21:51 +05:30
xucai
ae2ded119f rename celery_init.py 2024-06-12 19:48:28 +08:00
Siddhant Rai
abdb80a6be fix: input field covered by url bar in safari 2024-06-12 15:55:55 +05:30
utin-francis-peter
2f9cbe2bf1 chore: if user types in a new prompt after failed generation (instead of hitting retry btn), the failed query is updated with the new prompt before response is fetched. Ensuring every query object remains useful & relevant 2024-06-11 20:30:12 +01:00
utin-francis-peter
2cca7d60d5 chore: modified "retry" generation flow to give users the option of retrying with prev failed response or entering a new prompt into the provided field 2024-06-11 18:19:35 +01:00
Alex
3df745d1d2 Merge pull request #990 from IlyasOsman/token-format
Denominations on tokens
2024-06-11 10:19:28 +01:00
Alex
9862083e0b Update README.md 2024-06-11 10:11:09 +01:00
Vedant Bhatter
7a4976c470 Addign in Mandarin translation into DocsGPT 2024-06-10 17:47:49 -07:00
ilyasosman
8834a19743 Denominations on tokens 2024-06-10 22:50:35 +03:00
Alex
6e15403f60 Merge pull request #989 from SDanielDev/working
Updated nextra docs with new html code block installation instruction
2024-06-10 10:57:45 +01:00
utin-francis-peter
7e1cf10cb2 style: reduced retry container padding 2024-06-09 13:49:26 +01:00
utin-francis-peter
ee762c3c68 chore: modified handleQuestion params for more clarity 2024-06-09 13:47:51 +01:00
utin-francis-peter
32c06414c5 style: added theme adaptable RetryIcon component to Retry btn 2024-06-08 03:29:18 +01:00
SamDanielDev
e97e1ba4bc Updated nextra docs with new html code block installation instruction 2024-06-07 18:16:50 +01:00
utin-francis-peter
2f580f7800 feat: japan locale config 2024-06-07 17:40:33 +01:00
utin-francis-peter
1ce1459455 Merge branch 'main' of https://github.com/utin-francis-peter/DocsGPT into fix/retry-btn 2024-06-07 17:38:03 +01:00
utin-francis-peter
c26573482e style: retry query generation btn 2024-06-07 17:28:13 +01:00
utin-francis-peter
414ec08dee refactor: modified prepResponseView to prioritize query.response and trigger re-render after a failed generation is retried 2024-06-07 17:26:19 +01:00
Alex
1cc78191eb Merge pull request #987 from charlesnilsson/main
my-japanese-translation
2024-06-07 16:14:25 +01:00
Alex
75c6c6081a feat: Add Japanese translation support fix 2024-06-07 16:08:36 +01:00
utin-francis-peter
8d2ebe9718 feat: "Retry" btn conditionally renders in place of query input when a generation fails. Uses prev query to fetch answer when clicked. 2024-06-07 15:59:56 +01:00
Charles Nilsson
eed974b883 my-japanese-translation 2024-06-07 16:44:16 +02:00
utin-francis-peter
ae846dac4d chore: received changes from upstream 2024-06-07 15:33:24 +01:00
utin-francis-peter
0b09c00b50 chore: modified handleQuestion to favor "Retry" action after a failed response generation 2024-06-07 14:47:29 +01:00
Alex
f7a1874cb3 Merge pull request #979 from arc53/dependabot/pip/application/qdrant-client-1.9.0
chore(deps): bump qdrant-client from 1.8.2 to 1.9.0 in /application
2024-06-04 19:13:55 +01:00
dependabot[bot]
28fb04eb7b chore(deps): bump qdrant-client from 1.8.2 to 1.9.0 in /application
Bumps [qdrant-client](https://github.com/qdrant/qdrant-client) from 1.8.2 to 1.9.0.
- [Release notes](https://github.com/qdrant/qdrant-client/releases)
- [Commits](https://github.com/qdrant/qdrant-client/compare/v1.8.2...v1.9.0)

---
updated-dependencies:
- dependency-name: qdrant-client
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-04 17:53:28 +00:00
Alex
34310cf420 Merge pull request #974 from siiddhantt/fix/pr-960
fix/pr-960
2024-06-03 22:44:36 +01:00
Alex
e1d61d7190 Merge pull request #961 from arc53/dependabot/pip/application/requests-2.32.0
build(deps): bump requests from 2.31.0 to 2.32.0 in /application
2024-06-03 22:43:11 +01:00
Alex
9c14ac84cb Merge pull request #977 from shelar1423/main
DocsGPT link update
2024-06-03 17:26:54 +01:00
Siddhant Rai
1d1ea7b6f2 fix: version update 2024-06-03 20:59:52 +05:30
digvijay shelar
92401f5b7c link fix 2024-06-03 20:59:30 +05:30
Siddhant Rai
38ac9218ec fix: unpkg link in readme 2024-06-03 20:43:43 +05:30
Siddhant Rai
48497c749a fix: dompurify import error 2024-06-03 20:36:52 +05:30
Siddhant Rai
72a1892058 fix: added targets for browser environment 2024-06-03 12:57:53 +05:30
Siddhant Rai
f2c328d212 fix: empty types.d.ts generated during build + updated README.md 2024-06-01 14:10:12 +05:30
Alex
e9eafc40a7 Merge pull request #971 from shelar1423/main
FIX: improved documentation
2024-05-30 15:32:48 +01:00
digvijay shelar
933ca1bf81 updated the llm instructions for OS version 2024-05-30 18:51:56 +05:30
digvijay shelar
b4fc9aa7eb new home demo 2024-05-30 18:27:40 +05:30
Digvijay Shelar
dcc475bbef Merge branch 'arc53:main' into main 2024-05-30 18:22:56 +05:30
Alex
1fe35ad0cd Merge pull request #970 from siiddhantt/feature/link-to-source
feat: remote sources have clickable links to original url
2024-05-30 12:06:05 +01:00
Siddhant Rai
f1ed1e0f14 fix: type error 2024-05-30 15:33:16 +05:30
Alex
fcc746fb98 Merge pull request #972 from ManishMadan2882/main
Fix: added translation for the conversation history dropdown
2024-05-29 18:37:43 +01:00
ManishMadan2882
95934a5b7a (i18n): updated for conv history 2024-05-29 22:54:46 +05:30
Digvijay Shelar
d38b101820 Merge branch 'arc53:main' into main 2024-05-29 19:45:35 +05:30
Siddhant Rai
91d730a7bc feat: remote sources have clickable links 2024-05-29 19:07:08 +05:30
Alex
0cfa77b628 chats word in translations 2024-05-29 11:29:00 +01:00
Alex
ca4881ad51 Merge pull request #969 from ManishMadan2882/main
Internationalisation with i18next
2024-05-29 11:23:45 +01:00
digvijay shelar
8c2c064fe2 updated emoji's 2024-05-29 15:25:23 +05:30
Digvijay Shelar
10646b9b86 Merge branch 'arc53:main' into main 2024-05-29 15:04:16 +05:30
Alex
967b195946 Merge pull request #967 from starkgate/empty-response-after-streaming
Fix empty response in the conversation
2024-05-28 23:06:46 +01:00
ManishMadan2882
1ae7771290 add spacing in general, minor change 2024-05-29 03:27:53 +05:30
ManishMadan2882
a585fe4d54 refactored locale json 2024-05-28 21:38:42 +05:30
ManishMadan2882
fa3a9fe70e fix: minor changes 2024-05-28 21:35:10 +05:30
ManishMadan2882
99952a393f feat(i18n): modals, Hero, Nav 2024-05-28 20:50:07 +05:30
digvijay shelar
920a41e3ca api section fixed 2024-05-28 20:47:22 +05:30
digvijay shelar
e5bec957a1 issue #962 2024-05-28 20:32:35 +05:30
Alex
41cb765255 Update README.md 2024-05-28 10:09:06 +01:00
Alex
2d12a3cd7a Merge pull request #965 from siiddhantt/feature/set-tokens-message-history
feat: dropdown to adjust conversational history limits
2024-05-28 09:43:21 +01:00
starkgate
df4fe0176c Fix empty response in the conversation 2024-05-28 10:40:55 +02:00
ManishMadan2882
4fcc80719e feat(i18n): settings static content 2024-05-28 01:39:37 +05:30
Alex
f6c66f6ee4 Merge pull request #964 from ManishMadan2882/main
Feature: Token count for vectors
2024-05-27 11:44:11 +01:00
Siddhant Rai
220d137e66 feat: dropdown to adjust conversational history limits 2024-05-26 23:13:01 +05:30
Alex
425803a1b6 chore: Refactor source assignment in api_answer route 2024-05-24 16:50:00 +01:00
Manish Madan
c794ea614a Merge branch 'arc53:main' into main 2024-05-24 21:12:07 +05:30
ManishMadan2882
9000838aab (feat:vectors): calc, add token in db 2024-05-24 21:10:50 +05:30
Alex
2790bda1e9 feat: Update Kubernetes deployment instructions for DocsGPT 2024-05-24 16:16:32 +01:00
Alex
e13d4daa9a chore: Remove unused VECTOR_STORE variable in docsgpt-secrets.yaml 2024-05-24 16:09:31 +01:00
Alex
2f504a4e03 Merge pull request #963 from arc53/feat/kubes-deployment
feat: k8s deployment
2024-05-24 14:48:22 +01:00
Alex
598a50a133 feat: Add Kubernetes deployment instructions for DocsGPT 2024-05-24 14:40:28 +01:00
Alex
1b06a5a3e0 feat: k8s deployment 2024-05-23 18:23:01 +01:00
Alex
9f1d3b0269 Update README.md 2024-05-22 16:34:04 +01:00
Alex
a09543d38b Update README.md 2024-05-22 16:33:48 +01:00
dependabot[bot]
2ab3539925 ---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-21 05:53:49 +00:00
Alex
23ddf53abe Update ci.yml 2024-05-20 12:09:11 +01:00
ilyasosman
d8720d0849 Add DocsGPTWidget embedding support for HTML 2024-05-19 22:08:18 +03:00
Alex
6753b55160 Merge pull request #955 from sossost/feat/add_copy_button_on_code_snippet
Feat : add copy button on code snippet
2024-05-18 13:08:25 +01:00
Alex
7f7f48ad56 Merge pull request #958 from arc53/feat-pre-loading-embeds
chore: Update Docker build platforms for application and frontend and…
2024-05-18 12:49:19 +01:00
jang_yoonsu
149ca01029 fix : Add group property to code block parent element and add copy button condition 2024-05-18 20:43:13 +09:00
Alex
5c8133a810 chore: Update Docker build platforms for application and frontend and optimised embedding import 2024-05-18 12:10:24 +01:00
Alex
2adccdd1b0 Merge pull request #957 from ManishMadan2882/main
Update Sidebar
2024-05-17 14:37:44 +01:00
ManishMadan2882
b91068d658 (navbar): shrink navbar 2024-05-17 18:07:06 +05:30
Alex
4534cafd3f Merge pull request #949 from ManishMadan2882/main
Updating Hero
2024-05-16 23:32:49 +01:00
Alex
405e79d729 removed space 2024-05-16 23:32:12 +01:00
ManishMadan2882
4df2349e9d (hero) minor update 2024-05-17 00:59:47 +05:30
jang_yoonsu
a9b61d3e13 design : add style invisible when lg and visible when hover 2024-05-16 23:29:33 +09:00
jang_yoonsu
3767d14e5c feat: add copy button in code snippet 2024-05-16 23:23:46 +09:00
jang_yoonsu
889a050f25 feat : add copy button component 2024-05-16 23:23:06 +09:00
ManishMadan2882
0701fac807 (hero): hover button outline 2024-05-16 18:42:19 +05:30
ManishMadan2882
9fba91069a lint fix 2024-05-16 18:27:36 +05:30
ManishMadan2882
4f9ce70ff8 (hero): demo queries on click 2024-05-16 18:23:45 +05:30
Alex
5e00d4ded7 Merge pull request #953 from shelar1423/main
FIX: Spinner
2024-05-16 10:51:40 +01:00
digvijay shelar
95cd9ee5bb spinner fixed 2024-05-16 15:15:48 +05:30
Alex
40f16f8ef1 Merge pull request #952 from ManishMadan2882/fix-api-key-parse
FIx: API Key Parsing
2024-05-15 16:27:43 +01:00
ManishMadan2882
3d9288f82f fix: override chunks,promps with api-key-data 2024-05-15 20:23:02 +05:30
ManishMadan2882
c51f12f88b (conversation)- taller input field 2024-05-15 16:31:41 +05:30
Alex
0618153390 fix: object id bug 2024-05-14 19:01:45 +01:00
Alex
a7c066291b Update README.md 2024-05-13 17:08:12 +01:00
Alex
a69ac372fa Merge pull request #946 from siiddhantt/refactor/ui-elements
refactor: several small ui refactor for generalisation
2024-05-13 11:47:20 +01:00
Alex
16b2a54981 Merge pull request #936 from Fagner-lourenco/patch-1
Update Dockerfile
2024-05-12 22:36:52 +01:00
Alex
3f68e0d66f chore: Update Dockerfile 2024-05-12 22:33:43 +01:00
Alex
12d483fde6 chore: update documentation links to use the new domain 2024-05-12 11:40:09 +01:00
Siddhant Rai
96034a9712 fix: minor change 2024-05-12 12:56:34 +05:30
Siddhant Rai
d2def4479b refactor: several small ui refactor for generalisation 2024-05-12 12:41:12 +05:30
ManishMadan2882
afbbb913e7 (hero): updating the UI 2024-05-10 16:21:42 +05:30
Alex
ad76f239a3 Merge pull request #943 from arc53/dependabot/npm_and_yarn/docs/next-14.1.1
build(deps): bump next from 14.0.4 to 14.1.1 in /docs
2024-05-10 11:29:37 +01:00
dependabot[bot]
e6b096c9e0 build(deps): bump next from 14.0.4 to 14.1.1 in /docs
Bumps [next](https://github.com/vercel/next.js) from 14.0.4 to 14.1.1.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.0.4...v14.1.1)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-10 04:27:40 +00:00
Alex
6e26b4e6c7 Merge pull request #942 from ManishMadan2882/main
Fix: Abnormal overflow on mobile screens and arbitrary word breaks.
2024-05-09 16:29:42 +01:00
ManishMadan2882
ea79494b6d fix(conversation): overflows in sources, removed tagline below input 2024-05-08 20:50:20 +05:30
ManishMadan2882
afb18a3e4d (conversation) makes overflow auto 2024-05-08 16:17:16 +05:30
ManishMadan2882
f9c9853102 fix(conversation) word breaks 2024-05-08 16:07:49 +05:30
ManishMadan2882
b3eb9fb6fa fix(conversation): mobile abnormal overflows 2024-05-08 15:56:52 +05:30
Alex
d3b97bf51a Merge pull request #941 from ManishMadan2882/main
fix(UI):conversation,settings
2024-05-08 09:50:30 +01:00
ManishMadan2882
7a2e491199 fix(UI):conversation,settings 2024-05-07 20:37:05 +05:30
Alex
25efaf08b7 Merge pull request #935 from arc53/dependabot/pip/application/tqdm-4.66.3
build(deps): bump tqdm from 4.66.1 to 4.66.3 in /application
2024-05-07 09:52:09 +01:00
Alex
f893ea6b98 Merge pull request #934 from arc53/dependabot/pip/scripts/tqdm-4.66.3
build(deps): bump tqdm from 4.66.1 to 4.66.3 in /scripts
2024-05-07 09:51:57 +01:00
dependabot[bot]
500745b62c build(deps): bump tqdm from 4.66.1 to 4.66.3 in /application
Bumps [tqdm](https://github.com/tqdm/tqdm) from 4.66.1 to 4.66.3.
- [Release notes](https://github.com/tqdm/tqdm/releases)
- [Commits](https://github.com/tqdm/tqdm/compare/v4.66.1...v4.66.3)

---
updated-dependencies:
- dependency-name: tqdm
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-07 08:24:51 +00:00
Alex
9ebe5bf1a7 Merge pull request #939 from arc53/dependabot/pip/application/werkzeug-3.0.3
build(deps): bump werkzeug from 3.0.1 to 3.0.3 in /application
2024-05-07 09:23:58 +01:00
dependabot[bot]
4aecb86daa build(deps): bump werkzeug from 3.0.1 to 3.0.3 in /application
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 3.0.1 to 3.0.3.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/werkzeug/compare/3.0.1...3.0.3)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 19:28:27 +00:00
Fagner-lourenco
6924dd6df6 Update Dockerfile 2024-05-04 20:50:11 -03:00
Alex
431755144e fix: Update count_tokens function in utils.py 2024-05-04 10:39:23 +01:00
dependabot[bot]
d182f81754 build(deps): bump tqdm from 4.66.1 to 4.66.3 in /scripts
Bumps [tqdm](https://github.com/tqdm/tqdm) from 4.66.1 to 4.66.3.
- [Release notes](https://github.com/tqdm/tqdm/releases)
- [Commits](https://github.com/tqdm/tqdm/compare/v4.66.1...v4.66.3)

---
updated-dependencies:
- dependency-name: tqdm
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-03 21:48:38 +00:00
Alex
de0193fffc Merge pull request #933 from siiddhantt/fix/remote-upload-issue
fix: remote upload error
2024-05-03 14:54:12 +01:00
Siddhant Rai
53e86205ad fix: added more headers from default 2024-05-03 18:47:30 +05:30
Siddhant Rai
aa670efe3a fix: connection aborted in WebBaseLoader 2024-05-03 18:25:01 +05:30
Alex
e693fe49a7 fix: fixed Dockerfile python path bug 2024-05-03 11:55:51 +01:00
Alex
7eaa32d85f remove gunicorn from final 2024-05-02 14:43:09 +01:00
Alex
ab40d2c37a remove pip from final container 2024-05-01 14:11:16 +01:00
Alex
784206b39b chore: Update Dockerfile to use Ubuntu mantic as base image and upgrade gunicorn to version 22.0.0 2024-05-01 13:19:16 +01:00
Alex
7c8264e221 Merge pull request #929 from TomasMatarazzo/issue-button-to-clean-chat-history
Issue button to clean chat history
2024-05-01 10:54:34 +01:00
TomasMatarazzo
db7195aa30 Update Navigation.tsx 2024-04-29 17:02:22 -03:00
TomasMatarazzo
eb7bbc1612 TS2741 2024-04-27 11:04:28 -03:00
TomasMatarazzo
ee3792181d probando 2024-04-26 20:35:36 -03:00
TomasMatarazzo
9804965a20 style in button and user in back route delete all conv 2024-04-25 23:43:45 -03:00
TomasMatarazzo
b84842df3d Fixing types 2024-04-22 16:35:44 -03:00
TomasMatarazzo
fc170d3033 Update package.json 2024-04-22 16:19:00 -03:00
TomasMatarazzo
8fa4ec7ad8 delete console.log 2024-04-22 16:17:26 -03:00
TomasMatarazzo
480825ddd7 now is working in settings 2024-04-22 16:16:19 -03:00
TomasMatarazzo
260e328cc1 first change 2024-04-22 14:41:59 -03:00
TomasMatarazzo
88d9d4f4a3 Update DeleteConvModal.tsx 2024-04-18 13:56:03 -03:00
TomasMatarazzo
d4840f85c0 change text in modal 2024-04-18 13:50:08 -03:00
TomasMatarazzo
6f9ddeaed0 Button to clean chat history 2024-04-17 19:51:29 -03:00
248 changed files with 19224 additions and 14616 deletions

19
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/application" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "npm" # See documentation for possible values
directory: "/frontend" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

14
.github/holopin.yml vendored
View File

@@ -1,5 +1,11 @@
organization: arc53
defaultSticker: clqmdf0ed34290glbvqh0kzxd
organization: docsgpt
defaultSticker: cm1ulwkkl180570cl82rtzympu
stickers:
- id: clqmdf0ed34290glbvqh0kzxd
alias: festive
- id: cm1ulwkkl180570cl82rtzympu
alias: contributor2024
- id: cm1ureg8o130450cl8c1po6mil
alias: api
- id: cm1urhmag148240cl8yvqxkthx
alias: lpc
- id: cm1urlcpq622090cl2tvu4w71y
alias: lexeu

24
.github/labeler.yml vendored
View File

@@ -1,23 +1,31 @@
repo:
- '*'
- changed-files:
- any-glob-to-any-file: '*'
github:
- .github/**/*
- changed-files:
- any-glob-to-any-file: '.github/**/*'
application:
- application/**/*
- changed-files:
- any-glob-to-any-file: 'application/**/*'
docs:
- docs/**/*
- changed-files:
- any-glob-to-any-file: 'docs/**/*'
extensions:
- extensions/**/*
- changed-files:
- any-glob-to-any-file: 'extensions/**/*'
frontend:
- frontend/**/*
- changed-files:
- any-glob-to-any-file: 'frontend/**/*'
scripts:
- scripts/**/*
- changed-files:
- any-glob-to-any-file: 'scripts/**/*'
tests:
- tests/**/*
- changed-files:
- any-glob-to-any-file: 'tests/**/*'

View File

@@ -1,10 +1,8 @@
name: Build and push DocsGPT Docker image
on:
workflow_dispatch:
push:
branches:
- main
release:
types: [published]
jobs:
deploy:
@@ -13,37 +11,37 @@ jobs:
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to ghcr.io
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# Runs a single command using the runners shell
- name: Build and push Docker images to docker.io and ghcr.io
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
file: './application/Dockerfile'
platforms: linux/amd64
context: ./application
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/docsgpt:latest
ghcr.io/${{ github.repository_owner }}/docsgpt:latest
${{ secrets.DOCKER_USERNAME }}/docsgpt:${{ github.event.release.tag_name }},${{ secrets.DOCKER_USERNAME }}/docsgpt:latest
ghcr.io/${{ github.repository_owner }}/docsgpt:${{ github.event.release.tag_name }},ghcr.io/${{ github.repository_owner }}/docsgpt:latest
cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/docsgpt:latest
cache-to: type=inline

View File

@@ -1,35 +1,33 @@
name: Build and push DocsGPT-FE Docker image
on:
workflow_dispatch:
push:
branches:
- main
release:
types: [published]
jobs:
deploy:
if: github.repository == 'arc53/DocsGPT'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to ghcr.io
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
@@ -37,12 +35,14 @@ jobs:
# Runs a single command using the runners shell
- name: Build and push Docker images to docker.io and ghcr.io
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
file: './frontend/Dockerfile'
platforms: linux/amd64
platforms: linux/amd64, linux/arm64
context: ./frontend
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:latest
ghcr.io/${{ github.repository_owner }}/docsgpt-fe:latest
${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:${{ github.event.release.tag_name }},${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:latest
ghcr.io/${{ github.repository_owner }}/docsgpt-fe:${{ github.event.release.tag_name }},ghcr.io/${{ github.repository_owner }}/docsgpt-fe:latest
cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:latest
cache-to: type=inline

View File

@@ -0,0 +1,49 @@
name: Build and push DocsGPT Docker image for development
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy:
if: github.repository == 'arc53/DocsGPT'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images to docker.io and ghcr.io
uses: docker/build-push-action@v6
with:
file: './application/Dockerfile'
platforms: linux/amd64
context: ./application
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/docsgpt:develop
ghcr.io/${{ github.repository_owner }}/docsgpt:develop
cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/docsgpt:develop
cache-to: type=inline

View File

@@ -0,0 +1,49 @@
name: Build and push DocsGPT FE Docker image for development
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy:
if: github.repository == 'arc53/DocsGPT'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images to docker.io and ghcr.io
uses: docker/build-push-action@v6
with:
file: './frontend/Dockerfile'
platforms: linux/amd64
context: ./frontend
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:develop
ghcr.io/${{ github.repository_owner }}/docsgpt-fe:develop
cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:develop
cache-to: type=inline

View File

@@ -4,12 +4,13 @@ on:
- pull_request_target
jobs:
triage:
if: github.repository == 'arc53/DocsGPT'
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true

View File

@@ -11,7 +11,7 @@ jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Lint with Ruff
uses: chartboost/ruff-action@v1

View File

@@ -6,11 +6,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
@@ -21,10 +21,10 @@ jobs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest and generate coverage report
run: |
python -m pytest --cov=application --cov=scripts --cov=extensions --cov-report=xml
python -m pytest --cov=application --cov-report=xml
- name: Upload coverage reports to Codecov
if: github.event_name == 'pull_request' && matrix.python-version == '3.11'
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

View File

@@ -17,7 +17,7 @@ jobs:
steps:
# Step 1: run a standard checkout action
- name: Checkout target repo
uses: actions/checkout@v3
uses: actions/checkout@v4
# Step 2: run the sync action
- name: Sync upstream changes

2
.gitignore vendored
View File

@@ -172,5 +172,5 @@ application/vectors/
node_modules/
.vscode/settings.json
models/
/models/
model/

16
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,16 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Docker Debug Frontend",
"request": "launch",
"type": "chrome",
"preLaunchTask": "docker-compose: debug:frontend",
"url": "http://127.0.0.1:5173",
"webRoot": "${workspaceFolder}/frontend",
"skipFiles": [
"<node_internals>/**"
]
}
]
}

21
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,21 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "docker-compose",
"label": "docker-compose: debug:frontend",
"dockerCompose": {
"up": {
"detached": true,
"services": [
"frontend"
],
"build": true
},
"files": [
"${workspaceFolder}/docker-compose.yaml"
]
}
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -6,7 +6,7 @@ Thank you for choosing to contribute to DocsGPT! We are all very grateful!
📣 **Discussions** - Engage in conversations, start new topics, or help answer questions.
🐞 **Issues** - This is where we keep track of tasks. It could be bugs,fixes or suggestions for new features.
🐞 **Issues** - This is where we keep track of tasks. It could be bugs, fixes or suggestions for new features.
🛠️ **Pull requests** - Suggest changes to our repository, either by working on existing issues or adding new features.
@@ -21,8 +21,9 @@ Thank you for choosing to contribute to DocsGPT! We are all very grateful!
- If you're interested in contributing code, here are some important things to know:
- We have a frontend built on React (Vite) and a backend in Python.
=======
Before creating issues, please check out how the latest version of our app looks and works by launching it via [Quickstart](https://github.com/arc53/DocsGPT#quickstart) the version on our live demo is slightly modified with login. Your issues should relate to the version that you can launch via [Quickstart](https://github.com/arc53/DocsGPT#quickstart).
Before creating issues, please check out how the latest version of our app looks and works by launching it via [Quickstart](https://github.com/arc53/DocsGPT#quickstart) the version on our live demo is slightly modified with login. Your issues should relate to the version you can launch via [Quickstart](https://github.com/arc53/DocsGPT#quickstart).
### 👨‍💻 If you're interested in contributing code, here are some important things to know:
@@ -43,7 +44,7 @@ Please try to follow the guidelines.
### 🖥 If you are looking to contribute to Backend (🐍 Python):
- Review our issues and contribute to [`/application`](https://github.com/arc53/DocsGPT/tree/main/application) or [`/scripts`](https://github.com/arc53/DocsGPT/tree/main/scripts) (please disregard old [`ingest_rst.py`](https://github.com/arc53/DocsGPT/blob/main/scripts/old/ingest_rst.py) [`ingest_rst_sphinx.py`](https://github.com/arc53/DocsGPT/blob/main/scripts/old/ingest_rst_sphinx.py) files; they will be deprecated soon).
- Review our issues and contribute to [`/application`](https://github.com/arc53/DocsGPT/tree/main/application) or [`/scripts`](https://github.com/arc53/DocsGPT/tree/main/scripts) (please disregard old [`ingest_rst.py`](https://github.com/arc53/DocsGPT/blob/main/scripts/old/ingest_rst.py) [`ingest_rst_sphinx.py`](https://github.com/arc53/DocsGPT/blob/main/scripts/old/ingest_rst_sphinx.py) files; these will be deprecated soon).
- All new code should be covered with unit tests ([pytest](https://github.com/pytest-dev/pytest)). Please find tests under [`/tests`](https://github.com/arc53/DocsGPT/tree/main/tests) folder.
- Before submitting your Pull Request, ensure it can be queried after ingesting some test data.
@@ -125,4 +126,4 @@ Thank you for considering contributing to DocsGPT! 🙏
## Questions/collaboration
Feel free to join our [Discord](https://discord.gg/n5BX8dh8rU). We're very friendly and welcoming to new contributors, so don't hesitate to reach out.
# Thank you so much for considering to contribute DocsGPT!🙏
# Thank you so much for considering to contributing DocsGPT!🙏

41
HACKTOBERFEST.md Normal file
View File

@@ -0,0 +1,41 @@
# **🎉 Join the Hacktoberfest with DocsGPT and win a Free T-shirt and other prizes! 🎉**
Welcome, contributors! We're excited to announce that DocsGPT is participating in Hacktoberfest. Get involved by submitting meaningful pull requests.
All contributors with accepted PRs will receive a cool Holopin! 🤩 (Watch out for a reply in your PR to collect it).
### 🏆 Top 50 contributors will receive a special T-shirt
### 🏆 [LLM Document analysis by LexEU competition](https://github.com/arc53/DocsGPT/blob/main/lexeu-competition.md):
A separate competition is available for those who submit new retrieval / workflow method that will analyze a Document using EU laws.
With 200$, 100$, 50$ prize for 1st, 2nd and 3rd place respectively.
You can find more information [here](https://github.com/arc53/DocsGPT/blob/main/lexeu-competition.md)
## 📜 Here's How to Contribute:
```text
🛠️ Code: This is the golden ticket! Make meaningful contributions through PRs.
🧩 API extension: Build an app utilising DocsGPT API. We prefer submissions that showcase original ideas and turn the API into an AI agent.
They can be a completely separate repos.
For example:
https://github.com/arc53/tg-bot-docsgpt-extenstion or
https://github.com/arc53/DocsGPT-cli
Non-Code Contributions:
📚 Wiki: Improve our documentation, create a guide or change existing documentation.
🖥️ Design: Improve the UI/UX or design a new feature.
📝 Blogging or Content Creation: Write articles or create videos to showcase DocsGPT or highlight your contributions!
```
### 📝 Guidelines for Pull Requests:
- Familiarize yourself with the current contributions and our [Roadmap](https://github.com/orgs/arc53/projects/2).
- Before contributing we highly advise that you check existing [issues](https://github.com/arc53/DocsGPT/issues) or [create](https://github.com/arc53/DocsGPT/issues/new/choose) an issue and wait to get assigned.
- Once you are finished with your contribution, please fill in this [form](https://airtable.com/appikMaJwdHhC1SDP/pagoblCJ9W29wf6Hf/form).
- Refer to the [Documentation](https://docs.docsgpt.cloud/).
- Feel free to join our [Discord](https://discord.gg/n5BX8dh8rU) server. We're here to help newcomers, so don't hesitate to jump in! Join us [here](https://discord.gg/n5BX8dh8rU).
Thank you very much for considering contributing to DocsGPT during Hacktoberfest! 🙏 Your contributions (not just simple typos) could earn you a stylish new t-shirt and other prizes as a token of our appreciation. 🎁 Join us, and let's code together! 🚀

View File

@@ -7,9 +7,9 @@
</p>
<p align="left">
<strong><a href="https://docsgpt.arc53.com/">DocsGPT</a></strong> is a cutting-edge open-source solution that streamlines the process of finding information in the project documentation. With its integration of the powerful <strong>GPT</strong> models, developers can easily ask questions about a project and receive accurate answers.
<strong><a href="https://www.docsgpt.cloud/">DocsGPT</a></strong> is a cutting-edge open-source solution that streamlines the process of finding information in the project documentation. With its integration of the powerful <strong>GPT</strong> models, developers can easily ask questions about a project and receive accurate answers.
Say goodbye to time-consuming manual searches, and let <strong><a href="https://docsgpt.arc53.com/">DocsGPT</a></strong> help you quickly find the information you need. Try it out and see how it revolutionizes your project documentation experience. Contribute to its development and be a part of the future of AI-powered assistance.
Say goodbye to time-consuming manual searches, and let <strong><a href="https://www.docsgpt.cloud/">DocsGPT</a></strong> help you quickly find the information you need. Try it out and see how it revolutionizes your project documentation experience. Contribute to its development and be a part of the future of AI-powered assistance.
</p>
<div align="center">
@@ -27,10 +27,12 @@ Say goodbye to time-consuming manual searches, and let <strong><a href="https://
We're eager to provide personalized assistance when deploying your DocsGPT to a live environment.
- [Book Demo :wave:](https://airtable.com/appdeaL0F1qV8Bl2C/shrrJF1Ll7btCJRbP)
- [Send Email :email:](mailto:contact@arc53.com?subject=DocsGPT%20support%2Fsolutions)
[Book a Meeting :wave:](https://cal.com/arc53/docsgpt-demo-b2b)
![video-example-of-docs-gpt](https://d3dg1063dc54p9.cloudfront.net/videos/demov3.gif)
[Send Email :email:](mailto:contact@arc53.com?subject=DocsGPT%20support%2Fsolutions)
<img src="https://github.com/user-attachments/assets/9a1f21de-7a15-4e42-9424-70d22ba5a913" alt="video-example-of-docs-gpt" width="1000" height="500">
## Roadmap
@@ -46,23 +48,23 @@ You can find our roadmap [here](https://github.com/orgs/arc53/projects/2). Pleas
If you don't have enough resources to run it, you can use bitsnbytes to quantize.
## Features
## End to End AI Framework for Information Retrieval
![Main features of DocsGPT showcasing six main features](https://user-images.githubusercontent.com/17906039/220427472-2644cff4-7666-46a5-819f-fc4a521f63c7.png)
![Architecture chart](https://github.com/user-attachments/assets/fc6a7841-ddfc-45e6-b5a0-d05fe648cbe2)
## Useful Links
- :mag: :fire: [Live preview](https://docsgpt.arc53.com/)
- :mag: :fire: [Cloud Version](https://app.docsgpt.cloud/)
- :speech_balloon: :tada: [Join our Discord](https://discord.gg/n5BX8dh8rU)
- :books: :sunglasses: [Guides](https://docs.docsgpt.co.uk/)
- :books: :sunglasses: [Guides](https://docs.docsgpt.cloud/)
- :couple: [Interested in contributing?](https://github.com/arc53/DocsGPT/blob/main/CONTRIBUTING.md)
- :file_folder: :rocket: [How to use any other documentation](https://docs.docsgpt.co.uk/Guides/How-to-train-on-other-documentation)
- :file_folder: :rocket: [How to use any other documentation](https://docs.docsgpt.cloud/Guides/How-to-train-on-other-documentation)
- :house: :closed_lock_with_key: [How to host it locally (so all data will stay on-premises)](https://docs.docsgpt.co.uk/Guides/How-to-use-different-LLM)
- :house: :closed_lock_with_key: [How to host it locally (so all data will stay on-premises)](https://docs.docsgpt.cloud/Guides/How-to-use-different-LLM)
## Project Structure
@@ -85,7 +87,7 @@ On Mac OS or Linux, write:
It will install all the dependencies and allow you to download the local model, use OpenAI or use our LLM API.
Otherwise, refer to this Guide:
Otherwise, refer to this Guide for Windows:
1. Download and open this repository with `git clone https://github.com/arc53/DocsGPT.git`
2. Create a `.env` file in your root directory and set the env variables and `VITE_API_STREAMING` to true or false, depending on whether you want streaming answers or not.
@@ -124,7 +126,7 @@ docker compose -f docker-compose-dev.yaml up -d
> Make sure you have Python 3.10 or 3.11 installed.
1. Export required environment variables or prepare a `.env` file in the project folder:
- Copy [.env_sample](https://github.com/arc53/DocsGPT/blob/main/application/.env_sample) and create `.env`.
- Copy [.env-template](https://github.com/arc53/DocsGPT/blob/main/application/.env-template) and create `.env`.
(check out [`application/core/settings.py`](application/core/settings.py) if you want to see more config options.)
@@ -197,4 +199,9 @@ We as members, contributors, and leaders, pledge to make participation in our co
The source code license is [MIT](https://opensource.org/license/mit/), as described in the [LICENSE](LICENSE) file.
Built with [:bird: :link: LangChain](https://github.com/hwchase17/langchain)
<p>This project is supported by:</p>
<p>
<a href="https://www.digitalocean.com/?utm_medium=opensource&utm_source=DocsGPT">
<img src="https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg" width="201px">
</a>
</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -1,31 +1,88 @@
FROM python:3.11-slim-bullseye as builder
# Builder Stage
FROM ubuntu:24.04 as builder
# Tiktoken requires Rust toolchain, so build it in a separate stage
RUN apt-get update && apt-get install -y gcc curl
RUN apt-get install -y wget unzip
RUN wget https://d3dg1063dc54p9.cloudfront.net/models/embeddings/mpnet-base-v2.zip
RUN unzip mpnet-base-v2.zip -d model
RUN rm mpnet-base-v2.zip
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && apt-get install --reinstall libc6-dev -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN pip install --upgrade pip && pip install tiktoken==0.5.2
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
# Install necessary packages and Python
apt-get update && \
apt-get install -y --no-install-recommends gcc wget unzip libc6-dev python3.11 python3.11-distutils python3.11-venv && \
rm -rf /var/lib/apt/lists/*
# Verify Python installation and setup symlink
RUN if [ -f /usr/bin/python3.11 ]; then \
ln -s /usr/bin/python3.11 /usr/bin/python; \
else \
echo "Python 3.11 not found"; exit 1; \
fi
# Download and unzip the model
RUN wget https://d3dg1063dc54p9.cloudfront.net/models/embeddings/mpnet-base-v2.zip && \
unzip mpnet-base-v2.zip -d model && \
rm mpnet-base-v2.zip
# Install Rust
RUN wget -q -O - https://sh.rustup.rs | sh -s -- -y
# Clean up to reduce container size
RUN apt-get remove --purge -y wget unzip && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
# Copy requirements.txt
COPY requirements.txt .
RUN pip install -r requirements.txt
# Setup Python virtual environment
RUN python3.11 -m venv /venv
# Activate virtual environment and install Python packages
ENV PATH="/venv/bin:$PATH"
FROM python:3.11-slim-bullseye
# Install Python packages
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir tiktoken && \
pip install --no-cache-dir -r requirements.txt
# Copy pre-built packages and binaries from builder stage
COPY --from=builder /usr/local/ /usr/local/
# Final Stage
FROM ubuntu:24.04 as final
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
# Install Python
apt-get update && apt-get install -y --no-install-recommends python3.11 && \
ln -s /usr/bin/python3.11 /usr/bin/python && \
rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Create a non-root user: `appuser` (Feel free to choose a name)
RUN groupadd -r appuser && \
useradd -r -g appuser -d /app -s /sbin/nologin -c "Docker image user" appuser
# Copy the virtual environment and model from the builder stage
COPY --from=builder /venv /venv
COPY --from=builder /model /app/model
# Copy your application code
COPY . /app/application
ENV FLASK_APP=app.py
ENV FLASK_DEBUG=true
# Change the ownership of the /app directory to the appuser
RUN mkdir -p /app/application/inputs/local
RUN chown -R appuser:appuser /app
# Set environment variables
ENV FLASK_APP=app.py \
FLASK_DEBUG=true \
PATH="/venv/bin:$PATH"
# Expose the port the app runs on
EXPOSE 7091
CMD ["gunicorn", "-w", "2", "--timeout", "120", "--bind", "0.0.0.0:7091", "application.wsgi:app"]
# Switch to non-root user
USER appuser
# Start Gunicorn
CMD ["gunicorn", "-w", "2", "--timeout", "120", "--bind", "0.0.0.0:7091", "application.wsgi:app"]

View File

@@ -1,30 +1,38 @@
import asyncio
import os
from flask import Blueprint, request, Response
import json
import datetime
import json
import logging
import os
import sys
import traceback
from pymongo import MongoClient
from bson.dbref import DBRef
from bson.objectid import ObjectId
from flask import Blueprint, current_app, make_response, request, Response
from flask_restx import fields, Namespace, Resource
from application.core.mongo_db import MongoDB
from application.core.settings import settings
from application.error import bad_request
from application.extensions import api
from application.llm.llm_creator import LLMCreator
from application.retriever.retriever_creator import RetrieverCreator
from application.error import bad_request
from application.utils import check_required_fields
logger = logging.getLogger(__name__)
mongo = MongoClient(settings.MONGO_URI)
mongo = MongoDB.get_client()
db = mongo["docsgpt"]
conversations_collection = db["conversations"]
vectors_collection = db["vectors"]
sources_collection = db["sources"]
prompts_collection = db["prompts"]
api_key_collection = db["api_keys"]
user_logs_collection = db["user_logs"]
answer = Blueprint("answer", __name__)
answer_ns = Namespace("answer", description="Answer related operations", path="/")
api.add_namespace(answer_ns)
gpt_model = ""
# to have some kind of default behaviour
@@ -32,6 +40,8 @@ if settings.LLM_NAME == "openai":
gpt_model = "gpt-3.5-turbo"
elif settings.LLM_NAME == "anthropic":
gpt_model = "claude-2"
elif settings.LLM_NAME == "groq":
gpt_model = "llama3-8b-8192"
if settings.MODEL_NAME: # in case there is particular model name configured
gpt_model = settings.MODEL_NAME
@@ -75,25 +85,29 @@ def run_async_chain(chain, question, chat_history):
def get_data_from_api_key(api_key):
data = api_key_collection.find_one({"key": api_key})
# # Raise custom exception if the API key is not found
if data is None:
return bad_request(401, "Invalid API key")
raise Exception("Invalid API Key, please generate new key", 401)
if "retriever" not in data:
data["retriever"] = None
if "source" in data and isinstance(data["source"], DBRef):
source_doc = db.dereference(data["source"])
data["source"] = str(source_doc["_id"])
if "retriever" in source_doc:
data["retriever"] = source_doc["retriever"]
else:
data["source"] = {}
return data
def get_vectorstore(data):
if "active_docs" in data:
if data["active_docs"].split("/")[0] == "default":
vectorstore = ""
elif data["active_docs"].split("/")[0] == "local":
vectorstore = "indexes/" + data["active_docs"]
else:
vectorstore = "vectors/" + data["active_docs"]
if data["active_docs"] == "default":
vectorstore = ""
else:
vectorstore = ""
vectorstore = os.path.join("application", vectorstore)
return vectorstore
def get_retriever(source_id: str):
doc = sources_collection.find_one({"_id": ObjectId(source_id)})
if doc is None:
raise Exception("Source document does not exist", 404)
retriever_name = None if "retriever" not in doc else doc["retriever"]
return retriever_name
def is_azure_configured():
@@ -127,17 +141,17 @@ def save_conversation(conversation_id, question, response, source_log_docs, llm)
"role": "assistant",
"content": "Summarise following conversation in no more than 3 "
"words, respond ONLY with the summary, use the same "
"language as the system \n\nUser: "
+ question
+ "\n\n"
+ "AI: "
+ response,
"language as the system",
},
{
"role": "user",
"content": "Summarise following conversation in no more than 3 words, "
"respond ONLY with the summary, use the same language as the "
"system",
"system \n\nUser: "
+ question
+ "\n\n"
+ "AI: "
+ response,
},
]
@@ -171,219 +185,435 @@ def get_prompt(prompt_id):
return prompt
def complete_stream(question, retriever, conversation_id, user_api_key):
def complete_stream(
question, retriever, conversation_id, user_api_key, isNoneDoc=False
):
response_full = ""
source_log_docs = []
answer = retriever.gen()
for line in answer:
if "answer" in line:
response_full += str(line["answer"])
data = json.dumps(line)
yield f"data: {data}\n\n"
elif "source" in line:
source_log_docs.append(line["source"])
llm = LLMCreator.create_llm(
settings.LLM_NAME, api_key=settings.API_KEY, user_api_key=user_api_key
)
conversation_id = save_conversation(
conversation_id, question, response_full, source_log_docs, llm
)
# send data.type = "end" to indicate that the stream has ended as json
data = json.dumps({"type": "id", "id": str(conversation_id)})
yield f"data: {data}\n\n"
data = json.dumps({"type": "end"})
yield f"data: {data}\n\n"
@answer.route("/stream", methods=["POST"])
def stream():
data = request.get_json()
# get parameter from url question
question = data["question"]
if "history" not in data:
history = []
else:
history = data["history"]
history = json.loads(history)
if "conversation_id" not in data:
conversation_id = None
else:
conversation_id = data["conversation_id"]
if "prompt_id" in data:
prompt_id = data["prompt_id"]
else:
prompt_id = "default"
if "selectedDocs" in data and data["selectedDocs"] is None:
chunks = 0
elif "chunks" in data:
chunks = int(data["chunks"])
else:
chunks = 2
prompt = get_prompt(prompt_id)
# check if active_docs is set
if "api_key" in data:
data_key = get_data_from_api_key(data["api_key"])
source = {"active_docs": data_key["source"]}
user_api_key = data["api_key"]
elif "active_docs" in data:
source = {"active_docs": data["active_docs"]}
user_api_key = None
else:
source = {}
user_api_key = None
if (
source["active_docs"].split("/")[0] == "default"
or source["active_docs"].split("/")[0] == "local"
):
retriever_name = "classic"
else:
retriever_name = source["active_docs"]
retriever = RetrieverCreator.create_retriever(
retriever_name,
question=question,
source=source,
chat_history=history,
prompt=prompt,
chunks=chunks,
gpt_model=gpt_model,
user_api_key=user_api_key,
)
return Response(
complete_stream(
question=question,
retriever=retriever,
conversation_id=conversation_id,
user_api_key=user_api_key,
),
mimetype="text/event-stream",
)
@answer.route("/api/answer", methods=["POST"])
def api_answer():
data = request.get_json()
question = data["question"]
if "history" not in data:
history = []
else:
history = data["history"]
if "conversation_id" not in data:
conversation_id = None
else:
conversation_id = data["conversation_id"]
print("-" * 5)
if "prompt_id" in data:
prompt_id = data["prompt_id"]
else:
prompt_id = "default"
if "chunks" in data:
chunks = int(data["chunks"])
else:
chunks = 2
prompt = get_prompt(prompt_id)
# use try and except to check for exception
try:
# check if the vectorstore is set
if "api_key" in data:
data_key = get_data_from_api_key(data["api_key"])
source = {"active_docs": data_key["source"]}
user_api_key = data["api_key"]
else:
source = {data}
user_api_key = None
if (
source["active_docs"].split("/")[0] == "default"
or source["active_docs"].split("/")[0] == "local"
):
retriever_name = "classic"
else:
retriever_name = source["active_docs"]
retriever = RetrieverCreator.create_retriever(
retriever_name,
question=question,
source=source,
chat_history=history,
prompt=prompt,
chunks=chunks,
gpt_model=gpt_model,
user_api_key=user_api_key,
)
source_log_docs = []
response_full = ""
for line in retriever.gen():
if "source" in line:
source_log_docs = []
answer = retriever.gen()
sources = retriever.search()
for source in sources:
if "text" in source:
source["text"] = source["text"][:100].strip() + "..."
if len(sources) > 0:
data = json.dumps({"type": "source", "source": sources})
yield f"data: {data}\n\n"
for line in answer:
if "answer" in line:
response_full += str(line["answer"])
data = json.dumps(line)
yield f"data: {data}\n\n"
elif "source" in line:
source_log_docs.append(line["source"])
elif "answer" in line:
response_full += line["answer"]
if isNoneDoc:
for doc in source_log_docs:
doc["source"] = "None"
llm = LLMCreator.create_llm(
settings.LLM_NAME, api_key=settings.API_KEY, user_api_key=user_api_key
)
if user_api_key is None:
conversation_id = save_conversation(
conversation_id, question, response_full, source_log_docs, llm
)
# send data.type = "end" to indicate that the stream has ended as json
data = json.dumps({"type": "id", "id": str(conversation_id)})
yield f"data: {data}\n\n"
result = {"answer": response_full, "sources": source_log_docs}
result["conversation_id"] = save_conversation(
conversation_id, question, response_full, source_log_docs, llm
retriever_params = retriever.get_params()
user_logs_collection.insert_one(
{
"action": "stream_answer",
"level": "info",
"user": "local",
"api_key": user_api_key,
"question": question,
"response": response_full,
"sources": source_log_docs,
"retriever_params": retriever_params,
"timestamp": datetime.datetime.now(datetime.timezone.utc),
}
)
return result
data = json.dumps({"type": "end"})
yield f"data: {data}\n\n"
except Exception as e:
# print whole traceback
print("\033[91merr", str(e), file=sys.stderr)
traceback.print_exc()
print(str(e))
return bad_request(500, str(e))
data = json.dumps(
{
"type": "error",
"error": "Please try again later. We apologize for any inconvenience.",
"error_exception": str(e),
}
)
yield f"data: {data}\n\n"
return
@answer.route("/api/search", methods=["POST"])
def api_search():
data = request.get_json()
# get parameter from url question
question = data["question"]
if "api_key" in data:
data_key = get_data_from_api_key(data["api_key"])
source = {"active_docs": data_key["source"]}
user_api_key = data["api_key"]
elif "active_docs" in data:
source = {"active_docs": data["active_docs"]}
user_api_key = None
else:
source = {}
user_api_key = None
if "chunks" in data:
chunks = int(data["chunks"])
else:
chunks = 2
if (
source["active_docs"].split("/")[0] == "default"
or source["active_docs"].split("/")[0] == "local"
):
retriever_name = "classic"
else:
retriever_name = source["active_docs"]
retriever = RetrieverCreator.create_retriever(
retriever_name,
question=question,
source=source,
chat_history=[],
prompt="default",
chunks=chunks,
gpt_model=gpt_model,
user_api_key=user_api_key,
@answer_ns.route("/stream")
class Stream(Resource):
stream_model = api.model(
"StreamModel",
{
"question": fields.String(
required=True, description="Question to be asked"
),
"history": fields.List(
fields.String, required=False, description="Chat history"
),
"conversation_id": fields.String(
required=False, description="Conversation ID"
),
"prompt_id": fields.String(
required=False, default="default", description="Prompt ID"
),
"chunks": fields.Integer(
required=False, default=2, description="Number of chunks"
),
"token_limit": fields.Integer(required=False, description="Token limit"),
"retriever": fields.String(required=False, description="Retriever type"),
"api_key": fields.String(required=False, description="API key"),
"active_docs": fields.String(
required=False, description="Active documents"
),
"isNoneDoc": fields.Boolean(
required=False, description="Flag indicating if no document is used"
),
},
)
docs = retriever.search()
return docs
@api.expect(stream_model)
@api.doc(description="Stream a response based on the question and retriever")
def post(self):
data = request.get_json()
required_fields = ["question"]
missing_fields = check_required_fields(data, required_fields)
if missing_fields:
return missing_fields
try:
question = data["question"]
history = data.get("history", [])
history = json.loads(history)
conversation_id = data.get("conversation_id")
prompt_id = data.get("prompt_id", "default")
chunks = int(data.get("chunks", 2))
token_limit = data.get("token_limit", settings.DEFAULT_MAX_HISTORY)
retriever_name = data.get("retriever", "classic")
if "api_key" in data:
data_key = get_data_from_api_key(data["api_key"])
chunks = int(data_key.get("chunks", 2))
prompt_id = data_key.get("prompt_id", "default")
source = {"active_docs": data_key.get("source")}
retriever_name = data_key.get("retriever", retriever_name)
user_api_key = data["api_key"]
elif "active_docs" in data:
source = {"active_docs": data["active_docs"]}
retriever_name = get_retriever(data["active_docs"]) or retriever_name
user_api_key = None
else:
source = {}
user_api_key = None
current_app.logger.info(
f"/stream - request_data: {data}, source: {source}",
extra={"data": json.dumps({"request_data": data, "source": source})},
)
prompt = get_prompt(prompt_id)
if "isNoneDoc" in data and data["isNoneDoc"] is True:
chunks = 0
retriever = RetrieverCreator.create_retriever(
retriever_name,
question=question,
source=source,
chat_history=history,
prompt=prompt,
chunks=chunks,
token_limit=token_limit,
gpt_model=gpt_model,
user_api_key=user_api_key,
)
return Response(
complete_stream(
question=question,
retriever=retriever,
conversation_id=conversation_id,
user_api_key=user_api_key,
isNoneDoc=data.get("isNoneDoc"),
),
mimetype="text/event-stream",
)
except ValueError:
message = "Malformed request body"
print("\033[91merr", str(message), file=sys.stderr)
return Response(
error_stream_generate(message),
status=400,
mimetype="text/event-stream",
)
except Exception as e:
current_app.logger.error(
f"/stream - error: {str(e)} - traceback: {traceback.format_exc()}",
extra={"error": str(e), "traceback": traceback.format_exc()},
)
message = e.args[0]
status_code = 400
# Custom exceptions with two arguments, index 1 as status code
if len(e.args) >= 2:
status_code = e.args[1]
return Response(
error_stream_generate(message),
status=status_code,
mimetype="text/event-stream",
)
def error_stream_generate(err_response):
data = json.dumps({"type": "error", "error": err_response})
yield f"data: {data}\n\n"
@answer_ns.route("/api/answer")
class Answer(Resource):
answer_model = api.model(
"AnswerModel",
{
"question": fields.String(
required=True, description="The question to answer"
),
"history": fields.List(
fields.String, required=False, description="Conversation history"
),
"conversation_id": fields.String(
required=False, description="Conversation ID"
),
"prompt_id": fields.String(
required=False, default="default", description="Prompt ID"
),
"chunks": fields.Integer(
required=False, default=2, description="Number of chunks"
),
"token_limit": fields.Integer(required=False, description="Token limit"),
"retriever": fields.String(required=False, description="Retriever type"),
"api_key": fields.String(required=False, description="API key"),
"active_docs": fields.String(
required=False, description="Active documents"
),
"isNoneDoc": fields.Boolean(
required=False, description="Flag indicating if no document is used"
),
},
)
@api.expect(answer_model)
@api.doc(description="Provide an answer based on the question and retriever")
def post(self):
data = request.get_json()
required_fields = ["question"]
missing_fields = check_required_fields(data, required_fields)
if missing_fields:
return missing_fields
try:
question = data["question"]
history = data.get("history", [])
conversation_id = data.get("conversation_id")
prompt_id = data.get("prompt_id", "default")
chunks = int(data.get("chunks", 2))
token_limit = data.get("token_limit", settings.DEFAULT_MAX_HISTORY)
retriever_name = data.get("retriever", "classic")
if "api_key" in data:
data_key = get_data_from_api_key(data["api_key"])
chunks = int(data_key.get("chunks", 2))
prompt_id = data_key.get("prompt_id", "default")
source = {"active_docs": data_key.get("source")}
retriever_name = data_key.get("retriever", retriever_name)
user_api_key = data["api_key"]
elif "active_docs" in data:
source = {"active_docs": data["active_docs"]}
retriever_name = get_retriever(data["active_docs"]) or retriever_name
user_api_key = None
else:
source = {}
user_api_key = None
prompt = get_prompt(prompt_id)
current_app.logger.info(
f"/api/answer - request_data: {data}, source: {source}",
extra={"data": json.dumps({"request_data": data, "source": source})},
)
retriever = RetrieverCreator.create_retriever(
retriever_name,
question=question,
source=source,
chat_history=history,
prompt=prompt,
chunks=chunks,
token_limit=token_limit,
gpt_model=gpt_model,
user_api_key=user_api_key,
)
source_log_docs = []
response_full = ""
for line in retriever.gen():
if "source" in line:
source_log_docs.append(line["source"])
elif "answer" in line:
response_full += line["answer"]
if data.get("isNoneDoc"):
for doc in source_log_docs:
doc["source"] = "None"
llm = LLMCreator.create_llm(
settings.LLM_NAME, api_key=settings.API_KEY, user_api_key=user_api_key
)
result = {"answer": response_full, "sources": source_log_docs}
result["conversation_id"] = str(
save_conversation(
conversation_id, question, response_full, source_log_docs, llm
)
)
retriever_params = retriever.get_params()
user_logs_collection.insert_one(
{
"action": "api_answer",
"level": "info",
"user": "local",
"api_key": user_api_key,
"question": question,
"response": response_full,
"sources": source_log_docs,
"retriever_params": retriever_params,
"timestamp": datetime.datetime.now(datetime.timezone.utc),
}
)
except Exception as e:
current_app.logger.error(
f"/api/answer - error: {str(e)} - traceback: {traceback.format_exc()}",
extra={"error": str(e), "traceback": traceback.format_exc()},
)
return bad_request(500, str(e))
return make_response(result, 200)
@answer_ns.route("/api/search")
class Search(Resource):
search_model = api.model(
"SearchModel",
{
"question": fields.String(
required=True, description="The question to search"
),
"chunks": fields.Integer(
required=False, default=2, description="Number of chunks"
),
"api_key": fields.String(
required=False, description="API key for authentication"
),
"active_docs": fields.String(
required=False, description="Active documents for retrieval"
),
"retriever": fields.String(required=False, description="Retriever type"),
"token_limit": fields.Integer(
required=False, description="Limit for tokens"
),
"isNoneDoc": fields.Boolean(
required=False, description="Flag indicating if no document is used"
),
},
)
@api.expect(search_model)
@api.doc(
description="Search for relevant documents based on the question and retriever"
)
def post(self):
data = request.get_json()
required_fields = ["question"]
missing_fields = check_required_fields(data, required_fields)
if missing_fields:
return missing_fields
try:
question = data["question"]
chunks = int(data.get("chunks", 2))
token_limit = data.get("token_limit", settings.DEFAULT_MAX_HISTORY)
retriever_name = data.get("retriever", "classic")
if "api_key" in data:
data_key = get_data_from_api_key(data["api_key"])
chunks = int(data_key.get("chunks", 2))
source = {"active_docs": data_key.get("source")}
user_api_key = data["api_key"]
elif "active_docs" in data:
source = {"active_docs": data["active_docs"]}
user_api_key = None
else:
source = {}
user_api_key = None
current_app.logger.info(
f"/api/answer - request_data: {data}, source: {source}",
extra={"data": json.dumps({"request_data": data, "source": source})},
)
retriever = RetrieverCreator.create_retriever(
retriever_name,
question=question,
source=source,
chat_history=[],
prompt="default",
chunks=chunks,
token_limit=token_limit,
gpt_model=gpt_model,
user_api_key=user_api_key,
)
docs = retriever.search()
retriever_params = retriever.get_params()
user_logs_collection.insert_one(
{
"action": "api_search",
"level": "info",
"user": "local",
"api_key": user_api_key,
"question": question,
"sources": docs,
"retriever_params": retriever_params,
"timestamp": datetime.datetime.now(datetime.timezone.utc),
}
)
if data.get("isNoneDoc"):
for doc in docs:
doc["source"] = "None"
except Exception as e:
current_app.logger.error(
f"/api/search - error: {str(e)} - traceback: {traceback.format_exc()}",
extra={"error": str(e), "traceback": traceback.format_exc()},
)
return bad_request(500, str(e))
return make_response(docs, 200)

79
application/api/internal/routes.py Normal file → Executable file
View File

@@ -1,20 +1,25 @@
import os
import datetime
from flask import Blueprint, request, send_from_directory
from pymongo import MongoClient
from werkzeug.utils import secure_filename
from bson.objectid import ObjectId
from application.core.mongo_db import MongoDB
from application.core.settings import settings
mongo = MongoClient(settings.MONGO_URI)
mongo = MongoDB.get_client()
db = mongo["docsgpt"]
conversations_collection = db["conversations"]
vectors_collection = db["vectors"]
sources_collection = db["sources"]
current_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
current_dir = os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
)
internal = Blueprint("internal", __name__)
internal = Blueprint('internal', __name__)
@internal.route("/api/download", methods=["get"])
def download_file():
user = secure_filename(request.args.get("user"))
@@ -24,7 +29,6 @@ def download_file():
return send_from_directory(save_dir, filename, as_attachment=True)
@internal.route("/api/upload_index", methods=["POST"])
def upload_index_files():
"""Upload two files(index.faiss, index.pkl) to the user's folder."""
@@ -34,7 +38,14 @@ def upload_index_files():
if "name" not in request.form:
return {"status": "no name"}
job_name = secure_filename(request.form["name"])
save_dir = os.path.join(current_dir, "indexes", user, job_name)
tokens = secure_filename(request.form["tokens"])
retriever = secure_filename(request.form["retriever"])
id = secure_filename(request.form["id"])
type = secure_filename(request.form["type"])
remote_data = request.form["remote_data"] if "remote_data" in request.form else None
sync_frequency = secure_filename(request.form["sync_frequency"]) if "sync_frequency" in request.form else None
save_dir = os.path.join(current_dir, "indexes", str(id))
if settings.VECTOR_STORE == "faiss":
if "file_faiss" not in request.files:
print("No file part")
@@ -49,21 +60,45 @@ def upload_index_files():
if file_pkl.filename == "":
return {"status": "no file name"}
# saves index files
if not os.path.exists(save_dir):
os.makedirs(save_dir)
file_faiss.save(os.path.join(save_dir, "index.faiss"))
file_pkl.save(os.path.join(save_dir, "index.pkl"))
# create entry in vectors_collection
vectors_collection.insert_one(
{
"user": user,
"name": job_name,
"language": job_name,
"location": save_dir,
"date": datetime.datetime.now().strftime("%d/%m/%Y %H:%M:%S"),
"model": settings.EMBEDDINGS_NAME,
"type": "local",
}
)
return {"status": "ok"}
existing_entry = sources_collection.find_one({"_id": ObjectId(id)})
if existing_entry:
sources_collection.update_one(
{"_id": ObjectId(id)},
{
"$set": {
"user": user,
"name": job_name,
"language": job_name,
"date": datetime.datetime.now(),
"model": settings.EMBEDDINGS_NAME,
"type": type,
"tokens": tokens,
"retriever": retriever,
"remote_data": remote_data,
"sync_frequency": sync_frequency,
}
},
)
else:
sources_collection.insert_one(
{
"_id": ObjectId(id),
"user": user,
"name": job_name,
"language": job_name,
"date": datetime.datetime.now(),
"model": settings.EMBEDDINGS_NAME,
"type": type,
"tokens": tokens,
"retriever": retriever,
"remote_data": remote_data,
"sync_frequency": sync_frequency,
}
)
return {"status": "ok"}

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,38 @@
from application.worker import ingest_worker, remote_worker
from application.celery import celery
from datetime import timedelta
from application.celery_init import celery
from application.worker import ingest_worker, remote_worker, sync_worker
@celery.task(bind=True)
def ingest(self, directory, formats, name_job, filename, user):
resp = ingest_worker(self, directory, formats, name_job, filename, user)
return resp
@celery.task(bind=True)
def ingest_remote(self, source_data, job_name, user, loader):
resp = remote_worker(self, source_data, job_name, user, loader)
return resp
@celery.task(bind=True)
def schedule_syncs(self, frequency):
resp = sync_worker(self, frequency)
return resp
@celery.on_after_configure.connect
def setup_periodic_tasks(sender, **kwargs):
sender.add_periodic_task(
timedelta(days=1),
schedule_syncs.s("daily"),
)
sender.add_periodic_task(
timedelta(weeks=1),
schedule_syncs.s("weekly"),
)
sender.add_periodic_task(
timedelta(days=30),
schedule_syncs.s("monthly"),
)

View File

@@ -1,17 +1,23 @@
import platform
import dotenv
from application.celery import celery
from flask import Flask, request, redirect
from application.core.settings import settings
from application.api.user.routes import user
from flask import Flask, redirect, request
from application.api.answer.routes import answer
from application.api.internal.routes import internal
from application.api.user.routes import user
from application.celery_init import celery
from application.core.logging_config import setup_logging
from application.core.settings import settings
from application.extensions import api
if platform.system() == "Windows":
import pathlib
pathlib.PosixPath = pathlib.WindowsPath
dotenv.load_dotenv()
setup_logging()
app = Flask(__name__)
app.register_blueprint(user)
@@ -21,16 +27,19 @@ app.config.update(
UPLOAD_FOLDER="inputs",
CELERY_BROKER_URL=settings.CELERY_BROKER_URL,
CELERY_RESULT_BACKEND=settings.CELERY_RESULT_BACKEND,
MONGO_URI=settings.MONGO_URI
MONGO_URI=settings.MONGO_URI,
)
celery.config_from_object("application.celeryconfig")
api.init_app(app)
@app.route("/")
def home():
if request.remote_addr in ('0.0.0.0', '127.0.0.1', 'localhost', '172.18.0.1'):
return redirect('http://localhost:5173')
if request.remote_addr in ("0.0.0.0", "127.0.0.1", "localhost", "172.18.0.1"):
return redirect("http://localhost:5173")
else:
return 'Welcome to DocsGPT Backend!'
return "Welcome to DocsGPT Backend!"
@app.after_request
def after_request(response):
@@ -39,6 +48,6 @@ def after_request(response):
response.headers.add("Access-Control-Allow-Methods", "GET,PUT,POST,DELETE,OPTIONS")
return response
if __name__ == "__main__":
app.run(debug=settings.FLASK_DEBUG_MODE, port=7091)

93
application/cache.py Normal file
View File

@@ -0,0 +1,93 @@
import redis
import time
import json
import logging
from threading import Lock
from application.core.settings import settings
from application.utils import get_hash
logger = logging.getLogger(__name__)
_redis_instance = None
_instance_lock = Lock()
def get_redis_instance():
global _redis_instance
if _redis_instance is None:
with _instance_lock:
if _redis_instance is None:
try:
_redis_instance = redis.Redis.from_url(settings.CACHE_REDIS_URL, socket_connect_timeout=2)
except redis.ConnectionError as e:
logger.error(f"Redis connection error: {e}")
_redis_instance = None
return _redis_instance
def gen_cache_key(*messages, model="docgpt"):
if not all(isinstance(msg, dict) for msg in messages):
raise ValueError("All messages must be dictionaries.")
messages_str = json.dumps(list(messages), sort_keys=True)
combined = f"{model}_{messages_str}"
cache_key = get_hash(combined)
return cache_key
def gen_cache(func):
def wrapper(self, model, messages, *args, **kwargs):
try:
cache_key = gen_cache_key(*messages)
redis_client = get_redis_instance()
if redis_client:
try:
cached_response = redis_client.get(cache_key)
if cached_response:
return cached_response.decode('utf-8')
except redis.ConnectionError as e:
logger.error(f"Redis connection error: {e}")
result = func(self, model, messages, *args, **kwargs)
if redis_client:
try:
redis_client.set(cache_key, result, ex=1800)
except redis.ConnectionError as e:
logger.error(f"Redis connection error: {e}")
return result
except ValueError as e:
logger.error(e)
return "Error: No user message found in the conversation to generate a cache key."
return wrapper
def stream_cache(func):
def wrapper(self, model, messages, stream, *args, **kwargs):
cache_key = gen_cache_key(*messages)
logger.info(f"Stream cache key: {cache_key}")
redis_client = get_redis_instance()
if redis_client:
try:
cached_response = redis_client.get(cache_key)
if cached_response:
logger.info(f"Cache hit for stream key: {cache_key}")
cached_response = json.loads(cached_response.decode('utf-8'))
for chunk in cached_response:
yield chunk
time.sleep(0.03)
return
except redis.ConnectionError as e:
logger.error(f"Redis connection error: {e}")
result = func(self, model, messages, stream, *args, **kwargs)
stream_cache_data = []
for chunk in result:
stream_cache_data.append(chunk)
yield chunk
if redis_client:
try:
redis_client.set(cache_key, json.dumps(stream_cache_data), ex=1800)
logger.info(f"Stream cache saved for key: {cache_key}")
except redis.ConnectionError as e:
logger.error(f"Redis connection error: {e}")
return wrapper

View File

@@ -1,9 +1,15 @@
from celery import Celery
from application.core.settings import settings
from celery.signals import setup_logging
def make_celery(app_name=__name__):
celery = Celery(app_name, broker=settings.CELERY_BROKER_URL, backend=settings.CELERY_RESULT_BACKEND)
celery.conf.update(settings)
return celery
@setup_logging.connect
def config_loggers(*args, **kwargs):
from application.core.logging_config import setup_logging
setup_logging()
celery = make_celery()

View File

@@ -0,0 +1,22 @@
from logging.config import dictConfig
def setup_logging():
dictConfig({
'version': 1,
'formatters': {
'default': {
'format': '[%(asctime)s] %(levelname)s in %(module)s: %(message)s',
}
},
"handlers": {
"console": {
"class": "logging.StreamHandler",
"stream": "ext://sys.stdout",
"formatter": "default",
}
},
'root': {
'level': 'INFO',
'handlers': ['console'],
},
})

View File

@@ -0,0 +1,24 @@
from application.core.settings import settings
from pymongo import MongoClient
class MongoDB:
_client = None
@classmethod
def get_client(cls):
"""
Get the MongoDB client instance, creating it if necessary.
"""
if cls._client is None:
cls._client = MongoClient(settings.MONGO_URI)
return cls._client
@classmethod
def close_client(cls):
"""
Close the MongoDB client connection.
"""
if cls._client is not None:
cls._client.close()
cls._client = None

View File

@@ -15,11 +15,15 @@ class Settings(BaseSettings):
CELERY_RESULT_BACKEND: str = "redis://localhost:6379/1"
MONGO_URI: str = "mongodb://localhost:27017/docsgpt"
MODEL_PATH: str = os.path.join(current_dir, "models/docsgpt-7b-f16.gguf")
TOKENS_MAX_HISTORY: int = 150
DEFAULT_MAX_HISTORY: int = 150
MODEL_TOKEN_LIMITS: dict = {"gpt-3.5-turbo": 4096, "claude-2": 1e5}
UPLOAD_FOLDER: str = "inputs"
VECTOR_STORE: str = "faiss" # "faiss" or "elasticsearch" or "qdrant"
VECTOR_STORE: str = "faiss" # "faiss" or "elasticsearch" or "qdrant" or "milvus" or "lancedb"
RETRIEVERS_ENABLED: list = ["classic_rag", "duckduck_search"] # also brave_search
# LLM Cache
CACHE_REDIS_URL: str = "redis://localhost:6379/2"
API_URL: str = "http://localhost:7091" # backend url for celery worker
API_KEY: Optional[str] = None # LLM api key
@@ -28,6 +32,7 @@ class Settings(BaseSettings):
OPENAI_API_VERSION: Optional[str] = None # azure openai api version
AZURE_DEPLOYMENT_NAME: Optional[str] = None # azure deployment name for answering
AZURE_EMBEDDINGS_DEPLOYMENT_NAME: Optional[str] = None # azure deployment name for embeddings
OPENAI_BASE_URL: Optional[str] = None # openai base url for open ai compatable models
# elasticsearch
ELASTIC_CLOUD_ID: Optional[str] = None # cloud id for elasticsearch
@@ -60,6 +65,14 @@ class Settings(BaseSettings):
QDRANT_PATH: Optional[str] = None
QDRANT_DISTANCE_FUNC: str = "Cosine"
# Milvus vectorstore config
MILVUS_COLLECTION_NAME: Optional[str] = "docsgpt"
MILVUS_URI: Optional[str] = "./milvus_local.db" # milvus lite version as default
MILVUS_TOKEN: Optional[str] = ""
# LanceDB vectorstore config
LANCEDB_PATH: str = "/tmp/lancedb" # Path where LanceDB stores its local data
LANCEDB_TABLE_NAME: Optional[str] = "docsgpts" # Name of the table to use for storing vectors
BRAVE_SEARCH_API_KEY: Optional[str] = None
FLASK_DEBUG_MODE: bool = False

View File

@@ -0,0 +1,7 @@
from flask_restx import Api
api = Api(
version="1.0",
title="DocsGPT API",
description="API for DocsGPT",
)

View File

@@ -1,28 +1,29 @@
from abc import ABC, abstractmethod
from application.usage import gen_token_usage, stream_token_usage
from application.cache import stream_cache, gen_cache
class BaseLLM(ABC):
def __init__(self):
self.token_usage = {"prompt_tokens": 0, "generated_tokens": 0}
def _apply_decorator(self, method, decorator, *args, **kwargs):
return decorator(method, *args, **kwargs)
def _apply_decorator(self, method, decorators, *args, **kwargs):
for decorator in decorators:
method = decorator(method)
return method(self, *args, **kwargs)
@abstractmethod
def _raw_gen(self, model, messages, stream, *args, **kwargs):
pass
def gen(self, model, messages, stream=False, *args, **kwargs):
return self._apply_decorator(self._raw_gen, gen_token_usage)(
self, model=model, messages=messages, stream=stream, *args, **kwargs
)
decorators = [gen_token_usage, gen_cache]
return self._apply_decorator(self._raw_gen, decorators=decorators, model=model, messages=messages, stream=stream, *args, **kwargs)
@abstractmethod
def _raw_gen_stream(self, model, messages, stream, *args, **kwargs):
pass
def gen_stream(self, model, messages, stream=True, *args, **kwargs):
return self._apply_decorator(self._raw_gen_stream, stream_token_usage)(
self, model=model, messages=messages, stream=stream, *args, **kwargs
)
decorators = [stream_cache, stream_token_usage]
return self._apply_decorator(self._raw_gen_stream, decorators=decorators, model=model, messages=messages, stream=stream, *args, **kwargs)

View File

@@ -9,35 +9,25 @@ class DocsGPTAPILLM(BaseLLM):
super().__init__(*args, **kwargs)
self.api_key = api_key
self.user_api_key = user_api_key
self.endpoint = "https://llm.docsgpt.co.uk"
self.endpoint = "https://llm.arc53.com"
def _raw_gen(self, baseself, model, messages, stream=False, *args, **kwargs):
context = messages[0]["content"]
user_question = messages[-1]["content"]
prompt = f"### Instruction \n {user_question} \n ### Context \n {context} \n ### Answer \n"
response = requests.post(
f"{self.endpoint}/answer", json={"prompt": prompt, "max_new_tokens": 30}
f"{self.endpoint}/answer", json={"messages": messages, "max_new_tokens": 30}
)
response_clean = response.json()["a"].replace("###", "")
return response_clean
def _raw_gen_stream(self, baseself, model, messages, stream=True, *args, **kwargs):
context = messages[0]["content"]
user_question = messages[-1]["content"]
prompt = f"### Instruction \n {user_question} \n ### Context \n {context} \n ### Answer \n"
# send prompt to endpoint /stream
response = requests.post(
f"{self.endpoint}/stream",
json={"prompt": prompt, "max_new_tokens": 256},
json={"messages": messages, "max_new_tokens": 256},
stream=True,
)
for line in response.iter_lines():
if line:
# data = json.loads(line)
data_str = line.decode("utf-8")
if data_str.startswith("data: "):
data = json.loads(data_str[6:])

View File

@@ -0,0 +1,48 @@
from application.llm.base import BaseLLM
class GoogleLLM(BaseLLM):
def __init__(self, api_key=None, user_api_key=None, *args, **kwargs):
super().__init__(*args, **kwargs)
self.api_key = api_key
self.user_api_key = user_api_key
def _clean_messages_google(self, messages):
return [
{
"role": "model" if message["role"] == "system" else message["role"],
"parts": [message["content"]],
}
for message in messages[1:]
]
def _raw_gen(
self,
baseself,
model,
messages,
stream=False,
**kwargs
):
import google.generativeai as genai
genai.configure(api_key=self.api_key)
model = genai.GenerativeModel(model, system_instruction=messages[0]["content"])
response = model.generate_content(self._clean_messages_google(messages))
return response.text
def _raw_gen_stream(
self,
baseself,
model,
messages,
stream=True,
**kwargs
):
import google.generativeai as genai
genai.configure(api_key=self.api_key)
model = genai.GenerativeModel(model, system_instruction=messages[0]["content"])
response = model.generate_content(self._clean_messages_google(messages), stream=True)
for line in response:
if line.text is not None:
yield line.text

45
application/llm/groq.py Normal file
View File

@@ -0,0 +1,45 @@
from application.llm.base import BaseLLM
class GroqLLM(BaseLLM):
def __init__(self, api_key=None, user_api_key=None, *args, **kwargs):
from openai import OpenAI
super().__init__(*args, **kwargs)
self.client = OpenAI(api_key=api_key, base_url="https://api.groq.com/openai/v1")
self.api_key = api_key
self.user_api_key = user_api_key
def _raw_gen(
self,
baseself,
model,
messages,
stream=False,
**kwargs
):
response = self.client.chat.completions.create(
model=model, messages=messages, stream=stream, **kwargs
)
return response.choices[0].message.content
def _raw_gen_stream(
self,
baseself,
model,
messages,
stream=True,
**kwargs
):
response = self.client.chat.completions.create(
model=model, messages=messages, stream=stream, **kwargs
)
for line in response:
# import sys
# print(line.choices[0].delta.content, file=sys.stderr)
if line.choices[0].delta.content is not None:
yield line.choices[0].delta.content

View File

@@ -1,9 +1,30 @@
from application.llm.base import BaseLLM
from application.core.settings import settings
import threading
class LlamaSingleton:
_instances = {}
_lock = threading.Lock() # Add a lock for thread synchronization
@classmethod
def get_instance(cls, llm_name):
if llm_name not in cls._instances:
try:
from llama_cpp import Llama
except ImportError:
raise ImportError(
"Please install llama_cpp using pip install llama-cpp-python"
)
cls._instances[llm_name] = Llama(model_path=llm_name, n_ctx=2048)
return cls._instances[llm_name]
@classmethod
def query_model(cls, llm, prompt, **kwargs):
with cls._lock:
return llm(prompt, **kwargs)
class LlamaCpp(BaseLLM):
def __init__(
self,
api_key=None,
@@ -12,41 +33,23 @@ class LlamaCpp(BaseLLM):
*args,
**kwargs,
):
global llama
try:
from llama_cpp import Llama
except ImportError:
raise ImportError(
"Please install llama_cpp using pip install llama-cpp-python"
)
super().__init__(*args, **kwargs)
self.api_key = api_key
self.user_api_key = user_api_key
llama = Llama(model_path=llm_name, n_ctx=2048)
self.llama = LlamaSingleton.get_instance(llm_name)
def _raw_gen(self, baseself, model, messages, stream=False, **kwargs):
context = messages[0]["content"]
user_question = messages[-1]["content"]
prompt = f"### Instruction \n {user_question} \n ### Context \n {context} \n ### Answer \n"
result = llama(prompt, max_tokens=150, echo=False)
# import sys
# print(result['choices'][0]['text'].split('### Answer \n')[-1], file=sys.stderr)
result = LlamaSingleton.query_model(self.llama, prompt, max_tokens=150, echo=False)
return result["choices"][0]["text"].split("### Answer \n")[-1]
def _raw_gen_stream(self, baseself, model, messages, stream=True, **kwargs):
context = messages[0]["content"]
user_question = messages[-1]["content"]
prompt = f"### Instruction \n {user_question} \n ### Context \n {context} \n ### Answer \n"
result = llama(prompt, max_tokens=150, echo=False, stream=stream)
# import sys
# print(list(result), file=sys.stderr)
result = LlamaSingleton.query_model(self.llama, prompt, max_tokens=150, echo=False, stream=stream)
for item in result:
for choice in item["choices"]:
yield choice["text"]
yield choice["text"]

View File

@@ -1,3 +1,4 @@
from application.llm.groq import GroqLLM
from application.llm.openai import OpenAILLM, AzureOpenAILLM
from application.llm.sagemaker import SagemakerAPILLM
from application.llm.huggingface import HuggingFaceLLM
@@ -5,6 +6,7 @@ from application.llm.llama_cpp import LlamaCpp
from application.llm.anthropic import AnthropicLLM
from application.llm.docsgpt_provider import DocsGPTAPILLM
from application.llm.premai import PremAILLM
from application.llm.google_ai import GoogleLLM
class LLMCreator:
@@ -17,6 +19,8 @@ class LLMCreator:
"anthropic": AnthropicLLM,
"docsgpt": DocsGPTAPILLM,
"premai": PremAILLM,
"groq": GroqLLM,
"google": GoogleLLM
}
@classmethod

View File

@@ -2,25 +2,23 @@ from application.llm.base import BaseLLM
from application.core.settings import settings
class OpenAILLM(BaseLLM):
def __init__(self, api_key=None, user_api_key=None, *args, **kwargs):
global openai
from openai import OpenAI
super().__init__(*args, **kwargs)
self.client = OpenAI(
api_key=api_key,
)
if settings.OPENAI_BASE_URL:
self.client = OpenAI(
api_key=api_key,
base_url=settings.OPENAI_BASE_URL
)
else:
self.client = OpenAI(api_key=api_key)
self.api_key = api_key
self.user_api_key = user_api_key
def _get_openai(self):
# Import openai when needed
import openai
return openai
def _raw_gen(
self,
baseself,
@@ -29,7 +27,7 @@ class OpenAILLM(BaseLLM):
stream=False,
engine=settings.AZURE_DEPLOYMENT_NAME,
**kwargs
):
):
response = self.client.chat.completions.create(
model=model, messages=messages, stream=stream, **kwargs
)
@@ -44,7 +42,7 @@ class OpenAILLM(BaseLLM):
stream=True,
engine=settings.AZURE_DEPLOYMENT_NAME,
**kwargs
):
):
response = self.client.chat.completions.create(
model=model, messages=messages, stream=stream, **kwargs
)
@@ -73,8 +71,3 @@ class AzureOpenAILLM(OpenAILLM):
api_base=settings.OPENAI_API_BASE,
deployment_name=settings.AZURE_DEPLOYMENT_NAME,
)
def _get_openai(self):
openai = super()._get_openai()
return openai

View File

@@ -0,0 +1,118 @@
import re
from typing import List, Tuple, Union
import logging
from application.parser.schema.base import Document
from application.utils import get_encoding
logger = logging.getLogger(__name__)
class Chunker:
def __init__(
self,
chunking_strategy: str = "classic_chunk",
max_tokens: int = 2000,
min_tokens: int = 150,
duplicate_headers: bool = False,
):
if chunking_strategy not in ["classic_chunk"]:
raise ValueError(f"Unsupported chunking strategy: {chunking_strategy}")
self.chunking_strategy = chunking_strategy
self.max_tokens = max_tokens
self.min_tokens = min_tokens
self.duplicate_headers = duplicate_headers
self.encoding = get_encoding()
def separate_header_and_body(self, text: str) -> Tuple[str, str]:
header_pattern = r"^(.*?\n){3}"
match = re.match(header_pattern, text)
if match:
header = match.group(0)
body = text[len(header):]
else:
header, body = "", text # No header, treat entire text as body
return header, body
def combine_documents(self, doc: Document, next_doc: Document) -> Document:
combined_text = doc.text + " " + next_doc.text
combined_token_count = len(self.encoding.encode(combined_text))
new_doc = Document(
text=combined_text,
doc_id=doc.doc_id,
embedding=doc.embedding,
extra_info={**(doc.extra_info or {}), "token_count": combined_token_count}
)
return new_doc
def split_document(self, doc: Document) -> List[Document]:
split_docs = []
header, body = self.separate_header_and_body(doc.text)
header_tokens = self.encoding.encode(header) if header else []
body_tokens = self.encoding.encode(body)
current_position = 0
part_index = 0
while current_position < len(body_tokens):
end_position = current_position + self.max_tokens - len(header_tokens)
chunk_tokens = (header_tokens + body_tokens[current_position:end_position]
if self.duplicate_headers or part_index == 0 else body_tokens[current_position:end_position])
chunk_text = self.encoding.decode(chunk_tokens)
new_doc = Document(
text=chunk_text,
doc_id=f"{doc.doc_id}-{part_index}",
embedding=doc.embedding,
extra_info={**(doc.extra_info or {}), "token_count": len(chunk_tokens)}
)
split_docs.append(new_doc)
current_position = end_position
part_index += 1
header_tokens = []
return split_docs
def classic_chunk(self, documents: List[Document]) -> List[Document]:
processed_docs = []
i = 0
while i < len(documents):
doc = documents[i]
tokens = self.encoding.encode(doc.text)
token_count = len(tokens)
if self.min_tokens <= token_count <= self.max_tokens:
doc.extra_info = doc.extra_info or {}
doc.extra_info["token_count"] = token_count
processed_docs.append(doc)
i += 1
elif token_count < self.min_tokens:
if i + 1 < len(documents):
next_doc = documents[i + 1]
next_tokens = self.encoding.encode(next_doc.text)
if token_count + len(next_tokens) <= self.max_tokens:
# Combine small documents
combined_doc = self.combine_documents(doc, next_doc)
processed_docs.append(combined_doc)
i += 2
else:
# Keep the small document as is if adding next_doc would exceed max_tokens
doc.extra_info = doc.extra_info or {}
doc.extra_info["token_count"] = token_count
processed_docs.append(doc)
i += 1
else:
# No next document to combine with; add the small document as is
doc.extra_info = doc.extra_info or {}
doc.extra_info["token_count"] = token_count
processed_docs.append(doc)
i += 1
else:
# Split large documents
processed_docs.extend(self.split_document(doc))
i += 1
return processed_docs
def chunk(
self,
documents: List[Document]
) -> List[Document]:
if self.chunking_strategy == "classic_chunk":
return self.classic_chunk(documents)
else:
raise ValueError("Unsupported chunking strategy")

View File

@@ -0,0 +1,86 @@
import os
import logging
from retry import retry
from tqdm import tqdm
from application.core.settings import settings
from application.vectorstore.vector_creator import VectorCreator
@retry(tries=10, delay=60)
def add_text_to_store_with_retry(store, doc, source_id):
"""
Add a document's text and metadata to the vector store with retry logic.
Args:
store: The vector store object.
doc: The document to be added.
source_id: Unique identifier for the source.
"""
try:
doc.metadata["source_id"] = str(source_id)
store.add_texts([doc.page_content], metadatas=[doc.metadata])
except Exception as e:
logging.error(f"Failed to add document with retry: {e}")
raise
def embed_and_store_documents(docs, folder_name, source_id, task_status):
"""
Embeds documents and stores them in a vector store.
Args:
docs (list): List of documents to be embedded and stored.
folder_name (str): Directory to save the vector store.
source_id (str): Unique identifier for the source.
task_status: Task state manager for progress updates.
Returns:
None
"""
# Ensure the folder exists
if not os.path.exists(folder_name):
os.makedirs(folder_name)
# Initialize vector store
if settings.VECTOR_STORE == "faiss":
docs_init = [docs.pop(0)]
store = VectorCreator.create_vectorstore(
settings.VECTOR_STORE,
docs_init=docs_init,
source_id=folder_name,
embeddings_key=os.getenv("EMBEDDINGS_KEY"),
)
else:
store = VectorCreator.create_vectorstore(
settings.VECTOR_STORE,
source_id=source_id,
embeddings_key=os.getenv("EMBEDDINGS_KEY"),
)
store.delete_index()
total_docs = len(docs)
# Process and embed documents
for idx, doc in tqdm(
docs,
desc="Embedding 🦖",
unit="docs",
total=total_docs,
bar_format="{l_bar}{bar}| Time Left: {remaining}",
):
try:
# Update task status for progress tracking
progress = int((idx / total_docs) * 100)
task_status.update_state(state="PROGRESS", meta={"current": progress})
# Add document to vector store
add_text_to_store_with_retry(store, doc, source_id)
except Exception as e:
logging.error(f"Error embedding document {idx}: {e}")
logging.info(f"Saving progress at document {idx} out of {total_docs}")
store.save_local(folder_name)
break
# Save the vector store
if settings.VECTOR_STORE == "faiss":
store.save_local(folder_name)
logging.info("Vector store saved successfully.")

View File

@@ -10,18 +10,23 @@ from application.parser.file.epub_parser import EpubParser
from application.parser.file.html_parser import HTMLParser
from application.parser.file.markdown_parser import MarkdownParser
from application.parser.file.rst_parser import RstParser
from application.parser.file.tabular_parser import PandasCSVParser
from application.parser.file.tabular_parser import PandasCSVParser,ExcelParser
from application.parser.file.json_parser import JSONParser
from application.parser.file.pptx_parser import PPTXParser
from application.parser.schema.base import Document
DEFAULT_FILE_EXTRACTOR: Dict[str, BaseParser] = {
".pdf": PDFParser(),
".docx": DocxParser(),
".csv": PandasCSVParser(),
".xlsx":ExcelParser(),
".epub": EpubParser(),
".md": MarkdownParser(),
".rst": RstParser(),
".html": HTMLParser(),
".mdx": MarkdownParser(),
".json":JSONParser(),
".pptx":PPTXParser(),
}

View File

@@ -3,7 +3,6 @@
Contains parser for html files.
"""
import re
from pathlib import Path
from typing import Dict, Union
@@ -18,66 +17,8 @@ class HTMLParser(BaseParser):
return {}
def parse_file(self, file: Path, errors: str = "ignore") -> Union[str, list[str]]:
"""Parse file.
from langchain_community.document_loaders import BSHTMLLoader
Returns:
Union[str, List[str]]: a string or a List of strings.
"""
try:
from unstructured.partition.html import partition_html
from unstructured.staging.base import convert_to_isd
from unstructured.cleaners.core import clean
except ImportError:
raise ValueError("unstructured package is required to parse HTML files.")
# Using the unstructured library to convert the html to isd format
# isd sample : isd = [
# {"text": "My Title", "type": "Title"},
# {"text": "My Narrative", "type": "NarrativeText"}
# ]
with open(file, "r", encoding="utf-8") as fp:
elements = partition_html(file=fp)
isd = convert_to_isd(elements)
# Removing non ascii charactwers from isd_el['text']
for isd_el in isd:
isd_el['text'] = isd_el['text'].encode("ascii", "ignore").decode()
# Removing all the \n characters from isd_el['text'] using regex and replace with single space
# Removing all the extra spaces from isd_el['text'] using regex and replace with single space
for isd_el in isd:
isd_el['text'] = re.sub(r'\n', ' ', isd_el['text'], flags=re.MULTILINE | re.DOTALL)
isd_el['text'] = re.sub(r"\s{2,}", " ", isd_el['text'], flags=re.MULTILINE | re.DOTALL)
# more cleaning: extra_whitespaces, dashes, bullets, trailing_punctuation
for isd_el in isd:
clean(isd_el['text'], extra_whitespace=True, dashes=True, bullets=True, trailing_punctuation=True)
# Creating a list of all the indexes of isd_el['type'] = 'Title'
title_indexes = [i for i, isd_el in enumerate(isd) if isd_el['type'] == 'Title']
# Creating 'Chunks' - List of lists of strings
# each list starting with isd_el['type'] = 'Title' and all the data till the next 'Title'
# Each Chunk can be thought of as an individual set of data, which can be sent to the model
# Where Each Title is grouped together with the data under it
Chunks = [[]]
final_chunks = list(list())
for i, isd_el in enumerate(isd):
if i in title_indexes:
Chunks.append([])
Chunks[-1].append(isd_el['text'])
# Removing all the chunks with sum of length of all the strings in the chunk < 25
# TODO: This value can be an user defined variable
for chunk in Chunks:
# sum of length of all the strings in the chunk
sum = 0
sum += len(str(chunk))
if sum < 25:
Chunks.remove(chunk)
else:
# appending all the approved chunks to final_chunks as a single string
final_chunks.append(" ".join([str(item) for item in chunk]))
return final_chunks
loader = BSHTMLLoader(file)
data = loader.load()
return data

View File

@@ -0,0 +1,57 @@
import json
from typing import Any, Dict, List, Union
from pathlib import Path
from application.parser.file.base_parser import BaseParser
class JSONParser(BaseParser):
r"""JSON (.json) parser.
Parses JSON files into a list of strings or a concatenated document.
It handles both JSON objects (dictionaries) and arrays (lists).
Args:
concat_rows (bool): Whether to concatenate all rows into one document.
If set to False, a Document will be created for each item in the JSON.
True by default.
row_joiner (str): Separator to use for joining each row.
Only used when `concat_rows=True`.
Set to "\n" by default.
json_config (dict): Options for parsing JSON. Can be used to specify options like
custom decoding or formatting. Set to empty dict by default.
"""
def __init__(
self,
*args: Any,
concat_rows: bool = True,
row_joiner: str = "\n",
json_config: dict = {},
**kwargs: Any
) -> None:
"""Init params."""
super().__init__(*args, **kwargs)
self._concat_rows = concat_rows
self._row_joiner = row_joiner
self._json_config = json_config
def _init_parser(self) -> Dict:
"""Init parser."""
return {}
def parse_file(self, file: Path, errors: str = "ignore") -> Union[str, List[str]]:
"""Parse JSON file."""
with open(file, 'r', encoding='utf-8') as f:
data = json.load(f, **self._json_config)
if isinstance(data, dict):
data = [data]
if self._concat_rows:
return self._row_joiner.join([str(item) for item in data])
else:
return data

View File

@@ -0,0 +1,75 @@
"""PPT parser.
Contains parsers for presentation (.pptx) files to extract slide text.
"""
from pathlib import Path
from typing import Any, Dict, List, Union
from application.parser.file.base_parser import BaseParser
class PPTXParser(BaseParser):
r"""PPTX (.pptx) parser for extracting text from PowerPoint slides.
Args:
concat_slides (bool): Specifies whether to concatenate all slide text into one document.
- If True, slide texts will be joined together as a single string.
- If False, each slide's text will be stored as a separate entry in a list.
Set to True by default.
slide_separator (str): Separator used to join slides' text content.
Only used when `concat_slides=True`. Default is "\n".
Refer to https://python-pptx.readthedocs.io/en/latest/ for more information.
"""
def __init__(
self,
*args: Any,
concat_slides: bool = True,
slide_separator: str = "\n",
**kwargs: Any
) -> None:
"""Init params."""
super().__init__(*args, **kwargs)
self._concat_slides = concat_slides
self._slide_separator = slide_separator
def _init_parser(self) -> Dict:
"""Init parser."""
return {}
def parse_file(self, file: Path, errors: str = "ignore") -> Union[str, List[str]]:
r"""
Parse a .pptx file and extract text from each slide.
Args:
file (Path): Path to the .pptx file.
errors (str): Error handling policy ('ignore' by default).
Returns:
Union[str, List[str]]: Concatenated text if concat_slides is True,
otherwise a list of slide texts.
"""
try:
from pptx import Presentation
except ImportError:
raise ImportError("pptx module is required to read .PPTX files.")
try:
presentation = Presentation(file)
slide_texts=[]
# Iterate over each slide in the presentation
for slide in presentation.slides:
slide_text=""
# Iterate over each shape in the slide
for shape in slide.shapes:
# Check if the shape has a 'text' attribute and append that to the slide_text
if hasattr(shape,"text"):
slide_text+=shape.text
slide_texts.append(slide_text.strip())
if self._concat_slides:
return self._slide_separator.join(slide_texts)
else:
return slide_texts
except Exception as e:
raise e

View File

@@ -113,3 +113,68 @@ class PandasCSVParser(BaseParser):
return (self._row_joiner).join(text_list)
else:
return text_list
class ExcelParser(BaseParser):
r"""Excel (.xlsx) parser.
Parses Excel files using Pandas `read_excel` function.
If special parameters are required, use the `pandas_config` dict.
Args:
concat_rows (bool): whether to concatenate all rows into one document.
If set to False, a Document will be created for each row.
True by default.
col_joiner (str): Separator to use for joining cols per row.
Set to ", " by default.
row_joiner (str): Separator to use for joining each row.
Only used when `concat_rows=True`.
Set to "\n" by default.
pandas_config (dict): Options for the `pandas.read_excel` function call.
Refer to https://pandas.pydata.org/docs/reference/api/pandas.read_excel.html
for more information.
Set to empty dict by default, this means pandas will try to figure
out the table structure on its own.
"""
def __init__(
self,
*args: Any,
concat_rows: bool = True,
col_joiner: str = ", ",
row_joiner: str = "\n",
pandas_config: dict = {},
**kwargs: Any
) -> None:
"""Init params."""
super().__init__(*args, **kwargs)
self._concat_rows = concat_rows
self._col_joiner = col_joiner
self._row_joiner = row_joiner
self._pandas_config = pandas_config
def _init_parser(self) -> Dict:
"""Init parser."""
return {}
def parse_file(self, file: Path, errors: str = "ignore") -> Union[str, List[str]]:
"""Parse file."""
try:
import pandas as pd
except ImportError:
raise ValueError("pandas module is required to read Excel files.")
df = pd.read_excel(file, **self._pandas_config)
text_list = df.apply(
lambda row: (self._col_joiner).join(row.astype(str).tolist()), axis=1
).tolist()
if self._concat_rows:
return (self._row_joiner).join(text_list)
else:
return text_list

View File

@@ -1,66 +0,0 @@
import os
import javalang
def find_files(directory):
files_list = []
for root, dirs, files in os.walk(directory):
for file in files:
if file.endswith('.java'):
files_list.append(os.path.join(root, file))
return files_list
def extract_functions(file_path):
with open(file_path, "r") as file:
java_code = file.read()
methods = {}
tree = javalang.parse.parse(java_code)
for _, node in tree.filter(javalang.tree.MethodDeclaration):
method_name = node.name
start_line = node.position.line - 1
end_line = start_line
brace_count = 0
for line in java_code.splitlines()[start_line:]:
end_line += 1
brace_count += line.count("{") - line.count("}")
if brace_count == 0:
break
method_source_code = "\n".join(java_code.splitlines()[start_line:end_line])
methods[method_name] = method_source_code
return methods
def extract_classes(file_path):
with open(file_path, 'r') as file:
source_code = file.read()
classes = {}
tree = javalang.parse.parse(source_code)
for class_decl in tree.types:
class_name = class_decl.name
declarations = []
methods = []
for field_decl in class_decl.fields:
field_name = field_decl.declarators[0].name
field_type = field_decl.type.name
declarations.append(f"{field_type} {field_name}")
for method_decl in class_decl.methods:
methods.append(method_decl.name)
class_string = "Declarations: " + ", ".join(declarations) + "\n Method name: " + ", ".join(methods)
classes[class_name] = class_string
return classes
def extract_functions_and_classes(directory):
files = find_files(directory)
functions_dict = {}
classes_dict = {}
for file in files:
functions = extract_functions(file)
if functions:
functions_dict[file] = functions
classes = extract_classes(file)
if classes:
classes_dict[file] = classes
return functions_dict, classes_dict

View File

@@ -1,70 +0,0 @@
import os
import escodegen
import esprima
def find_files(directory):
files_list = []
for root, dirs, files in os.walk(directory):
for file in files:
if file.endswith('.js'):
files_list.append(os.path.join(root, file))
return files_list
def extract_functions(file_path):
with open(file_path, 'r') as file:
source_code = file.read()
functions = {}
tree = esprima.parseScript(source_code)
for node in tree.body:
if node.type == 'FunctionDeclaration':
func_name = node.id.name if node.id else '<anonymous>'
functions[func_name] = escodegen.generate(node)
elif node.type == 'VariableDeclaration':
for declaration in node.declarations:
if declaration.init and declaration.init.type == 'FunctionExpression':
func_name = declaration.id.name if declaration.id else '<anonymous>'
functions[func_name] = escodegen.generate(declaration.init)
elif node.type == 'ClassDeclaration':
for subnode in node.body.body:
if subnode.type == 'MethodDefinition':
func_name = subnode.key.name
functions[func_name] = escodegen.generate(subnode.value)
elif subnode.type == 'VariableDeclaration':
for declaration in subnode.declarations:
if declaration.init and declaration.init.type == 'FunctionExpression':
func_name = declaration.id.name if declaration.id else '<anonymous>'
functions[func_name] = escodegen.generate(declaration.init)
return functions
def extract_classes(file_path):
with open(file_path, 'r') as file:
source_code = file.read()
classes = {}
tree = esprima.parseScript(source_code)
for node in tree.body:
if node.type == 'ClassDeclaration':
class_name = node.id.name
function_names = []
for subnode in node.body.body:
if subnode.type == 'MethodDefinition':
function_names.append(subnode.key.name)
classes[class_name] = ", ".join(function_names)
return classes
def extract_functions_and_classes(directory):
files = find_files(directory)
functions_dict = {}
classes_dict = {}
for file in files:
functions = extract_functions(file)
if functions:
functions_dict[file] = functions
classes = extract_classes(file)
if classes:
classes_dict[file] = classes
return functions_dict, classes_dict

View File

@@ -0,0 +1,94 @@
from typing import List, Tuple, Union, Optional
from transformers import AutoTokenizer, AutoModel
from sentence_transformers import SentenceTransformer
import torch
import torch.nn as nn
from application.parser.schema.base import Document
class LateChunker:
def __init__(self, model_name: str, late_tokens: int = 1000, **model_kwargs):
"""
Initialize the LateChunker with a model, tokenizer, and late_tokens limit.
Supports both transformers and sentence-transformers models.
"""
self.late_tokens = late_tokens
self.model_name = model_name
# Load model based on type
if "sentence-transformers" in model_name:
self.model = SentenceTransformer(model_name, **model_kwargs)
self.tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
self.wrapper_type = "sentence_transformers"
else:
self.model = AutoModel.from_pretrained(model_name, trust_remote_code=True, **model_kwargs)
self.tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
self.wrapper_type = "transformers"
def tokenize_with_offsets(self, text: str):
"""Tokenize text and return tokens with character offsets."""
tokens = self.tokenizer.encode_plus(
text, return_offsets_mapping=True, add_special_tokens=False
)
return tokens["input_ids"], tokens["offset_mapping"]
def late_chunk_with_embeddings(
self, documents: List[Document]
) -> List[Tuple[str, List[Tuple[int, int]], List[float]]]:
"""
Combines documents into 'super chunks' that fit within `late_tokens` limit.
Outputs each super chunk with span annotations and embeddings.
"""
super_chunks = []
current_super_chunk_text = []
current_token_count = 0
span_annotations = []
for doc in documents:
doc_text = doc.text
input_ids, offsets = self.tokenize_with_offsets(doc_text)
doc_token_count = len(input_ids)
# Check if adding this document exceeds the late_tokens limit
if current_token_count + doc_token_count > self.late_tokens:
# Finalize the current super chunk
combined_text = " ".join(current_super_chunk_text)
embeddings = self.generate_embeddings(combined_text)
super_chunks.append((combined_text, span_annotations, embeddings))
# Reset for a new super chunk
current_super_chunk_text = []
span_annotations = []
current_token_count = 0
# Add document to the current super chunk
start_token = current_token_count
end_token = current_token_count + doc_token_count
span_annotations.append((start_token, end_token))
current_super_chunk_text.append(doc_text)
current_token_count = end_token
# Add the final super chunk if there are remaining documents
if current_super_chunk_text:
combined_text = " ".join(current_super_chunk_text)
embeddings = self.generate_embeddings(combined_text)
super_chunks.append((combined_text, span_annotations, embeddings))
return super_chunks
def generate_embeddings(self, text: str) -> List[float]:
"""Generate embeddings for a given text using the loaded model."""
if self.wrapper_type == "sentence_transformers":
# Sentence-Transformers
embeddings = self.model.encode([text])
return embeddings[0].tolist()
elif self.wrapper_type == "transformers":
# Transformers models
inputs = self.tokenizer(text, return_tensors="pt")
model_output = self.model(**inputs)
return model_output.last_hidden_state.mean(dim=1).squeeze().tolist()
else:
raise ValueError("Unsupported model type for embedding generation.")

73
application/parser/open_ai_func.py Normal file → Executable file
View File

@@ -1,38 +1,33 @@
import os
import tiktoken
from application.vectorstore.vector_creator import VectorCreator
from application.core.settings import settings
from retry import retry
from application.core.settings import settings
from application.vectorstore.vector_creator import VectorCreator
# from langchain_community.embeddings import HuggingFaceEmbeddings
# from langchain_community.embeddings import HuggingFaceInstructEmbeddings
# from langchain_community.embeddings import CohereEmbeddings
def num_tokens_from_string(string: str, encoding_name: str) -> int:
# Function to convert string to tokens and estimate user cost.
encoding = tiktoken.get_encoding(encoding_name)
num_tokens = len(encoding.encode(string))
total_price = ((num_tokens / 1000) * 0.0004)
return num_tokens, total_price
@retry(tries=10, delay=60)
def store_add_texts_with_retry(store, i):
def store_add_texts_with_retry(store, i, id):
# add source_id to the metadata
i.metadata["source_id"] = str(id)
store.add_texts([i.page_content], metadatas=[i.metadata])
# store_pine.add_texts([i.page_content], metadatas=[i.metadata])
def call_openai_api(docs, folder_name, task_status):
# Function to create a vector store from the documents and save it to disk.
def call_openai_api(docs, folder_name, id, task_status):
# Function to create a vector store from the documents and save it to disk
# create output folder if it doesn't exist
if not os.path.exists(f"{folder_name}"):
os.makedirs(f"{folder_name}")
from tqdm import tqdm
c1 = 0
if settings.VECTOR_STORE == "faiss":
docs_init = [docs[0]]
@@ -40,26 +35,34 @@ def call_openai_api(docs, folder_name, task_status):
store = VectorCreator.create_vectorstore(
settings.VECTOR_STORE,
docs_init = docs_init,
path=f"{folder_name}",
embeddings_key=os.getenv("EMBEDDINGS_KEY")
docs_init=docs_init,
source_id=f"{folder_name}",
embeddings_key=os.getenv("EMBEDDINGS_KEY"),
)
else:
store = VectorCreator.create_vectorstore(
settings.VECTOR_STORE,
path=f"{folder_name}",
embeddings_key=os.getenv("EMBEDDINGS_KEY")
source_id=str(id),
embeddings_key=os.getenv("EMBEDDINGS_KEY"),
)
store.delete_index()
# Uncomment for MPNet embeddings
# model_name = "sentence-transformers/all-mpnet-base-v2"
# hf = HuggingFaceEmbeddings(model_name=model_name)
# store = FAISS.from_documents(docs_test, hf)
s1 = len(docs)
for i in tqdm(docs, desc="Embedding 🦖", unit="docs", total=len(docs),
bar_format='{l_bar}{bar}| Time Left: {remaining}'):
for i in tqdm(
docs,
desc="Embedding 🦖",
unit="docs",
total=len(docs),
bar_format="{l_bar}{bar}| Time Left: {remaining}",
):
try:
task_status.update_state(state='PROGRESS', meta={'current': int((c1 / s1) * 100)})
store_add_texts_with_retry(store, i)
task_status.update_state(
state="PROGRESS", meta={"current": int((c1 / s1) * 100)}
)
store_add_texts_with_retry(store, i, id)
except Exception as e:
print(e)
print("Error on ", i)
@@ -70,25 +73,3 @@ def call_openai_api(docs, folder_name, task_status):
c1 += 1
if settings.VECTOR_STORE == "faiss":
store.save_local(f"{folder_name}")
def get_user_permission(docs, folder_name):
# Function to ask user permission to call the OpenAI api and spend their OpenAI funds.
# Here we convert the docs list to a string and calculate the number of OpenAI tokens the string represents.
# docs_content = (" ".join(docs))
docs_content = ""
for doc in docs:
docs_content += doc.page_content
tokens, total_price = num_tokens_from_string(string=docs_content, encoding_name="cl100k_base")
# Here we print the number of tokens and the approx user cost with some visually appealing formatting.
print(f"Number of Tokens = {format(tokens, ',d')}")
print(f"Approx Cost = ${format(total_price, ',.2f')}")
# Here we check for user permission before calling the API.
user_input = input("Price Okay? (Y/N) \n").lower()
if user_input == "y":
call_openai_api(docs, folder_name)
elif user_input == "":
call_openai_api(docs, folder_name)
else:
print("The API was not called. No money was spent.")

View File

@@ -1,121 +0,0 @@
import ast
import os
from pathlib import Path
import tiktoken
from langchain.llms import OpenAI
from langchain.prompts import PromptTemplate
def find_files(directory):
files_list = []
for root, dirs, files in os.walk(directory):
for file in files:
if file.endswith('.py'):
files_list.append(os.path.join(root, file))
return files_list
def extract_functions(file_path):
with open(file_path, 'r') as file:
source_code = file.read()
functions = {}
tree = ast.parse(source_code)
for node in ast.walk(tree):
if isinstance(node, ast.FunctionDef):
func_name = node.name
func_def = ast.get_source_segment(source_code, node)
functions[func_name] = func_def
return functions
def extract_classes(file_path):
with open(file_path, 'r') as file:
source_code = file.read()
classes = {}
tree = ast.parse(source_code)
for node in ast.walk(tree):
if isinstance(node, ast.ClassDef):
class_name = node.name
function_names = []
for subnode in ast.walk(node):
if isinstance(subnode, ast.FunctionDef):
function_names.append(subnode.name)
classes[class_name] = ", ".join(function_names)
return classes
def extract_functions_and_classes(directory):
files = find_files(directory)
functions_dict = {}
classes_dict = {}
for file in files:
functions = extract_functions(file)
if functions:
functions_dict[file] = functions
classes = extract_classes(file)
if classes:
classes_dict[file] = classes
return functions_dict, classes_dict
def parse_functions(functions_dict, formats, dir):
c1 = len(functions_dict)
for i, (source, functions) in enumerate(functions_dict.items(), start=1):
print(f"Processing file {i}/{c1}")
source_w = source.replace(dir + "/", "").replace("." + formats, ".md")
subfolders = "/".join(source_w.split("/")[:-1])
Path(f"outputs/{subfolders}").mkdir(parents=True, exist_ok=True)
for j, (name, function) in enumerate(functions.items(), start=1):
print(f"Processing function {j}/{len(functions)}")
prompt = PromptTemplate(
input_variables=["code"],
template="Code: \n{code}, \nDocumentation: ",
)
llm = OpenAI(temperature=0)
response = llm(prompt.format(code=function))
mode = "a" if Path(f"outputs/{source_w}").exists() else "w"
with open(f"outputs/{source_w}", mode) as f:
f.write(
f"\n\n# Function name: {name} \n\nFunction: \n```\n{function}\n```, \nDocumentation: \n{response}")
def parse_classes(classes_dict, formats, dir):
c1 = len(classes_dict)
for i, (source, classes) in enumerate(classes_dict.items()):
print(f"Processing file {i + 1}/{c1}")
source_w = source.replace(dir + "/", "").replace("." + formats, ".md")
subfolders = "/".join(source_w.split("/")[:-1])
Path(f"outputs/{subfolders}").mkdir(parents=True, exist_ok=True)
for name, function_names in classes.items():
print(f"Processing Class {i + 1}/{c1}")
prompt = PromptTemplate(
input_variables=["class_name", "functions_names"],
template="Class name: {class_name} \nFunctions: {functions_names}, \nDocumentation: ",
)
llm = OpenAI(temperature=0)
response = llm(prompt.format(class_name=name, functions_names=function_names))
with open(f"outputs/{source_w}", "a" if Path(f"outputs/{source_w}").exists() else "w") as f:
f.write(f"\n\n# Class name: {name} \n\nFunctions: \n{function_names}, \nDocumentation: \n{response}")
def transform_to_docs(functions_dict, classes_dict, formats, dir):
docs_content = ''.join([str(key) + str(value) for key, value in functions_dict.items()])
docs_content += ''.join([str(key) + str(value) for key, value in classes_dict.items()])
num_tokens = len(tiktoken.get_encoding("cl100k_base").encode(docs_content))
total_price = ((num_tokens / 1000) * 0.02)
print(f"Number of Tokens = {num_tokens:,d}")
print(f"Approx Cost = ${total_price:,.2f}")
user_input = input("Price Okay? (Y/N)\n").lower()
if user_input == "y" or user_input == "":
if not Path("outputs").exists():
Path("outputs").mkdir()
parse_functions(functions_dict, formats, dir)
parse_classes(classes_dict, formats, dir)
print("All done!")
else:
print("The API was not called. No money was spent.")

View File

@@ -5,7 +5,7 @@ from application.parser.remote.base import BaseRemote
class CrawlerLoader(BaseRemote):
def __init__(self, limit=10):
from langchain.document_loaders import WebBaseLoader
from langchain_community.document_loaders import WebBaseLoader
self.loader = WebBaseLoader # Initialize the document loader
self.limit = limit # Set the limit for the number of pages to scrape

View File

@@ -0,0 +1,58 @@
import base64
import requests
from typing import List
from application.parser.remote.base import BaseRemote
from langchain_core.documents import Document
import mimetypes
class GitHubLoader(BaseRemote):
def __init__(self):
self.access_token = None
self.headers = {
"Authorization": f"token {self.access_token}"
} if self.access_token else {}
return
def fetch_file_content(self, repo_url: str, file_path: str) -> str:
url = f"https://api.github.com/repos/{repo_url}/contents/{file_path}"
response = requests.get(url, headers=self.headers)
if response.status_code == 200:
content = response.json()
mime_type, _ = mimetypes.guess_type(file_path) # Guess the MIME type based on the file extension
if content.get("encoding") == "base64":
if mime_type and mime_type.startswith("text"): # Handle only text files
try:
decoded_content = base64.b64decode(content["content"]).decode("utf-8")
return f"Filename: {file_path}\n\n{decoded_content}"
except Exception as e:
raise e
else:
return f"Filename: {file_path} is a binary file and was skipped."
else:
return f"Filename: {file_path}\n\n{content['content']}"
else:
response.raise_for_status()
def fetch_repo_files(self, repo_url: str, path: str = "") -> List[str]:
url = f"https://api.github.com/repos/{repo_url}/contents/{path}"
response = requests.get(url, headers={**self.headers, "Accept": "application/vnd.github.v3.raw"})
contents = response.json()
files = []
for item in contents:
if item["type"] == "file":
files.append(item["path"])
elif item["type"] == "dir":
files.extend(self.fetch_repo_files(repo_url, item["path"]))
return files
def load_data(self, repo_url: str) -> List[Document]:
repo_name = repo_url.split("github.com/")[-1]
files = self.fetch_repo_files(repo_name)
documents = []
for file_path in files:
content = self.fetch_file_content(repo_name, file_path)
documents.append(Document(page_content=content, metadata={"title": file_path,
"source": f"https://github.com/{repo_name}/blob/main/{file_path}"}))
return documents

View File

@@ -1,10 +1,19 @@
from application.parser.remote.base import BaseRemote
from langchain_community.document_loaders import RedditPostsLoader
import json
class RedditPostsLoaderRemote(BaseRemote):
def load_data(self, inputs):
data = eval(inputs)
try:
data = json.loads(inputs)
except json.JSONDecodeError as e:
raise ValueError(f"Invalid JSON input: {e}")
required_fields = ["client_id", "client_secret", "user_agent", "search_queries"]
missing_fields = [field for field in required_fields if field not in data]
if missing_fields:
raise ValueError(f"Missing required fields: {', '.join(missing_fields)}")
client_id = data.get("client_id")
client_secret = data.get("client_secret")
user_agent = data.get("user_agent")

View File

@@ -2,6 +2,7 @@ from application.parser.remote.sitemap_loader import SitemapLoader
from application.parser.remote.crawler_loader import CrawlerLoader
from application.parser.remote.web_loader import WebLoader
from application.parser.remote.reddit_loader import RedditPostsLoaderRemote
from application.parser.remote.github_loader import GitHubLoader
class RemoteCreator:
@@ -10,6 +11,7 @@ class RemoteCreator:
"sitemap": SitemapLoader,
"crawler": CrawlerLoader,
"reddit": RedditPostsLoaderRemote,
"github": GitHubLoader,
}
@classmethod

View File

@@ -5,7 +5,7 @@ from application.parser.remote.base import BaseRemote
class SitemapLoader(BaseRemote):
def __init__(self, limit=20):
from langchain.document_loaders import WebBaseLoader
from langchain_community.document_loaders import WebBaseLoader
self.loader = WebBaseLoader
self.limit = limit # Adding limit to control the number of URLs to process

View File

@@ -1,22 +1,32 @@
from application.parser.remote.base import BaseRemote
from langchain_community.document_loaders import WebBaseLoader
headers = {
"User-Agent": "Mozilla/5.0",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*"
";q=0.8",
"Accept-Language": "en-US,en;q=0.5",
"Referer": "https://www.google.com/",
"DNT": "1",
"Connection": "keep-alive",
"Upgrade-Insecure-Requests": "1",
}
class WebLoader(BaseRemote):
def __init__(self):
from langchain.document_loaders import WebBaseLoader
self.loader = WebBaseLoader
def load_data(self, inputs):
urls = inputs
if isinstance(urls, str):
urls = [urls] # Convert string to list if a single URL is passed
urls = [urls]
documents = []
for url in urls:
try:
loader = self.loader([url]) # Process URLs one by one
loader = self.loader([url], header_template=headers)
documents.extend(loader.load())
except Exception as e:
print(f"Error processing URL {url}: {e}")
continue # Continue with the next URL if an error occurs
return documents
continue
return documents

View File

@@ -1,35 +1,89 @@
anthropic==0.12.0
boto3==1.34.6
anthropic==0.34.2
boto3==1.34.153
beautifulsoup4==4.12.3
celery==5.3.6
dataclasses_json==0.6.3
dataclasses-json==0.6.7
docx2txt==0.8
duckduckgo-search==5.3.0
EbookLib==0.18
elasticsearch==8.12.0
duckduckgo-search==6.3.0
ebooklib==0.18
elastic-transport==8.15.0
elasticsearch==8.15.1
escodegen==1.0.11
esprima==4.0.1
faiss-cpu==1.7.4
Flask==3.0.1
gunicorn==21.2.0
html2text==2020.1.16
esutils==1.0.1
Flask==3.0.3
faiss-cpu==1.8.0.post1
flask-restx==1.3.0
gTTS==2.3.2
gunicorn==23.0.0
html2text==2024.2.26
javalang==0.13.0
langchain==0.1.4
langchain-openai==0.0.5
nltk==3.8.1
openapi3_parser==1.1.16
pandas==2.2.0
pydantic_settings==2.1.0
pymongo==4.6.3
PyPDF2==3.0.1
jinja2==3.1.4
jiter==0.5.0
jmespath==1.0.1
joblib==1.4.2
jsonpatch==1.33
jsonpointer==3.0.0
jsonschema==4.23.0
jsonschema-spec==0.2.4
jsonschema-specifications==2023.7.1
kombu==5.4.2
langchain==0.3.0
langchain-community==0.3.0
langchain-core==0.3.2
langchain-openai==0.2.0
langchain-text-splitters==0.3.0
langsmith==0.1.125
lazy-object-proxy==1.10.0
lxml==5.3.0
markupsafe==2.1.5
marshmallow==3.22.0
mpmath==1.3.0
multidict==6.1.0
mypy-extensions==1.0.0
networkx==3.3
numpy==1.26.4
openai==1.46.1
openapi-schema-validator==0.6.2
openapi-spec-validator==0.6.0
openapi3-parser==1.1.18
orjson==3.10.7
packaging==24.1
pandas==2.2.3
openpyxl==3.1.5
pathable==0.4.3
pillow==10.4.0
portalocker==2.10.1
prance==23.6.21.0
primp==0.6.3
prompt-toolkit==3.0.47
protobuf==5.28.2
py==1.11.0
pydantic==2.9.2
pydantic-core==2.23.4
pydantic-settings==2.4.0
pymongo==4.8.0
pypdf2==3.0.1
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
qdrant-client==1.8.2
python-pptx==1.0.2
qdrant-client==1.11.0
redis==5.0.1
Requests==2.31.0
referencing==0.30.2
regex==2024.9.11
requests==2.32.3
retry==0.9.2
sentence-transformers
tiktoken==0.5.2
torch==2.1.2
tqdm==4.66.1
transformers==4.36.2
unstructured==0.12.2
Werkzeug==3.0.1
sentence-transformers==3.0.1
tiktoken==0.7.0
tokenizers==0.19.1
torch==2.4.1
tqdm==4.66.5
transformers==4.44.2
typing-extensions==4.12.2
typing-inspect==0.9.0
tzdata==2024.2
urllib3==2.2.3
vine==5.1.0
wcwidth==0.2.13
werkzeug==3.0.4
yarl==1.11.1

View File

@@ -12,3 +12,7 @@ class BaseRetriever(ABC):
@abstractmethod
def search(self, *args, **kwargs):
pass
@abstractmethod
def get_params(self):
pass

View File

@@ -2,7 +2,7 @@ import json
from application.retriever.base import BaseRetriever
from application.core.settings import settings
from application.llm.llm_creator import LLMCreator
from application.utils import count_tokens
from application.utils import num_tokens_from_string
from langchain_community.tools import BraveSearch
@@ -15,6 +15,7 @@ class BraveRetSearch(BaseRetriever):
chat_history,
prompt,
chunks=2,
token_limit=150,
gpt_model="docsgpt",
user_api_key=None,
):
@@ -24,6 +25,16 @@ class BraveRetSearch(BaseRetriever):
self.prompt = prompt
self.chunks = chunks
self.gpt_model = gpt_model
self.token_limit = (
token_limit
if token_limit
< settings.MODEL_TOKEN_LIMITS.get(
self.gpt_model, settings.DEFAULT_MAX_HISTORY
)
else settings.MODEL_TOKEN_LIMITS.get(
self.gpt_model, settings.DEFAULT_MAX_HISTORY
)
)
self.user_api_key = user_api_key
def _get_data(self):
@@ -64,16 +75,12 @@ class BraveRetSearch(BaseRetriever):
if len(self.chat_history) > 1:
tokens_current_history = 0
# count tokens in history
self.chat_history.reverse()
for i in self.chat_history:
if "prompt" in i and "response" in i:
tokens_batch = count_tokens(i["prompt"]) + count_tokens(
tokens_batch = num_tokens_from_string(i["prompt"]) + num_tokens_from_string(
i["response"]
)
if (
tokens_current_history + tokens_batch
< settings.TOKENS_MAX_HISTORY
):
if tokens_current_history + tokens_batch < self.token_limit:
tokens_current_history += tokens_batch
messages_combine.append(
{"role": "user", "content": i["prompt"]}
@@ -93,3 +100,15 @@ class BraveRetSearch(BaseRetriever):
def search(self):
return self._get_data()
def get_params(self):
return {
"question": self.question,
"source": self.source,
"chat_history": self.chat_history,
"prompt": self.prompt,
"chunks": self.chunks,
"token_limit": self.token_limit,
"gpt_model": self.gpt_model,
"user_api_key": self.user_api_key
}

View File

@@ -1,10 +1,9 @@
import os
from application.retriever.base import BaseRetriever
from application.core.settings import settings
from application.vectorstore.vector_creator import VectorCreator
from application.llm.llm_creator import LLMCreator
from application.utils import count_tokens
from application.utils import num_tokens_from_string
class ClassicRAG(BaseRetriever):
@@ -16,32 +15,28 @@ class ClassicRAG(BaseRetriever):
chat_history,
prompt,
chunks=2,
token_limit=150,
gpt_model="docsgpt",
user_api_key=None,
):
self.question = question
self.vectorstore = self._get_vectorstore(source=source)
self.vectorstore = source['active_docs'] if 'active_docs' in source else None
self.chat_history = chat_history
self.prompt = prompt
self.chunks = chunks
self.gpt_model = gpt_model
self.token_limit = (
token_limit
if token_limit
< settings.MODEL_TOKEN_LIMITS.get(
self.gpt_model, settings.DEFAULT_MAX_HISTORY
)
else settings.MODEL_TOKEN_LIMITS.get(
self.gpt_model, settings.DEFAULT_MAX_HISTORY
)
)
self.user_api_key = user_api_key
def _get_vectorstore(self, source):
if "active_docs" in source:
if source["active_docs"].split("/")[0] == "default":
vectorstore = ""
elif source["active_docs"].split("/")[0] == "local":
vectorstore = "indexes/" + source["active_docs"]
else:
vectorstore = "vectors/" + source["active_docs"]
if source["active_docs"] == "default":
vectorstore = ""
else:
vectorstore = ""
vectorstore = os.path.join("application", vectorstore)
return vectorstore
def _get_data(self):
if self.chunks == 0:
docs = []
@@ -52,17 +47,18 @@ class ClassicRAG(BaseRetriever):
docs_temp = docsearch.search(self.question, k=self.chunks)
docs = [
{
"title": (
i.metadata["title"].split("/")[-1]
if i.metadata
else i.page_content
),
"title": i.metadata.get(
"title", i.metadata.get("post_title", i.page_content)
).split("/")[-1],
"text": i.page_content,
"source": (
i.metadata.get("source")
if i.metadata.get("source")
else "local"
),
}
for i in docs_temp
]
if settings.LLM_NAME == "llama.cpp":
docs = [docs[0]]
return docs
@@ -79,16 +75,12 @@ class ClassicRAG(BaseRetriever):
if len(self.chat_history) > 1:
tokens_current_history = 0
# count tokens in history
self.chat_history.reverse()
for i in self.chat_history:
if "prompt" in i and "response" in i:
tokens_batch = count_tokens(i["prompt"]) + count_tokens(
tokens_batch = num_tokens_from_string(i["prompt"]) + num_tokens_from_string(
i["response"]
)
if (
tokens_current_history + tokens_batch
< settings.TOKENS_MAX_HISTORY
):
if tokens_current_history + tokens_batch < self.token_limit:
tokens_current_history += tokens_batch
messages_combine.append(
{"role": "user", "content": i["prompt"]}
@@ -101,10 +93,21 @@ class ClassicRAG(BaseRetriever):
llm = LLMCreator.create_llm(
settings.LLM_NAME, api_key=settings.API_KEY, user_api_key=self.user_api_key
)
completion = llm.gen_stream(model=self.gpt_model, messages=messages_combine)
for line in completion:
yield {"answer": str(line)}
def search(self):
return self._get_data()
def get_params(self):
return {
"question": self.question,
"source": self.vectorstore,
"chat_history": self.chat_history,
"prompt": self.prompt,
"chunks": self.chunks,
"token_limit": self.token_limit,
"gpt_model": self.gpt_model,
"user_api_key": self.user_api_key
}

View File

@@ -1,7 +1,7 @@
from application.retriever.base import BaseRetriever
from application.core.settings import settings
from application.llm.llm_creator import LLMCreator
from application.utils import count_tokens
from application.utils import num_tokens_from_string
from langchain_community.tools import DuckDuckGoSearchResults
from langchain_community.utilities import DuckDuckGoSearchAPIWrapper
@@ -15,6 +15,7 @@ class DuckDuckSearch(BaseRetriever):
chat_history,
prompt,
chunks=2,
token_limit=150,
gpt_model="docsgpt",
user_api_key=None,
):
@@ -24,6 +25,16 @@ class DuckDuckSearch(BaseRetriever):
self.prompt = prompt
self.chunks = chunks
self.gpt_model = gpt_model
self.token_limit = (
token_limit
if token_limit
< settings.MODEL_TOKEN_LIMITS.get(
self.gpt_model, settings.DEFAULT_MAX_HISTORY
)
else settings.MODEL_TOKEN_LIMITS.get(
self.gpt_model, settings.DEFAULT_MAX_HISTORY
)
)
self.user_api_key = user_api_key
def _parse_lang_string(self, input_string):
@@ -81,16 +92,12 @@ class DuckDuckSearch(BaseRetriever):
if len(self.chat_history) > 1:
tokens_current_history = 0
# count tokens in history
self.chat_history.reverse()
for i in self.chat_history:
if "prompt" in i and "response" in i:
tokens_batch = count_tokens(i["prompt"]) + count_tokens(
tokens_batch = num_tokens_from_string(i["prompt"]) + num_tokens_from_string(
i["response"]
)
if (
tokens_current_history + tokens_batch
< settings.TOKENS_MAX_HISTORY
):
if tokens_current_history + tokens_batch < self.token_limit:
tokens_current_history += tokens_batch
messages_combine.append(
{"role": "user", "content": i["prompt"]}
@@ -110,3 +117,15 @@ class DuckDuckSearch(BaseRetriever):
def search(self):
return self._get_data()
def get_params(self):
return {
"question": self.question,
"source": self.source,
"chat_history": self.chat_history,
"prompt": self.prompt,
"chunks": self.chunks,
"token_limit": self.token_limit,
"gpt_model": self.gpt_model,
"user_api_key": self.user_api_key
}

View File

@@ -5,15 +5,16 @@ from application.retriever.brave_search import BraveRetSearch
class RetrieverCreator:
retievers = {
retrievers = {
'classic': ClassicRAG,
'duckduck_search': DuckDuckSearch,
'brave_search': BraveRetSearch
'brave_search': BraveRetSearch,
'default': ClassicRAG
}
@classmethod
def create_retriever(cls, type, *args, **kwargs):
retiever_class = cls.retievers.get(type.lower())
retiever_class = cls.retrievers.get(type.lower())
if not retiever_class:
raise ValueError(f"No retievers class found for type {type}")
return retiever_class(*args, **kwargs)

10
application/tts/base.py Normal file
View File

@@ -0,0 +1,10 @@
from abc import ABC, abstractmethod
class BaseTTS(ABC):
def __init__(self):
pass
@abstractmethod
def text_to_speech(self, *args, **kwargs):
pass

View File

@@ -0,0 +1,29 @@
from io import BytesIO
import base64
from application.tts.base import BaseTTS
class ElevenlabsTTS(BaseTTS):
def __init__(self):
from elevenlabs.client import ElevenLabs
self.client = ElevenLabs(
api_key="ELEVENLABS_API_KEY",
)
def text_to_speech(self, text):
lang = "en"
audio = self.client.generate(
text=text,
model="eleven_multilingual_v2",
voice="Brian",
)
audio_data = BytesIO()
for chunk in audio:
audio_data.write(chunk)
audio_bytes = audio_data.getvalue()
# Encode to base64
audio_base64 = base64.b64encode(audio_bytes).decode("utf-8")
return audio_base64, lang

View File

@@ -0,0 +1,19 @@
import io
import base64
from gtts import gTTS
from application.tts.base import BaseTTS
class GoogleTTS(BaseTTS):
def __init__(self):
pass
def text_to_speech(self, text):
lang = "en"
audio_fp = io.BytesIO()
tts = gTTS(text=text, lang=lang, slow=False)
tts.write_to_fp(audio_fp)
audio_fp.seek(0)
audio_base64 = base64.b64encode(audio_fp.read()).decode("utf-8")
return audio_base64, lang

View File

@@ -1,10 +1,9 @@
import sys
from pymongo import MongoClient
from datetime import datetime
from application.core.settings import settings
from application.utils import count_tokens
from application.core.mongo_db import MongoDB
from application.utils import num_tokens_from_string
mongo = MongoClient(settings.MONGO_URI)
mongo = MongoDB.get_client()
db = mongo["docsgpt"]
usage_collection = db["token_usage"]
@@ -24,9 +23,9 @@ def update_token_usage(user_api_key, token_usage):
def gen_token_usage(func):
def wrapper(self, model, messages, stream, **kwargs):
for message in messages:
self.token_usage["prompt_tokens"] += count_tokens(message["content"])
self.token_usage["prompt_tokens"] += num_tokens_from_string(message["content"])
result = func(self, model, messages, stream, **kwargs)
self.token_usage["generated_tokens"] += count_tokens(result)
self.token_usage["generated_tokens"] += num_tokens_from_string(result)
update_token_usage(self.user_api_key, self.token_usage)
return result
@@ -36,14 +35,14 @@ def gen_token_usage(func):
def stream_token_usage(func):
def wrapper(self, model, messages, stream, **kwargs):
for message in messages:
self.token_usage["prompt_tokens"] += count_tokens(message["content"])
self.token_usage["prompt_tokens"] += num_tokens_from_string(message["content"])
batch = []
result = func(self, model, messages, stream, **kwargs)
for r in result:
batch.append(r)
yield r
for line in batch:
self.token_usage["generated_tokens"] += count_tokens(line)
self.token_usage["generated_tokens"] += num_tokens_from_string(line)
update_token_usage(self.user_api_key, self.token_usage)
return wrapper

View File

@@ -1,6 +1,48 @@
from transformers import GPT2TokenizerFast
import tiktoken
import hashlib
from flask import jsonify, make_response
def count_tokens(string):
tokenizer = GPT2TokenizerFast.from_pretrained('gpt2')
return len(tokenizer(string)['input_ids'])
_encoding = None
def get_encoding():
global _encoding
if _encoding is None:
_encoding = tiktoken.get_encoding("cl100k_base")
return _encoding
def num_tokens_from_string(string: str) -> int:
encoding = get_encoding()
num_tokens = len(encoding.encode(string))
return num_tokens
def count_tokens_docs(docs):
docs_content = ""
for doc in docs:
docs_content += doc.page_content
tokens = num_tokens_from_string(docs_content)
return tokens
def check_required_fields(data, required_fields):
missing_fields = [field for field in required_fields if field not in data]
if missing_fields:
return make_response(
jsonify(
{
"success": False,
"message": f"Missing fields: {', '.join(missing_fields)}",
}
),
400,
)
return None
def get_hash(data):
return hashlib.md5(data.encode()).hexdigest()

View File

@@ -1,13 +1,55 @@
from abc import ABC, abstractmethod
import os
from langchain_community.embeddings import (
HuggingFaceEmbeddings,
CohereEmbeddings,
HuggingFaceInstructEmbeddings,
)
from sentence_transformers import SentenceTransformer
from langchain_openai import OpenAIEmbeddings
from application.core.settings import settings
class EmbeddingsWrapper:
def __init__(self, model_name, *args, **kwargs):
self.model = SentenceTransformer(model_name, config_kwargs={'allow_dangerous_deserialization': True}, *args, **kwargs)
self.dimension = self.model.get_sentence_embedding_dimension()
def embed_query(self, query: str):
return self.model.encode(query).tolist()
def embed_documents(self, documents: list):
return self.model.encode(documents).tolist()
def __call__(self, text):
if isinstance(text, str):
return self.embed_query(text)
elif isinstance(text, list):
return self.embed_documents(text)
else:
raise ValueError("Input must be a string or a list of strings")
class EmbeddingsSingleton:
_instances = {}
@staticmethod
def get_instance(embeddings_name, *args, **kwargs):
if embeddings_name not in EmbeddingsSingleton._instances:
EmbeddingsSingleton._instances[embeddings_name] = EmbeddingsSingleton._create_instance(
embeddings_name, *args, **kwargs
)
return EmbeddingsSingleton._instances[embeddings_name]
@staticmethod
def _create_instance(embeddings_name, *args, **kwargs):
embeddings_factory = {
"openai_text-embedding-ada-002": OpenAIEmbeddings,
"huggingface_sentence-transformers/all-mpnet-base-v2": lambda: EmbeddingsWrapper("sentence-transformers/all-mpnet-base-v2"),
"huggingface_sentence-transformers-all-mpnet-base-v2": lambda: EmbeddingsWrapper("sentence-transformers/all-mpnet-base-v2"),
"huggingface_hkunlp/instructor-large": lambda: EmbeddingsWrapper("hkunlp/instructor-large"),
}
if embeddings_name in embeddings_factory:
return embeddings_factory[embeddings_name](*args, **kwargs)
else:
return EmbeddingsWrapper(embeddings_name, *args, **kwargs)
class BaseVectorStore(ABC):
def __init__(self):
pass
@@ -20,37 +62,28 @@ class BaseVectorStore(ABC):
return settings.OPENAI_API_BASE and settings.OPENAI_API_VERSION and settings.AZURE_DEPLOYMENT_NAME
def _get_embeddings(self, embeddings_name, embeddings_key=None):
embeddings_factory = {
"openai_text-embedding-ada-002": OpenAIEmbeddings,
"huggingface_sentence-transformers/all-mpnet-base-v2": HuggingFaceEmbeddings,
"huggingface_hkunlp/instructor-large": HuggingFaceInstructEmbeddings,
"cohere_medium": CohereEmbeddings
}
if embeddings_name not in embeddings_factory:
raise ValueError(f"Invalid embeddings_name: {embeddings_name}")
if embeddings_name == "openai_text-embedding-ada-002":
if self.is_azure_configured():
os.environ["OPENAI_API_TYPE"] = "azure"
embedding_instance = embeddings_factory[embeddings_name](
embedding_instance = EmbeddingsSingleton.get_instance(
embeddings_name,
model=settings.AZURE_EMBEDDINGS_DEPLOYMENT_NAME
)
else:
embedding_instance = embeddings_factory[embeddings_name](
embedding_instance = EmbeddingsSingleton.get_instance(
embeddings_name,
openai_api_key=embeddings_key
)
elif embeddings_name == "cohere_medium":
embedding_instance = embeddings_factory[embeddings_name](
cohere_api_key=embeddings_key
)
elif embeddings_name == "huggingface_sentence-transformers/all-mpnet-base-v2":
embedding_instance = embeddings_factory[embeddings_name](
#model_name="./model/all-mpnet-base-v2",
model_kwargs={"device": "cpu"},
)
if os.path.exists("./model/all-mpnet-base-v2"):
embedding_instance = EmbeddingsSingleton.get_instance(
embeddings_name="./model/all-mpnet-base-v2",
)
else:
embedding_instance = EmbeddingsSingleton.get_instance(
embeddings_name,
)
else:
embedding_instance = embeddings_factory[embeddings_name]()
return embedding_instance
embedding_instance = EmbeddingsSingleton.get_instance(embeddings_name)
return embedding_instance

View File

@@ -9,9 +9,9 @@ import elasticsearch
class ElasticsearchStore(BaseVectorStore):
_es_connection = None # Class attribute to hold the Elasticsearch connection
def __init__(self, path, embeddings_key, index_name=settings.ELASTIC_INDEX):
def __init__(self, source_id, embeddings_key, index_name=settings.ELASTIC_INDEX):
super().__init__()
self.path = path.replace("application/indexes/", "").rstrip("/")
self.source_id = source_id.replace("application/indexes/", "").rstrip("/")
self.embeddings_key = embeddings_key
self.index_name = index_name
@@ -81,7 +81,7 @@ class ElasticsearchStore(BaseVectorStore):
embeddings = self._get_embeddings(settings.EMBEDDINGS_NAME, self.embeddings_key)
vector = embeddings.embed_query(question)
knn = {
"filter": [{"match": {"metadata.store.keyword": self.path}}],
"filter": [{"match": {"metadata.source_id.keyword": self.source_id}}],
"field": "vector",
"k": k,
"num_candidates": 100,
@@ -100,7 +100,7 @@ class ElasticsearchStore(BaseVectorStore):
}
}
],
"filter": [{"match": {"metadata.store.keyword": self.path}}],
"filter": [{"match": {"metadata.source_id.keyword": self.source_id}}],
}
},
"rank": {"rrf": {}},
@@ -209,5 +209,4 @@ class ElasticsearchStore(BaseVectorStore):
def delete_index(self):
self._es_connection.delete_by_query(index=self.index_name, query={"match": {
"metadata.store.keyword": self.path}},)
"metadata.source_id.keyword": self.source_id}},)

View File

@@ -1,21 +1,29 @@
from langchain_community.vectorstores import FAISS
from application.vectorstore.base import BaseVectorStore
from application.core.settings import settings
import os
def get_vectorstore(path: str) -> str:
if path:
vectorstore = os.path.join("application", "indexes", path)
else:
vectorstore = os.path.join("application")
return vectorstore
class FaissStore(BaseVectorStore):
def __init__(self, path, embeddings_key, docs_init=None):
def __init__(self, source_id: str, embeddings_key: str, docs_init=None):
super().__init__()
self.path = path
self.path = get_vectorstore(source_id)
embeddings = self._get_embeddings(settings.EMBEDDINGS_NAME, embeddings_key)
if docs_init:
self.docsearch = FAISS.from_documents(
docs_init, embeddings
)
else:
self.docsearch = FAISS.load_local(
self.path, embeddings
)
try:
if docs_init:
self.docsearch = FAISS.from_documents(docs_init, embeddings)
else:
self.docsearch = FAISS.load_local(self.path, embeddings, allow_dangerous_deserialization=True)
except Exception:
raise
self.assert_embedding_dimensions(embeddings)
def search(self, *args, **kwargs):
@@ -31,16 +39,12 @@ class FaissStore(BaseVectorStore):
return self.docsearch.delete(*args, **kwargs)
def assert_embedding_dimensions(self, embeddings):
"""
Check that the word embedding dimension of the docsearch index matches
the dimension of the word embeddings used
"""
"""Check that the word embedding dimension of the docsearch index matches the dimension of the word embeddings used."""
if settings.EMBEDDINGS_NAME == "huggingface_sentence-transformers/all-mpnet-base-v2":
try:
word_embedding_dimension = embeddings.client[1].word_embedding_dimension
except AttributeError as e:
raise AttributeError("word_embedding_dimension not found in embeddings.client[1]") from e
word_embedding_dimension = getattr(embeddings, 'dimension', None)
if word_embedding_dimension is None:
raise AttributeError("'dimension' attribute not found in embeddings instance.")
docsearch_index_dimension = self.docsearch.index.d
if word_embedding_dimension != docsearch_index_dimension:
raise ValueError(f"word_embedding_dimension ({word_embedding_dimension}) " +
f"!= docsearch_index_word_embedding_dimension ({docsearch_index_dimension})")
raise ValueError(f"Embedding dimension mismatch: embeddings.dimension ({word_embedding_dimension}) != docsearch index dimension ({docsearch_index_dimension})")

View File

@@ -0,0 +1,119 @@
from typing import List, Optional
import importlib
from application.vectorstore.base import BaseVectorStore
from application.core.settings import settings
class LanceDBVectorStore(BaseVectorStore):
"""Class for LanceDB Vector Store integration."""
def __init__(self, path: str = settings.LANCEDB_PATH,
table_name_prefix: str = settings.LANCEDB_TABLE_NAME,
source_id: str = None,
embeddings_key: str = "embeddings"):
"""Initialize the LanceDB vector store."""
super().__init__()
self.path = path
self.table_name = f"{table_name_prefix}_{source_id}" if source_id else table_name_prefix
self.embeddings_key = embeddings_key
self._lance_db = None
self.docsearch = None
self._pa = None # PyArrow (pa) will be lazy loaded
@property
def pa(self):
"""Lazy load pyarrow module."""
if self._pa is None:
self._pa = importlib.import_module("pyarrow")
return self._pa
@property
def lancedb(self):
"""Lazy load lancedb module."""
if not hasattr(self, "_lancedb_module"):
self._lancedb_module = importlib.import_module("lancedb")
return self._lancedb_module
@property
def lance_db(self):
"""Lazy load the LanceDB connection."""
if self._lance_db is None:
self._lance_db = self.lancedb.connect(self.path)
return self._lance_db
@property
def table(self):
"""Lazy load the LanceDB table."""
if self.docsearch is None:
if self.table_name in self.lance_db.table_names():
self.docsearch = self.lance_db.open_table(self.table_name)
else:
self.docsearch = None
return self.docsearch
def ensure_table_exists(self):
"""Ensure the table exists before performing operations."""
if self.table is None:
embeddings = self._get_embeddings(settings.EMBEDDINGS_NAME, self.embeddings_key)
schema = self.pa.schema([
self.pa.field("vector", self.pa.list_(self.pa.float32(), list_size=embeddings.dimension)),
self.pa.field("text", self.pa.string()),
self.pa.field("metadata", self.pa.struct([
self.pa.field("key", self.pa.string()),
self.pa.field("value", self.pa.string())
]))
])
self.docsearch = self.lance_db.create_table(self.table_name, schema=schema)
def add_texts(self, texts: List[str], metadatas: Optional[List[dict]] = None, source_id: str = None):
"""Add texts with metadata and their embeddings to the LanceDB table."""
embeddings = self._get_embeddings(settings.EMBEDDINGS_NAME, self.embeddings_key).embed_documents(texts)
vectors = []
for embedding, text, metadata in zip(embeddings, texts, metadatas or [{}] * len(texts)):
if source_id:
metadata["source_id"] = source_id
metadata_struct = [{"key": k, "value": str(v)} for k, v in metadata.items()]
vectors.append({
"vector": embedding,
"text": text,
"metadata": metadata_struct
})
self.ensure_table_exists()
self.docsearch.add(vectors)
def search(self, query: str, k: int = 2, *args, **kwargs):
"""Search LanceDB for the top k most similar vectors."""
self.ensure_table_exists()
query_embedding = self._get_embeddings(settings.EMBEDDINGS_NAME, self.embeddings_key).embed_query(query)
results = self.docsearch.search(query_embedding).limit(k).to_list()
return [(result["_distance"], result["text"], result["metadata"]) for result in results]
def delete_index(self):
"""Delete the entire LanceDB index (table)."""
if self.table:
self.lance_db.drop_table(self.table_name)
def assert_embedding_dimensions(self, embeddings):
"""Ensure that embedding dimensions match the table index dimensions."""
word_embedding_dimension = embeddings.dimension
if self.table:
table_index_dimension = len(self.docsearch.schema["vector"].type.value_type)
if word_embedding_dimension != table_index_dimension:
raise ValueError(
f"Embedding dimension mismatch: embeddings.dimension ({word_embedding_dimension}) "
f"!= table index dimension ({table_index_dimension})"
)
def filter_documents(self, filter_condition: dict) -> List[dict]:
"""Filter documents based on certain conditions."""
self.ensure_table_exists()
# Ensure source_id exists in the filter condition
if 'source_id' not in filter_condition:
raise ValueError("filter_condition must contain 'source_id'")
source_id = filter_condition["source_id"]
# Use LanceDB's native filtering if supported, otherwise filter manually
filtered_data = self.docsearch.filter(lambda x: x.metadata and x.metadata.get("source_id") == source_id).to_list()
return filtered_data

View File

@@ -0,0 +1,38 @@
from typing import List, Optional
from uuid import uuid4
from application.core.settings import settings
from application.vectorstore.base import BaseVectorStore
class MilvusStore(BaseVectorStore):
def __init__(self, source_id: str = "", embeddings_key: str = "embeddings"):
super().__init__()
from langchain_milvus import Milvus
connection_args = {
"uri": settings.MILVUS_URI,
"token": settings.MILVUS_TOKEN,
}
self._docsearch = Milvus(
embedding_function=self._get_embeddings(settings.EMBEDDINGS_NAME, embeddings_key),
collection_name=settings.MILVUS_COLLECTION_NAME,
connection_args=connection_args,
)
self._source_id = source_id
def search(self, question, k=2, *args, **kwargs):
expr = f"source_id == '{self._source_id}'"
return self._docsearch.similarity_search(query=question, k=k, expr=expr, *args, **kwargs)
def add_texts(self, texts: List[str], metadatas: Optional[List[dict]], *args, **kwargs):
ids = [str(uuid4()) for _ in range(len(texts))]
return self._docsearch.add_texts(texts=texts, metadatas=metadatas, ids=ids, *args, **kwargs)
def save_local(self, *args, **kwargs):
pass
def delete_index(self, *args, **kwargs):
pass

View File

@@ -1,11 +1,12 @@
from application.vectorstore.base import BaseVectorStore
from application.core.settings import settings
from application.vectorstore.base import BaseVectorStore
from application.vectorstore.document_class import Document
class MongoDBVectorStore(BaseVectorStore):
def __init__(
self,
path: str = "",
source_id: str = "",
embeddings_key: str = "embeddings",
collection: str = "documents",
index_name: str = "vector_search_index",
@@ -18,7 +19,7 @@ class MongoDBVectorStore(BaseVectorStore):
self._embedding_key = embedding_key
self._embeddings_key = embeddings_key
self._mongo_uri = settings.MONGO_URI
self._path = path.replace("application/indexes/", "").rstrip("/")
self._source_id = source_id.replace("application/indexes/", "").rstrip("/")
self._embedding = self._get_embeddings(settings.EMBEDDINGS_NAME, embeddings_key)
try:
@@ -33,27 +34,24 @@ class MongoDBVectorStore(BaseVectorStore):
self._database = self._client[database]
self._collection = self._database[collection]
def search(self, question, k=2, *args, **kwargs):
query_vector = self._embedding.embed_query(question)
pipeline = [
{
"$vectorSearch": {
"queryVector": query_vector,
"queryVector": query_vector,
"path": self._embedding_key,
"limit": k,
"numCandidates": k * 10,
"limit": k,
"numCandidates": k * 10,
"index": self._index_name,
"filter": {
"store": {"$eq": self._path}
}
"filter": {"source_id": {"$eq": self._source_id}},
}
}
]
cursor = self._collection.aggregate(pipeline)
results = []
for doc in cursor:
text = doc[self._text_key]
@@ -63,30 +61,32 @@ class MongoDBVectorStore(BaseVectorStore):
metadata = doc
results.append(Document(text, metadata))
return results
def _insert_texts(self, texts, metadatas):
if not texts:
return []
embeddings = self._embedding.embed_documents(texts)
to_insert = [
{self._text_key: t, self._embedding_key: embedding, **m}
for t, m, embedding in zip(texts, metadatas, embeddings)
]
# insert the documents in MongoDB Atlas
insert_result = self._collection.insert_many(to_insert)
return insert_result.inserted_ids
def add_texts(self,
def add_texts(
self,
texts,
metadatas = None,
ids = None,
refresh_indices = True,
create_index_if_not_exists = True,
bulk_kwargs = None,
**kwargs,):
metadatas=None,
ids=None,
refresh_indices=True,
create_index_if_not_exists=True,
bulk_kwargs=None,
**kwargs,
):
#dims = self._embedding.client[1].word_embedding_dimension
# dims = self._embedding.client[1].word_embedding_dimension
# # check if index exists
# if create_index_if_not_exists:
# # check if index exists
@@ -121,6 +121,6 @@ class MongoDBVectorStore(BaseVectorStore):
if texts_batch:
result_ids.extend(self._insert_texts(texts_batch, metadatas_batch))
return result_ids
def delete_index(self, *args, **kwargs):
self._collection.delete_many({"store": self._path})
self._collection.delete_many({"source_id": self._source_id})

View File

@@ -5,12 +5,12 @@ from qdrant_client import models
class QdrantStore(BaseVectorStore):
def __init__(self, path: str = "", embeddings_key: str = "embeddings"):
def __init__(self, source_id: str = "", embeddings_key: str = "embeddings"):
self._filter = models.Filter(
must=[
models.FieldCondition(
key="metadata.store",
match=models.MatchValue(value=path.replace("application/indexes/", "").rstrip("/")),
key="metadata.source_id",
match=models.MatchValue(value=source_id.replace("application/indexes/", "").rstrip("/")),
)
]
)

View File

@@ -1,5 +1,6 @@
from application.vectorstore.faiss import FaissStore
from application.vectorstore.elasticsearch import ElasticsearchStore
from application.vectorstore.milvus import MilvusStore
from application.vectorstore.mongodb import MongoDBVectorStore
from application.vectorstore.qdrant import QdrantStore
@@ -10,6 +11,7 @@ class VectorCreator:
"elasticsearch": ElasticsearchStore,
"mongodb": MongoDBVectorStore,
"qdrant": QdrantStore,
"milvus": MilvusStore,
}
@classmethod

256
application/worker.py Normal file → Executable file
View File

@@ -1,37 +1,40 @@
import logging
import os
import shutil
import string
import zipfile
from collections import Counter
from urllib.parse import urljoin
import nltk
import requests
from bson.objectid import ObjectId
from application.core.mongo_db import MongoDB
from application.core.settings import settings
from application.parser.file.bulk import SimpleDirectoryReader
from application.parser.remote.remote_creator import RemoteCreator
from application.parser.open_ai_func import call_openai_api
from application.parser.remote.remote_creator import RemoteCreator
from application.parser.schema.base import Document
from application.parser.token_func import group_split
from application.utils import count_tokens_docs
try:
nltk.download("punkt", quiet=True)
nltk.download("averaged_perceptron_tagger", quiet=True)
except FileExistsError:
pass
mongo = MongoDB.get_client()
db = mongo["docsgpt"]
sources_collection = db["sources"]
# Constants
MIN_TOKENS = 150
MAX_TOKENS = 1250
RECURSION_DEPTH = 2
# Define a function to extract metadata from a given filename.
def metadata_from_filename(title):
store = "/".join(title.split("/")[1:3])
return {"title": title, "store": store}
return {"title": title}
# Define a function to generate a random string of a given length.
def generate_random_string(length):
return "".join([string.ascii_letters[i % 52] for i in range(length)])
current_dir = os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
)
@@ -47,12 +50,16 @@ def extract_zip_recursive(zip_path, extract_to, current_depth=0, max_depth=5):
max_depth (int): Maximum allowed depth of recursion to prevent infinite loops.
"""
if current_depth > max_depth:
print(f"Reached maximum recursion depth of {max_depth}")
logging.warning(f"Reached maximum recursion depth of {max_depth}")
return
with zipfile.ZipFile(zip_path, 'r') as zip_ref:
zip_ref.extractall(extract_to)
os.remove(zip_path) # Remove the zip file after extracting
try:
with zipfile.ZipFile(zip_path, "r") as zip_ref:
zip_ref.extractall(extract_to)
os.remove(zip_path) # Remove the zip file after extracting
except Exception as e:
logging.error(f"Error extracting zip file {zip_path}: {e}")
return
# Check for nested zip files and extract them
for root, dirs, files in os.walk(extract_to):
@@ -62,9 +69,43 @@ def extract_zip_recursive(zip_path, extract_to, current_depth=0, max_depth=5):
file_path = os.path.join(root, file)
extract_zip_recursive(file_path, root, current_depth + 1, max_depth)
def download_file(url, params, dest_path):
try:
response = requests.get(url, params=params)
response.raise_for_status()
with open(dest_path, "wb") as f:
f.write(response.content)
except requests.RequestException as e:
logging.error(f"Error downloading file: {e}")
raise
def upload_index(full_path, file_data):
try:
if settings.VECTOR_STORE == "faiss":
files = {
"file_faiss": open(full_path + "/index.faiss", "rb"),
"file_pkl": open(full_path + "/index.pkl", "rb"),
}
response = requests.post(
urljoin(settings.API_URL, "/api/upload_index"), files=files, data=file_data
)
else:
response = requests.post(
urljoin(settings.API_URL, "/api/upload_index"), data=file_data
)
response.raise_for_status()
except requests.RequestException as e:
logging.error(f"Error uploading index: {e}")
raise
finally:
if settings.VECTOR_STORE == "faiss":
for file in files.values():
file.close()
# Define the main function for ingesting and processing documents.
def ingest_worker(self, directory, formats, name_job, filename, user):
def ingest_worker(
self, directory, formats, name_job, filename, user, retriever="classic"
):
"""
Ingest and process documents.
@@ -75,46 +116,31 @@ def ingest_worker(self, directory, formats, name_job, filename, user):
name_job (str): Name of the job for this ingestion task.
filename (str): Name of the file to be ingested.
user (str): Identifier for the user initiating the ingestion.
retriever (str): Type of retriever to use for processing the documents.
Returns:
dict: Information about the completed ingestion task, including input parameters and a "limited" flag.
"""
# directory = 'inputs' or 'temp'
# formats = [".rst", ".md"]
input_files = None
recursive = True
limit = None
exclude = True
# name_job = 'job1'
# filename = 'install.rst'
# user = 'local'
sample = False
token_check = True
min_tokens = 150
max_tokens = 1250
recursion_depth = 2
full_path = os.path.join(directory, user, name_job)
import sys
print(full_path, file=sys.stderr)
# check if API_URL env variable is set
logging.info(f"Ingest file: {full_path}", extra={"user": user, "job": name_job})
file_data = {"name": name_job, "file": filename, "user": user}
response = requests.get(
urljoin(settings.API_URL, "/api/download"), params=file_data
)
# check if file is in the response
print(response, file=sys.stderr)
file = response.content
if not os.path.exists(full_path):
os.makedirs(full_path)
with open(os.path.join(full_path, filename), "wb") as f:
f.write(file)
download_file(urljoin(settings.API_URL, "/api/download"), file_data, os.path.join(full_path, filename))
# check if file is .zip and extract it
if filename.endswith(".zip"):
extract_zip_recursive(os.path.join(full_path, filename), full_path, 0, recursion_depth)
extract_zip_recursive(
os.path.join(full_path, filename), full_path, 0, RECURSION_DEPTH
)
self.update_state(state="PROGRESS", meta={"current": 1})
@@ -129,38 +155,29 @@ def ingest_worker(self, directory, formats, name_job, filename, user):
).load_data()
raw_docs = group_split(
documents=raw_docs,
min_tokens=min_tokens,
max_tokens=max_tokens,
min_tokens=MIN_TOKENS,
max_tokens=MAX_TOKENS,
token_check=token_check,
)
docs = [Document.to_langchain_format(raw_doc) for raw_doc in raw_docs]
id = ObjectId()
call_openai_api(docs, full_path, self)
call_openai_api(docs, full_path, id, self)
tokens = count_tokens_docs(docs)
self.update_state(state="PROGRESS", meta={"current": 100})
if sample:
for i in range(min(5, len(raw_docs))):
print(raw_docs[i].text)
logging.info(f"Sample document {i}: {raw_docs[i]}")
# get files from outputs/inputs/index.faiss and outputs/inputs/index.pkl
# and send them to the server (provide user and name in form)
file_data = {"name": name_job, "user": user}
if settings.VECTOR_STORE == "faiss":
files = {
"file_faiss": open(full_path + "/index.faiss", "rb"),
"file_pkl": open(full_path + "/index.pkl", "rb"),
}
response = requests.post(
urljoin(settings.API_URL, "/api/upload_index"), files=files, data=file_data
)
response = requests.get(
urljoin(settings.API_URL, "/api/delete_old?path=" + full_path)
)
else:
response = requests.post(
urljoin(settings.API_URL, "/api/upload_index"), data=file_data
)
file_data.update({
"tokens": tokens,
"retriever": retriever,
"id": str(id),
"type": "local",
})
upload_index(full_path, file_data)
# delete local
shutil.rmtree(full_path)
@@ -174,51 +191,114 @@ def ingest_worker(self, directory, formats, name_job, filename, user):
"limited": False,
}
def remote_worker(self, source_data, name_job, user, loader, directory="temp"):
# sample = False
def remote_worker(
self,
source_data,
name_job,
user,
loader,
directory="temp",
retriever="classic",
sync_frequency="never",
operation_mode="upload",
doc_id=None,
):
token_check = True
min_tokens = 150
max_tokens = 1250
full_path = directory + "/" + user + "/" + name_job
full_path = os.path.join(directory, user, name_job)
if not os.path.exists(full_path):
os.makedirs(full_path)
self.update_state(state="PROGRESS", meta={"current": 1})
logging.info(
f"Remote job: {full_path}",
extra={"user": user, "job": name_job, "source_data": source_data},
)
# source_data {"data": [url]} for url type task just urls
# Use RemoteCreator to load data from URL
remote_loader = RemoteCreator.create_loader(loader)
raw_docs = remote_loader.load_data(source_data)
docs = group_split(
documents=raw_docs,
min_tokens=min_tokens,
max_tokens=max_tokens,
min_tokens=MIN_TOKENS,
max_tokens=MAX_TOKENS,
token_check=token_check,
)
# docs = [Document.to_langchain_format(raw_doc) for raw_doc in raw_docs]
call_openai_api(docs, full_path, self)
tokens = count_tokens_docs(docs)
if operation_mode == "upload":
id = ObjectId()
call_openai_api(docs, full_path, id, self)
elif operation_mode == "sync":
if not doc_id or not ObjectId.is_valid(doc_id):
raise ValueError("doc_id must be provided for sync operation.")
id = ObjectId(doc_id)
call_openai_api(docs, full_path, id, self)
self.update_state(state="PROGRESS", meta={"current": 100})
# Proceed with uploading and cleaning as in the original function
file_data = {"name": name_job, "user": user}
if settings.VECTOR_STORE == "faiss":
files = {
"file_faiss": open(full_path + "/index.faiss", "rb"),
"file_pkl": open(full_path + "/index.pkl", "rb"),
}
requests.post(
urljoin(settings.API_URL, "/api/upload_index"), files=files, data=file_data
)
requests.get(urljoin(settings.API_URL, "/api/delete_old?path=" + full_path))
else:
requests.post(urljoin(settings.API_URL, "/api/upload_index"), data=file_data)
file_data = {
"name": name_job,
"user": user,
"tokens": tokens,
"retriever": retriever,
"id": str(id),
"type": loader,
"remote_data": source_data,
"sync_frequency": sync_frequency,
}
upload_index(full_path, file_data)
shutil.rmtree(full_path)
return {"urls": source_data, "name_job": name_job, "user": user, "limited": False}
def sync(
self,
source_data,
name_job,
user,
loader,
sync_frequency,
retriever,
doc_id=None,
directory="temp",
):
try:
remote_worker(
self,
source_data,
name_job,
user,
loader,
directory,
retriever,
sync_frequency,
"sync",
doc_id,
)
except Exception as e:
logging.error(f"Error during sync: {e}")
return {"status": "error", "error": str(e)}
return {"status": "success"}
def sync_worker(self, frequency):
sync_counts = Counter()
sources = sources_collection.find()
for doc in sources:
if doc.get("sync_frequency") == frequency:
name = doc.get("name")
user = doc.get("user")
source_type = doc.get("type")
source_data = doc.get("remote_data")
retriever = doc.get("retriever")
doc_id = str(doc.get("_id"))
resp = sync(
self, source_data, name, user, source_type, frequency, retriever, doc_id
)
sync_counts["total_sync_count"] += 1
sync_counts[
"sync_success" if resp["status"] == "success" else "sync_failure"
] += 1
return {
key: sync_counts[key]
for key in ["total_sync_count", "sync_success", "sync_failure"]
}

View File

@@ -1,5 +1,3 @@
version: "3.9"
services:
frontend:
build: ./frontend

View File

@@ -1,5 +1,3 @@
version: "3.9"
services:
redis:

View File

@@ -1,8 +1,8 @@
version: "3.9"
services:
frontend:
build: ./frontend
volumes:
- ./frontend/src:/app/src
environment:
- VITE_API_HOST=http://localhost:7091
- VITE_API_STREAMING=$VITE_API_STREAMING

View File

@@ -1,5 +1,3 @@
version: "3.9"
services:
frontend:
build: ./frontend

View File

@@ -1,8 +1,8 @@
version: "3.9"
services:
frontend:
build: ./frontend
volumes:
- ./frontend/src:/app/src
environment:
- VITE_API_HOST=http://localhost:7091
- VITE_API_STREAMING=$VITE_API_STREAMING
@@ -20,6 +20,7 @@ services:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/1
- MONGO_URI=mongodb://mongo:27017/docsgpt
- CACHE_REDIS_URL=redis://redis:6379/2
ports:
- "7091:7091"
volumes:
@@ -32,7 +33,7 @@ services:
worker:
build: ./application
command: celery -A application.app.celery worker -l INFO
command: celery -A application.app.celery worker -l INFO -B
environment:
- API_KEY=$API_KEY
- EMBEDDINGS_KEY=$API_KEY
@@ -41,6 +42,7 @@ services:
- CELERY_RESULT_BACKEND=redis://redis:6379/1
- MONGO_URI=mongodb://mongo:27017/docsgpt
- API_URL=http://backend:7091
- CACHE_REDIS_URL=redis://redis:6379/2
depends_on:
- redis
- mongo

View File

@@ -46,6 +46,6 @@ yarn install
yarn dev
```
- Now, you should be able to view the docs on your local environment by visiting `http://localhost:5000`. You can explore the different markdown files and make changes as you see fit.
- Now, you should be able to view the docs on your local environment by visiting `http://localhost:3000`. You can explore the different markdown files and make changes as you see fit.
- **Footnotes:** This guide assumes you have Node.js and npm installed. The guide involves running a local server using yarn, and viewing the documentation offline. If you encounter any issues, it may be worth verifying your Node.js and npm installations and whether you have installed yarn correctly.

2219
docs/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -7,8 +7,8 @@
"license": "MIT",
"dependencies": {
"@vercel/analytics": "^1.1.1",
"docsgpt": "^0.3.7",
"next": "^14.0.4",
"docsgpt": "^0.4.7",
"next": "^14.2.12",
"nextra": "^2.13.2",
"nextra-theme-docs": "^2.13.2",
"react": "^18.2.0",

10
docs/pages/API/_meta.json Normal file
View File

@@ -0,0 +1,10 @@
{
"API-docs": {
"title": "🗂️️ API-docs",
"href": "/API/API-docs"
},
"api-key-guide": {
"title": "🔐 API Keys guide",
"href": "/API/api-key-guide"
}
}

View File

@@ -14,7 +14,7 @@ Before creating your first API key, you must upload the document that will be li
After uploading your document, you can obtain an API key either through the graphical user interface or via an API call:
- **Graphical User Interface:** Navigate to the Settings section of the DocsGPT web app, find the API Keys option, and press 'Create New' to generate your key.
- **API Call:** Alternatively, you can use the `/api/create_api_key` endpoint to create a new API key. For detailed instructions, visit [DocsGPT API Documentation](https://docs.docsgpt.co.uk/Developing/API-docs#8-apicreate_api_key).
- **API Call:** Alternatively, you can use the `/api/create_api_key` endpoint to create a new API key. For detailed instructions, visit [DocsGPT API Documentation](https://docs.docsgpt.cloud/API/API-docs#8-apicreate_api_key).
### Understanding Key Variables
@@ -27,4 +27,4 @@ Upon creating your API key, you will encounter several key variables. Each serve
With your API key ready, you can now integrate DocsGPT into your application, such as the DocsGPT Widget or any other software, via `/api/answer` or `/stream` endpoints. The source document is preset with the API key, allowing you to bypass fields like `selectDocs` and `active_docs` during implementation.
Congratulations on taking the first step towards enhancing your applications with DocsGPT! With this guide, you're now equipped to navigate the process of obtaining and understanding DocsGPT API keys.
Congratulations on taking the first step towards enhancing your applications with DocsGPT! With this guide, you're now equipped to navigate the process of obtaining and understanding DocsGPT API keys.

View File

@@ -0,0 +1,100 @@
# Self-hosting DocsGPT on Kubernetes
This guide will walk you through deploying DocsGPT on Kubernetes.
## Prerequisites
Ensure you have the following installed before proceeding:
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
- Access to a Kubernetes cluster
## Folder Structure
The `k8s` folder contains the necessary deployment and service configuration files:
- `deployments/`
- `services/`
- `docsgpt-secrets.yaml`
## Deployment Instructions
1. **Clone the Repository**
```sh
git clone https://github.com/arc53/DocsGPT.git
cd docsgpt/k8s
```
2. **Configure Secrets (optional)**
Ensure that you have all the necessary secrets in `docsgpt-secrets.yaml`. Update it with your secrets before applying if you want. By default we will use qdrant as a vectorstore and public docsgpt llm as llm for inference.
3. **Apply Kubernetes Deployments**
Deploy your DocsGPT resources using the following commands:
```sh
kubectl apply -f deployments/
```
4. **Apply Kubernetes Services**
Set up your services using the following commands:
```sh
kubectl apply -f services/
```
5. **Apply Secrets**
Apply the secret configurations:
```sh
kubectl apply -f docsgpt-secrets.yaml
```
6. **Substitute API URL**
After deploying the services, you need to update the environment variable `VITE_API_HOST` in your deployment file `deployments/docsgpt-deploy.yaml` with the actual endpoint URL created by your `docsgpt-api-service`.
```sh
kubectl get services/docsgpt-api-service -o jsonpath='{.status.loadBalancer.ingress[0].ip}' | xargs -I {} sed -i "s|<your-api-endpoint>|{}|g" deployments/docsgpt-deploy.yaml
```
7. **Rerun Deployment**
After making the changes, reapply the deployment configuration to update the environment variables:
```sh
kubectl apply -f deployments/
```
## Verifying the Deployment
To verify if everything is set up correctly, you can run the following:
```sh
kubectl get pods
kubectl get services
```
Ensure that the pods are running and the services are available.
## Accessing DocsGPT
To access DocsGPT, you need to find the external IP address of the frontend service. You can do this by running:
```sh
kubectl get services/docsgpt-frontend-service | awk 'NR>1 {print "http://" $4}'
```
## Troubleshooting
If you encounter any issues, you can check the logs of the pods for more details:
```sh
kubectl logs <pod-name>
```
Replace `<pod-name>` with the actual name of your DocsGPT pod.

View File

@@ -67,62 +67,3 @@ To run the setup on Windows, you have two options: using the Windows Subsystem f
These steps should help you set up and run the project on Windows using either WSL or Git Bash/Command Prompt.
**Important:** Ensure that Docker is installed and properly configured on your Windows system for these steps to work.
For WINDOWS:
To run the given setup on Windows, you can use the Windows Subsystem for Linux (WSL) or a Git Bash terminal to execute similar commands. Here are the steps adapted for Windows:
Option 1: Using Windows Subsystem for Linux (WSL):
1. Install WSL if you haven't already. You can follow the official Microsoft documentation for installation: (https://learn.microsoft.com/en-us/windows/wsl/install).
2. After setting up WSL, open the WSL terminal.
3. Clone the repository and create the `.env` file:
```bash
git clone https://github.com/arc53/DocsGPT.git
cd DocsGPT
echo "API_KEY=Yourkey" > .env
echo "VITE_API_STREAMING=true" >> .env
```
4. Run the following command to start the setup with Docker Compose:
```bash
./run-with-docker-compose.sh
```
5. Open your web browser and navigate to http://localhost:5173/.
6. To stop the setup, just press **Ctrl + C** in the WSL terminal.
Option 2: Using Git Bash or Command Prompt (CMD):
1. Install Git for Windows if you haven't already. You can download it from the official website: (https://gitforwindows.org/).
2. Open Git Bash or Command Prompt.
3. Clone the repository and create the `.env` file:
```bash
git clone https://github.com/arc53/DocsGPT.git
cd DocsGPT
echo "API_KEY=Yourkey" > .env
echo "VITE_API_STREAMING=true" >> .env
```
4. Run the following command to start the setup with Docker Compose:
```bash
./run-with-docker-compose.sh
```
5. Open your web browser and navigate to http://localhost:5173/.
6. To stop the setup, just press **Ctrl + C** in the Git Bash or Command Prompt terminal.
These steps should help you set up and run the project on Windows using either WSL or Git Bash/Command Prompt. Make sure you have Docker installed and properly configured on your Windows system for this to work.
### Chrome Extension
#### Installing the Chrome extension:
To enhance your DocsGPT experience, you can install the DocsGPT Chrome extension. Here's how:
1. In the DocsGPT GitHub repository, click on the **Code** button and select **Download ZIP**.
2. Unzip the downloaded file to a location you can easily access.
3. Open the Google Chrome browser and click on the three dots menu (upper right corner).
4. Select **More Tools** and then **Extensions**.
5. Turn on the **Developer mode** switch in the top right corner of the **Extensions page**.
6. Click on the **Load unpacked** button.
7. Select the **Chrome** folder where the DocsGPT files have been unzipped (docsgpt-main > extensions > chrome).
8. The extension should now be added to Google Chrome and can be managed on the Extensions page.
9. To disable or remove the extension, simply turn off the toggle switch on the extension card or click the **Remove** button.

View File

@@ -10,5 +10,9 @@
"Railway-Deploying": {
"title": "🚂Deploying on Railway",
"href": "/Deploying/Railway-Deploying"
},
"Kubernetes-Deploying": {
"title": "☸Deploying on Kubernetes",
"href": "/Deploying/Kubernetes-Deploying"
}
}
}

View File

@@ -1,6 +0,0 @@
{
"API-docs": {
"title": "🗂️️ API-docs",
"href": "/Developing/API-docs"
}
}

View File

@@ -0,0 +1,34 @@
import {Steps} from 'nextra/components'
import { Callout } from 'nextra/components'
## Chrome Extension Setup Guide
To enhance your DocsGPT experience, you can install the DocsGPT Chrome extension. Here's how:
<Steps >
### Step 1
In the DocsGPT GitHub repository, click on the **Code** button and select **Download ZIP**.
### Step 2
Unzip the downloaded file to a location you can easily access.
### Step 3
Open the Google Chrome browser and click on the three dots menu (upper right corner).
### Step 4
Select **More Tools** and then **Extensions**.
### Step 5
Turn on the **Developer mode** switch in the top right corner of the **Extensions page**.
### Step 6
Click on the **Load unpacked** button.
### Step 7
7. Select the **Chrome** folder where the DocsGPT files have been unzipped (docsgpt-main > extensions > chrome).
### Step 8
The extension should now be added to Google Chrome and can be managed on the Extensions page.
### Step 9
To disable or remove the extension, simply turn off the toggle switch on the extension card or click the **Remove** button.
</Steps>

View File

@@ -7,8 +7,8 @@
"title": "🏗️ Widget setup",
"href": "/Extensions/react-widget"
},
"api-key-guide": {
"title": "🔐 API Keys guide",
"href": "/Extensions/api-key-guide"
"Chrome-extension": {
"title": "🌐 Chrome Extension",
"href": "/Extensions/Chrome-extension"
}
}

View File

@@ -17,25 +17,31 @@ Now, you can use the widget in your component like this :
```jsx
<DocsGPTWidget
apiHost="https://your-docsgpt-api.com"
selectDocs="local/docs.zip"
apiKey=""
avatar = "https://d3dg1063dc54p9.cloudfront.net/cute-docsgpt.png",
title = "Get AI assistance",
description = "DocsGPT's AI Chatbot is here to help",
heroTitle = "Welcome to DocsGPT !",
avatar = "https://d3dg1063dc54p9.cloudfront.net/cute-docsgpt.png"
title = "Get AI assistance"
description = "DocsGPT's AI Chatbot is here to help"
heroTitle = "Welcome to DocsGPT !"
heroDescription="This chatbot is built with DocsGPT and utilises GenAI,
please review important information using sources."
theme = "dark"
buttonIcon = "https://your-icon"
buttonBg = "#222327"
/>
```
DocsGPTWidget takes 8 **props** with default fallback values:
To tailor the widget to your needs, you can configure the following props in your component:
1. `apiHost` — The URL of your DocsGPT API.
2. `selectDocs` — The documentation source that you want to use for your widget (e.g. `default` or `local/docs1.zip`).
2. `theme` — Allows to select your specific theme (dark or light).
3. `apiKey` — Usually, it's empty.
4. `avatar`: Specifies the URL of the avatar or image representing the chatbot.
5. `title`: Sets the title text displayed in the chatbot interface.
6. `description`: Provides a brief description of the chatbot's purpose or functionality.
7. `heroTitle`: Displays a welcome title when users interact with the chatbot.
8. `heroDescription`: Provide additional introductory text or information about the chatbot's capabilities.
9. `buttonIcon`: Specifies the url of the icon image for the widget.
10. `buttonBg`: Allows to specify the Background color of the widget.
11. `size`: Sets the size of the widget ( small, medium).
### How to use DocsGPTWidget with [Nextra](https://nextra.site/) (Next.js + MDX)
Install your widget as described above and then go to your `pages/` folder and create a new file `_app.js` with the following content:
@@ -51,6 +57,69 @@ export default function MyApp({ Component, pageProps }) {
)
}
```
### How to use DocsGPTWidget with HTML
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>HTML + CSS</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<h1>This is a simple HTML + CSS template!</h1>
<div id="app"></div>
<!-- Include the widget script from dist/modern or dist/legacy -->
<script
src="https://unpkg.com/docsgpt/dist/modern/main.js"
type="module"
></script>
<script type="module">
window.onload = function () {
renderDocsGPTWidget("app", {
apiKey: "",
size: "medium",
});
};
</script>
</body>
</html>
```
To link the widget to your api and your documents you can pass parameters to the renderDocsGPTWidget('div id', { parameters }).
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>DocsGPT Widget</title>
<script src="https://unpkg.com/docsgpt/dist/modern/main.js" type="module"></script>
</head>
<body>
<div id="app"></div>
<!-- Include the widget script from dist/modern or dist/legacy -->
<script type="module">
window.onload = function() {
renderDocsGPTWidget('app', {
apiHost: 'http://localhost:7001',
apiKey:"",
avatar: 'https://d3dg1063dc54p9.cloudfront.net/cute-docsgpt.png',
title: 'Get AI assistance',
description: "DocsGPT's AI Chatbot is here to help",
heroTitle: 'Welcome to DocsGPT!',
heroDescription: 'This chatbot is built with DocsGPT and utilises GenAI, please review important information using sources.',
theme:"dark",
buttonIcon:"https://your-icon",
buttonBg:"#222327"
});
}
</script>
</body>
</html>
```
For more information about React, refer to this [link here](https://react.dev/learn)

View File

@@ -1,10 +1,25 @@
import Image from 'next/image'
# Customizing the Main Prompt
Customizing the main prompt for DocsGPT gives you the ability to tailor the AI's responses to your specific requirements. By modifying the prompt text, you can achieve more accurate and relevant answers. Here's how you can do it:
1. Navigate to `/application/prompts/combine_prompt.txt`.
1. Navigate to `SideBar -> Settings`.
2.In Settings select the `Active Prompt` now you will be able to see various prompts style.x
3.Click on the `edit icon` on the prompt of your choice and you will be able to see the current prompt for it,you can now customise the prompt as per your choice.
### Video Demo
<Image src="/prompts.gif" alt="prompts" width={800} height={500} />
2. Open the `combine_prompt.txt` file and modify the prompt text to suit your needs. You can experiment with different phrasings and structures to observe how the model responds. The main prompt serves as guidance to the AI model on how to generate responses.
## Example Prompt Modification

View File

@@ -1,63 +0,0 @@
## How to train on other documentation
This AI can utilize any documentation, but it requires preparation for similarity search. Follow these steps to get your documentation ready:
**Step 1: Prepare Your Documentation**
![video-example-of-how-to-do-it](https://d3dg1063dc54p9.cloudfront.net/videos/how-to-vectorise.gif)
Start by going to `/scripts/` folder.
If you open this file, you will see that it uses RST files from the folder to create a `index.faiss` and `index.pkl`.
It currently uses OPENAI to create the vector store, so make sure your documentation is not too large. Using Pandas cost me around $3-$4.
You can typically find documentation on GitHub in the `docs/` folder for most open-source projects.
### 1. Find documentation in .rst/.md format and create a folder with it in your scripts directory.
- Name it `inputs/`.
- Put all your .rst/.md files in there.
- The search is recursive, so you don't need to flatten them.
If there are no .rst/.md files, convert whatever you find to a .txt file and feed it. (Don't forget to change the extension in the script).
### Step 2: Configure Your OpenAI API Key
1. Create a .env file in the scripts/ folder.
- Add your OpenAI API key inside: OPENAI_API_KEY=<your-api-key>.
### Step 3: Run the Ingestion Script
`python ingest.py ingest`
It will provide you with the estimated cost.
### Step 4: Move `index.faiss` and `index.pkl` generated in `scripts/output` to `application/` folder.
### Step 5: Run the Web App
Once you run it, it will use new context relevant to your documentation.Make sure you select default in the dropdown in the UI.
## Customization
You can learn more about options while running ingest.py by running:
- Make sure you select 'default' from the dropdown in the UI.
## Customization
You can learn more about options while running ingest.py by executing:
`python ingest.py --help`
| Options | |
|:--------------------------------:|:------------------------------------------------------------------------------------------------------------------------------:|
| **ingest** | Runs 'ingest' function, converting documentation to Faiss plus Index format |
| --dir TEXT | List of paths to directory for index creation. E.g. --dir inputs --dir inputs2 [default: inputs] |
| --file TEXT | File paths to use (Optional; overrides directory) E.g. --files inputs/1.md --files inputs/2.md |
| --recursive / --no-recursive | Whether to recursively search in subdirectories [default: recursive] |
| --limit INTEGER | Maximum number of files to read |
| --formats TEXT | List of required extensions (list with .) Currently supported: .rst, .md, .pdf, .docx, .csv, .epub, .html [default: .rst, .md] |
| --exclude / --no-exclude | Whether to exclude hidden files (dotfiles) [default: exclude] |
| -y, --yes | Whether to skip price confirmation |
| --sample / --no-sample | Whether to output sample of the first 5 split documents. [default: no-sample] |
| --token-check / --no-token-check | Whether to group small documents and split large. Improves semantics. [default: token-check] |
| --min_tokens INTEGER | Minimum number of tokens to not group. [default: 150] |
| --max_tokens INTEGER | Maximum number of tokens to not split. [default: 2000] |
| | |
| **convert** | Creates documentation in .md format from source code |
| --dir TEXT | Path to a directory with source code. E.g. --dir inputs [default: inputs] |
| --formats TEXT | Source code language from which to create documentation. Supports py, js and java. E.g. --formats py [default: py] |

View File

@@ -0,0 +1,44 @@
import { Callout } from 'nextra/components'
import Image from 'next/image'
import { Steps } from 'nextra/components'
## How to train on other documentation
Training on other documentation sources can greatly enhance the versatility and depth of DocsGPT's knowledge. By incorporating diverse materials, you can broaden the AI's understanding and improve its ability to generate insightful responses across a range of topics. Here's a step-by-step guide on how to effectively train DocsGPT on additional documentation sources:
**Get your document ready**:
Make sure you have the document on which you want to train on ready with you on the device which you are using .You can also use links to the documentation to train on.
<Callout type="warning" emoji="⚠️">
Note: The document should be either of the given file formats .pdf, .txt, .rst, .docx, .md, .zip and limited to 25mb.You can also train using the link of the documentation.
</Callout>
### Video Demo
<Image src="/docs.gif" alt="prompts" width={800} height={500} />
<Steps>
### Step1
Navigate to the sidebar where you will find `Source Docs` option,here you will find 3 options built in which are default,Web Search and None.
### Step 2
Click on the `Upload icon` just beside the source docs options,now browse and upload the document which you want to train on or select the `remote` option if you have to insert the link of the documentation.
### Step 3
Now you will be able to see the name of the file uploaded under the Uploaded Files ,now click on `Train`,once you click on train it might take some time to train on the document. You will be able to see the `Training progress` and once the training is completed you can click the `finish` button and there you go your document is uploaded.
### Step 4
Go to `New chat` and from the side bar select the document you uploaded under the `Source Docs` and go ahead with your chat, now you can ask questions regarding the document you uploaded and you will get the effective answer based on it.
</Steps>

View File

@@ -1,48 +0,0 @@
# Setting Up Local Language Models for Your App
Your app relies on two essential models: Embeddings and Text Generation. While OpenAI's default models work seamlessly, you have the flexibility to switch providers or even run the models locally.
## Step 1: Configure Environment Variables
Navigate to the `.env` file or set the following environment variables:
```env
LLM_NAME=<your Text Generation model>
API_KEY=<API key for Text Generation>
EMBEDDINGS_NAME=<LLM for Embeddings>
EMBEDDINGS_KEY=<API key for Embeddings>
VITE_API_STREAMING=<true or false>
```
You can omit the keys if users provide their own. Ensure you set `LLM_NAME` and `EMBEDDINGS_NAME`.
## Step 2: Choose Your Models
**Options for `LLM_NAME`:**
- openai ([More details](https://platform.openai.com/docs/models))
- anthropic ([More details](https://docs.anthropic.com/claude/reference/selecting-a-model))
- manifest ([More details](https://python.langchain.com/docs/integrations/llms/manifest))
- cohere ([More details](https://docs.cohere.com/docs/llmu))
- llama.cpp ([More details](https://python.langchain.com/docs/integrations/llms/llamacpp))
- huggingface (Arc53/DocsGPT-7B by default)
- sagemaker ([Mode details](https://aws.amazon.com/sagemaker/))
Note: for huggingface you can choose any model inside application/llm/huggingface.py or pass llm_name on init, loads
**Options for `EMBEDDINGS_NAME`:**
- openai_text-embedding-ada-002
- huggingface_sentence-transformers/all-mpnet-base-v2
- huggingface_hkunlp/instructor-large
- cohere_medium
If you want to be completely local, set `EMBEDDINGS_NAME` to `huggingface_sentence-transformers/all-mpnet-base-v2`.
For llama.cpp Download the required model and place it in the `models/` folder.
Alternatively, for local Llama setup, run `setup.sh` and choose option 1. The script handles the DocsGPT model addition.
## Step 3: Local Hosting for Privacy
If working with sensitive data, host everything locally by setting `LLM_NAME`, llama.cpp or huggingface, use any model available on Hugging Face, for llama.cpp you need to convert it into gguf format.
That's it! Your app is now configured for local and private hosting, ensuring optimal security for critical data.

View File

@@ -0,0 +1,49 @@
import { Callout } from 'nextra/components'
import Image from 'next/image'
import { Steps } from 'nextra/components'
# Setting Up Local Language Models for Your App
Setting up local language models for your app can significantly enhance its capabilities, enabling it to understand and generate text in multiple languages without relying on external APIs. By integrating local language models, you can improve privacy, reduce latency, and ensure continuous functionality even in offline environments. Here's a comprehensive guide on how to set up local language models for your application:
## Steps:
### For cloud version LLM change:
<Steps >
### Step 1
Visit the chat screen and you will be to see the default LLM selected.
### Step 2
Click on it and you will get a drop down of various LLM's available to choose.
### Step 3
Choose the LLM of your choice.
</Steps>
### Video Demo
<Image src="/llms.gif" alt="prompts" width={800} height={500} />
### For Open source llm change:
<Steps >
### Step 1
For open source you have to edit .env file with LLM_NAME with their desired LLM name.
### Step 2
All the supported LLM providers are here application/llm and you can check what env variable are needed for each
List of latest supported LLMs are https://github.com/arc53/DocsGPT/blob/main/application/llm/llm_creator.py
### Step 3
Visit application/llm and select the file of your selected llm and there you will find the specific requirements needed to be filled in order to use it,i.e API key of that llm.
</Steps>
### For OpenAI-Compatible Endpoints:
DocsGPT supports the use of OpenAI-compatible endpoints through base URL substitution. This feature allows you to use alternative AI models or services that implement the OpenAI API interface.
Set the OPENAI_BASE_URL in your environment. You can change .env file with OPENAI_BASE_URL with the desired base URL or docker-compose.yml file and add the environment variable to the backend container.
> Make sure you have the right API_KEY and correct LLM_NAME.

Some files were not shown because too many files have changed in this diff Show More