Commit Graph

295 Commits

Author SHA1 Message Date
Duc Nguyen (john)
fbe983ccb3
Add relevant chat context when query the index (#42)
* Add context for query

* Add older messages in the chat

* Update the indexing

* Make some hard-code values configurable

* Remove hard-code values
2024-04-22 14:32:30 +07:00
Duc Nguyen (john)
749c9e5641
Remove redundant attributes in the file index (#41) 2024-04-20 18:21:32 +07:00
Duc Nguyen (john)
c6045bcb9f
Update the Citation pipeline according to new OpenAI function call interface (#40) 2024-04-20 01:12:23 +07:00
Duc Nguyen (john)
1b2082a140
Allow file selector to be disabled (#36)
* Allow file selector to be disabled

* Update docs and variable names
2024-04-16 18:43:56 +07:00
ian_Cin
e19893a509
fix typo (#35) 2024-04-15 23:16:32 +07:00
ian_Cin
1130aa78d1
add demo gif (#34) 2024-04-15 22:57:02 +07:00
ian_Cin
5286ff48bc
Fix info panel overflow (#33)
* update chatbot placeholder

* fix chat info panel overflow bug

* set azure_endpoint to required in AzureChatOpenAI

* update screenshots
2024-04-14 09:34:14 +07:00
ian_Cin
8985963e1e
Setup app data dir (#32)
* setup local data dir

* update readme

* update chat panel

* update help page
2024-04-13 23:26:06 +07:00
Duc Nguyen (john)
0417610d3e
Refactor reasoning pipeline (#31)
* Move the text rendering out for reusability

* Refactor common operations in the reasoning pipeline

* Add run method

* Provide dedicated method for invoke
2024-04-13 23:13:04 +07:00
ian_Cin
af38708b77
Setup root toml file and stop gradio auto reloading (#30)
* stop gradio auto reload

* setup root toml file
2024-04-13 18:59:24 +07:00
ian_Cin
4022af7e9b
allow LlamaCppChat to auto download model from hf hub (#29) 2024-04-13 18:57:04 +07:00
Duc Nguyen (john)
917fb0a082
Treat index id as auto-generated field (#27)
* Treat index id as auto-generated field

* fix Can't create index: KeyError: 'embedding' #28

* udpate docs

* Update requirement

* Use lighter default local embedding model

---------

Co-authored-by: ian <ian@cinnamon.is>
2024-04-13 18:29:37 +07:00
Duc Nguyen (john)
66905d39c4
Allow adding, updating and deleting indices (#24)
* Allow adding indices

* Allow deleting indices

* Allow updating the indices

* When there are multiple indices, group them below Indices tab

* Update elem classes
2024-04-12 15:41:09 +07:00
ian_Cin
4efe9c02a8
Update documentations (#23) 2024-04-11 19:41:45 +07:00
Duc Nguyen (john)
5ce6bac03d
Allow listing indices (#22) 2024-04-11 16:28:04 +07:00
Duc Nguyen (john)
3ed50b0f10
Improve LLMs and Embedding models resources experience (#21)
* Fix inconsistent default values
* Disallow LLM's empty name. Handle LLM creation error on UI
2024-04-11 07:50:53 +07:00
Duc Nguyen (john)
f3e82b2e70
Put the preparation step in FileIndex to on_start (#20) 2024-04-10 19:30:45 +07:00
ian_Cin
b507eef541
Improve manuals (#19)
* Rename Admin -> Resources
* Improve ui
* Update docs
2024-04-10 17:04:04 +07:00
Duc Nguyen (john)
7b3307e3c4
Provide embedding manager (#16)
* Provide the Embedding management UI

* Update Fastembed documentation

* Add validation when adding / updating embeddings

* Stop using the old ktem embeddings manager

* Set default local embedding models

* Move the local embeddings below in flowsettings

* Update flowsettings
2024-04-10 15:11:44 +07:00
Duc Nguyen (john)
ed10020ea3
Refactor embeddings and provide vanilla OpenAI-based embeddings (#11)
* Prepend all Langchain-based embeddings with LC

* Provide vanilla OpenAI embeddings

* Add test for AzureOpenAIEmbeddings and OpenAIEmbeddings

* Fix disallowed empty string

* Use OpenAIEmbeddings in flowsettings

---------

Co-authored-by: ian_Cin <ian@cinnamon.is>
2024-04-09 15:07:59 +07:00
Duc Nguyen (john)
e75354d410
Enable fastembed as a local embedding vendor (#12)
* Prepend all Langchain-based embeddings with LC

* Provide vanilla OpenAI embeddings

* Add test for AzureOpenAIEmbeddings and OpenAIEmbeddings

* Incorporate fastembed

---------

Co-authored-by: ian_Cin <ian@cinnamon.is>
2024-04-09 01:44:34 +07:00
ian_Cin
8001c86b16
Feat/new UI (#13)
* new custom theme

* improve css: scrollbar, header, tabs and buttons

* update settings tab

* open file index selector by default

* update chat control panel

* update chat panel

* update file index page

* cap gradio<=4.22.0

* rename admin page

* adjust UI

* update flowsettings

* auto start in browser

* change colour for edit LLM page's button
2024-04-08 22:23:00 +07:00
Duc Nguyen (john)
a203fc0f7c
Allow users to add LLM within the UI (#6)
* Rename AzureChatOpenAI to LCAzureChatOpenAI
* Provide vanilla ChatOpenAI and AzureChatOpenAI
* Remove the highest accuracy, lowest cost criteria

These criteria are unnecessary. The users, not pipeline creators, should choose
which LLM to use. Furthermore, it's cumbersome to input this information,
really degrades user experience.

* Remove the LLM selection in simple reasoning pipeline
* Provide a dedicated stream method to generate the output
* Return placeholder message to chat if the text is empty
2024-04-06 11:53:17 +07:00
Duc Nguyen (john)
e187e23dd1
Improve UX (#9)
* Go to chat tab when resignin
* Allow placeholder message configurable
* Hide setting tabs if there aren't any settings
2024-04-04 15:39:24 +07:00
ian_Cin
ecf09b275f
Fix UI bugs (#8)
* Auto create conversation when the user starts

* Add conversation rename rule check

* Fix empty name during save

* Confirm deleting conversation

* Show warning if users don't select file when upload files in the File Index

* Feedback when user uploads duplicated file

* Limit the file types

* Fix valid username

* Allow login when username with leading and trailing whitespaces

* Improve the user

* Disable admin panel for non-admnin user

* Refresh user lists after creating/deleting users

* Auto logging in

* Clear admin information upon signing out

* Fix unable to receive uploaded filename that include special characters, like !@#$%^&*().pdf

* Set upload validation for FileIndex

* Improve user management UI/UIX

* Show extraction error when indexing file

* Return selected user -1 when signing out

* Fix default supported file types in file index

* Validate changing password

* Allow the selector to contain mulitple gradio components

* A more tolerable placeholder screen

* Allow chat suggestion box

* Increase concurrency limit

* Make adobe loader optional

* Use BaseReasoning

---------

Co-authored-by: trducng <trungduc1992@gmail.com>
2024-04-03 16:33:54 +07:00
ian_Cin
43a18ba070
Feat/regenerate answer (#7)
* Add regen button and repharasing question on regen

* Stop appending regen messages to history, allow only one

* Add dynamic conversation state

* Allow reasoning pipeline to manipulate state

---------

Co-authored-by: albert <albert@cinnamon.is>
Co-authored-by: Duc Nguyen (john) <trungduc1992@gmail.com>
2024-04-03 15:37:55 +07:00
ian_Cin
e67a25c0bd
Feat/add multimodal loader (#5)
* Add Adobe reader as the multimodal loader

* Allow FullQAPipeline to reasoning on figures

* fix: move the adobe import to avoid ImportError, notify users whenever they run the AdobeReader

---------

Co-authored-by: cin-albert <albert@cinnamon.is>
2024-04-03 14:52:40 +07:00
ian_Cin
a3bf728400
Update various docs (#4)
* rename cli tool

* remove redundant docs

* update docs

* update macos instructions

* add badges
2024-03-29 19:47:03 +07:00
ian_Cin
556c48b259
Create LICENSE.txt 2024-03-29 16:39:56 +07:00
ian_Cin
e8d3c70276
improve llms selection of simple reasoning pipeline and fix non persistent settings bug
- improve llms selection of simple reasoning pipeline
- enable llms selection for reranking
- fix non-persistent settings bug
2024-03-28 16:39:09 +07:00
ian
14482e9755 bug fix: settings are not persistent 2024-03-28 16:36:05 +07:00
ian
f9cc40ca25 improve llm selection for simple reasoning pipeline 2024-03-28 16:35:13 +07:00
ian_Cin
b2089245f2
Merge pull request #1 from Cinnamon/misc/config-model-from-file
Misc/config model from file
2024-03-28 16:29:26 +07:00
ian
e3498a4958 rename ktem test dir 2024-03-28 16:27:05 +07:00
ian
b6ac35029f remove git secret 2024-03-28 16:04:12 +07:00
ian
c1b1371a68 enable config through .env 2024-03-27 19:04:48 +07:00
ian
c6db7f5d01 pin llama-cpp-python to 0.2.55 due to https://github.com/abetlen/llama-cpp-python/issues/1288 2024-03-27 18:58:19 +07:00
ian
da86fa463f rename test dir 2024-03-27 18:56:06 +07:00
ian_Cin
d22ae88c7a make default installation faster (#2)
* remove cohere as default

* refractor dependencies

* use llama-index pdf reader as default (pypdf)

* fix some lazy docstring

* update install scripts

* minor fix
2024-03-21 22:48:20 +07:00
ian_Cin
a8f92b3f9e post migrate cleanup 2024-03-18 23:10:20 +07:00
ian_Cin
df12dec732 Feat/local endpoint llm (#148)
* serve local model in a different process from the app
---------

Co-authored-by: albert <albert@cinnamon.is>
Co-authored-by: trducng <trungduc1992@gmail.com>
2024-03-15 16:17:33 +07:00
Duc Nguyen (john)
2950e6ed02 Improve behavior of simple reasoning (#157)
* Add base reasoning implementation

* Provide explicit async and streaming capability

* Allow refreshing the information panel
2024-03-12 13:03:38 +07:00
Duc Nguyen (john)
cb01d27d19 Fix integrating indexing and retrieval pipelines to FileIndex (#155)
* Add docs for settings
* Add mdx_truly_sane_lists to doc requirements
2024-03-10 16:41:42 +07:00
trducng
2b3571e892 Fix subscribing sign-in/out 2024-03-08 13:38:29 +07:00
Duc Nguyen (john)
4f356f7f9a Provide dedicated page for login (#153) 2024-03-08 08:06:51 +07:00
Duc Nguyen (john)
9725d60791 Create user management functionality (#152)
* Create user management page
* Remove old user creating UI
* Add username validation; admin user auto-creation
* Provide docs on user management
* Bump version
2024-03-07 14:19:37 +07:00
Duc Nguyen (john)
8a90fcfc99 Restructure index to allow it to be dynamically created by end-user (#151)
1. Introduce the concept of "collection_name" to docstore and vector store. Each collection can be viewed similarly to a table in a SQL database. It allows better organizing information within this data source.
2. Move the `Index` and `Source` tables from the application scope into the index scope. For each new index created by user, these tables should increase accordingly. So it depends on the index, rather than the app.
3. Make each index responsible for the UI components in the app.
4. Construct the File UI page.
2024-03-07 01:50:47 +07:00
Albert (Quang)
cc87aaa783 Add one-click installers for Linux, Windows, and MacOS (#146)
* feat: Add installers for linux, windows, and macos

* docs: Update README

* pre-commit fix styles

* Update installers and README

* Remove env vars check and fix paths

* Update installers:
* Remove start.py and move install and launch part back to .sh/.bat
* Add conda deactivate
* Make messages more informative

* Improve kotaemon based on insights from projects (#147)

- Include static files in the package.
- More reliable information panel. Faster & not breaking randomly.
- Add directory upload.
- Enable zip file to upload.
- Allow setting endpoint for the OCR reader using environment variable.

* feat: Add installers for linux, windows, and macos

* docs: Update README

* pre-commit fix styles

* Update installers and README

* Remove env vars check and fix paths

* Update installers:
* Remove start.py and move install and launch part back to .sh/.bat
* Add conda deactivate
* Make messages more informative

* Make macOS installer runable and improve Windows, Linux installers

* Minor fix macos commands

* installation should pause before exit

* Update Windows installer: add a new label to exit function with error

* put install_dir to .gitignore

* chore: Add comments to clarify the 'end' labels

---------

Co-authored-by: Duc Nguyen (john) <trungduc1992@gmail.com>
Co-authored-by: ian <ian@cinnamon.is>
2024-03-06 10:59:30 +07:00
Duc Nguyen (john)
033e7e05cc Improve kotaemon based on insights from projects (#147)
- Include static files in the package.
- More reliable information panel. Faster & not breaking randomly.
- Add directory upload.
- Enable zip file to upload.
- Allow setting endpoint for the OCR reader using environment variable.
2024-02-28 22:18:29 +07:00
Duc Nguyen (john)
e1cf970a3d Disable Gradio analytics and unnecessary font loading to avoid app hanging in private network (#145) 2024-02-20 22:02:28 +07:00