Commit Graph

62 Commits

Author SHA1 Message Date
Otto L 1efac6a3fe
feat(llm - embed): Add support for Azure OpenAI (#1698)
* Add support for Azure OpenAI

* fix: wrong default api_version

Should be dashes instead of underscores.
see: https://learn.microsoft.com/en-us/azure/ai-services/openai/reference

* fix: code styling

applied "make check" changes

* refactor: extend documentation

* mention azopenai as available option and extras
* add recommended section
* include settings-azopenai.yaml configuration file

* fix: documentation
2024-03-15 16:49:50 +01:00
Brett England 63de7e4930
feat: unify settings for vector and nodestore connections to PostgreSQL (#1730)
* Unify pgvector and postgres connection settings

* Remove local changes

* Update file pgvector->postgres
2024-03-15 09:55:17 +01:00
Brett England 68b3a34b03
feat(nodestore): add Postgres for the doc and index store (#1706)
* Adding Postgres for the doc and index store

* Adding documentation.  Rename postgres database local->simple.  Postgres storage dependencies

* Update documentation for postgres storage

* Renaming feature to nodestore

* update docstore -> nodestore in doc

* missed some docstore changes in doc

* Updated poetry.lock

* Formatting updates to pass ruff/black checks

* Correction to unreachable code!

* Format adjustment to pass black test

* Adjust extra inclusion name for vector pg

* extra dep change for pg vector

* storage-postgres -> storage-nodestore-postgres

* Hash change on poetry lock
2024-03-14 17:12:33 +01:00
Arun Yadav 821bca32e9
feat(local): tiktoken cache within repo for offline (#1467) 2024-03-11 22:55:13 +01:00
icsy7867 02dc83e8e9
feat(llm): adds serveral settings for llamacpp and ollama (#1703) 2024-03-11 22:51:05 +01:00
Hoffelhas 410bf7a71f
feat(ui): maintain score order when curating sources (#1643)
* Update ui.py

Changed 'curated_sources' from a list, in order to maintain score order when returning the curated sources.

* Maintain score order after curating sources
2024-03-11 22:27:30 +01:00
icsy7867 290b9fb084
feat(ui): add sources check to not repeat identical sources (#1705) 2024-03-11 22:24:18 +01:00
Iván Martínez 45f05711eb
feat: Upgrade to LlamaIndex to 0.10 (#1663)
* Extract optional dependencies

* Separate local mode into llms-llama-cpp and embeddings-huggingface for clarity

* Support Ollama embeddings

* Upgrade to llamaindex 0.10.14. Remove legacy use of ServiceContext in ContextChatEngine

* Fix vector retriever filters
2024-03-06 17:51:30 +01:00
TQ cd40e3982b
feat(Vector): support pgvector (#1624) 2024-02-20 15:29:26 +01:00
Iván Martínez aa13afde07
feat(UI): Select file to Query or Delete + Delete ALL (#1612)
---------

Co-authored-by: Robin Boone <rboone@sofics.com>
2024-02-16 17:36:09 +01:00
icsy7867 24fb80ca38
fix(UI): Updated ui.py. Frees up the CPU to not be bottlenecked.
Updated ui.py to include a small sleep timer while building the stream deltas.  This recursive function fires off so quickly to eats up too much of the CPU.  This small sleep frees up the CPU to not be bottlenecked.  This value can go lower/shorter.  But 0.02 or 0.025 seems to work well. (#1589)

Co-authored-by: root <root@wesgitlabdemo.icl.gtri.org>
2024-02-16 12:52:14 +01:00
Ygal Blum 6bbec79583
feat(llm): Add support for Ollama LLM (#1526) 2024-02-09 15:50:50 +01:00
Iván Martínez 24fae660e6
feat: Add stream information to generate SDKs (#1569) 2024-02-02 16:14:22 +01:00
Naveen Kannan 869233f0e4
fix: Adding an LLM param to fix broken generator from llamacpp (#1519) 2024-01-17 18:10:45 +01:00
CognitiveTech e326126d0d
feat: add mistral + chatml prompts (#1426) 2024-01-16 22:51:14 +01:00
Robert Gay 6191bcdbd6
fix: minor bug in chat stream output - python error being serialized (#1449) 2024-01-16 16:41:20 +01:00
Iván Martínez d3acd85fe3
fix(tests): load the test settings only when running tests
Previous implementation causes false positives with the last version of LlamaIndex
2024-01-09 12:03:16 +01:00
Matthew Hill 2d27a9f956
feat(llm): Add openailike llm mode (#1447)
This mode behaves the same as the openai mode, except that it allows setting custom models not
supported by OpenAI. It can be used with any tool that serves models from an OpenAI compatible API.

Implements #1424
2023-12-26 10:26:08 +01:00
Iván Martínez 4c69c458ab
Improve ingest logs (#1438) 2023-12-21 17:13:46 +01:00
Iván Martínez 4780540870
feat(settings): Configurable context_window and tokenizer (#1437) 2023-12-21 14:49:35 +01:00
Iván Martínez 6eeb95ec7f
feat(API): Ingest plain text (#1417)
* Add ingest/text route to ingest plain text

* Add new ingest text test and adapt ingest/file ones

* Include new API in docs

* Remove duplicated logic
2023-12-18 21:47:05 +01:00
Rohit Das c71ae7cee9
feat(ui): make chat area stretch to fill the screen (#1397) 2023-12-17 12:02:13 +01:00
3ly-13 145f3ec9f4
feat(ui): Allows User to Set System Prompt via "Additional Options" in Chat Interface (#1353) 2023-12-10 19:45:14 +01:00
3ly-13 a072a40a7c
Allow setting OpenAI model in settings (#1386)
feat(settings): Allow setting openai model to be used. Default to GPT 3.5
2023-12-09 20:13:00 +01:00
Louis Melchior a3ed14c58f
feat(llm): drop default_system_prompt (#1385)
As discussed on Discord, the decision has been made to remove the system prompts by default, to better segregate the API and the UI usages.

A concurrent PR (#1353) is enabling the dynamic setting of a system prompt in the UI.

Therefore, if UI users want to use a custom system prompt, they can specify one directly in the UI.
If the API users want to use a custom prompt, they can pass it directly into their messages that they are passing to the API.

In the highlight of the two use case above, it becomes clear that default system_prompt does not need to exist.
2023-12-08 23:13:51 +01:00
Iván Martínez f235c50be9
Delete old docs (#1384) 2023-12-08 22:39:23 +01:00
lopagela 56af625d71
Fix the parallel ingestion mode, and make it available through conf (#1336)
* Fix the parallel ingestion mode, and make it available through conf

Also updated the documentation to show how to configure the ingest mode.

* PR feedback: redirect to documentation
2023-11-30 11:41:55 +01:00
Iván Martínez 64ed9cd872
Allow passing a system prompt (#1318) 2023-11-29 15:51:19 +01:00
Gianni Acquisto 9c192ddd73
Added max_new_tokens as a config option to llm yaml block (#1317)
* added max_new_tokens as a configuration option to the llm block in settings

* Update fern/docs/pages/manual/settings.mdx

Co-authored-by: lopagela <lpglm@orange.fr>

* Update private_gpt/settings/settings.py

Add default value for max_new_tokens = 256

Co-authored-by: lopagela <lpglm@orange.fr>

* Addressed location of docs comment

* reformatting from running 'make check'

* remove default config value from settings.yaml

---------

Co-authored-by: lopagela <lpglm@orange.fr>
2023-11-26 19:17:29 +01:00
lopagela bafdd3baf1
Ingestion Speedup Multiple strategy (#1309) 2023-11-25 20:12:09 +01:00
Iván Martínez 944c43bfa8
Multi language support - fern debug (#1307)
---------

Co-authored-by: Louis <lpglm@orange.fr>
Co-authored-by: LeMoussel <cnhx27@gmail.com>
2023-11-25 14:34:23 +01:00
Iván Martínez 510caa576b
Make qdrant the default vector db (#1285)
* Make qdrant the default vector db

---------

Co-authored-by: Pablo Orgaz <pabloogc@gmail.com>
Co-authored-by: lopagela <lpglm@orange.fr>
2023-11-20 16:19:22 +01:00
Francisco García Sierra f1cbff0fb7
fix: Windows permission error on ingest service tmp files (#1280) 2023-11-20 10:08:03 +01:00
lopagela a09cd7a892
Update llama_index to 0.9.3 (#1278)
* Update llama_index to 0.9.3

Had to change some imports because of breaking change durin the llama_index update to 0.9.0

* Update poetry.lock after update of llama_index
2023-11-19 18:49:36 +01:00
lopagela 224812f7f6
Update to gradio 4 and allow upload multiple files at once in UI (#1271) 2023-11-18 20:19:43 +01:00
lopagela f7d7b6cd4b
Fixed the avatar of the box by using a local file (#1266)
Now rendering a specific file inside the python code
2023-11-18 12:29:27 +01:00
Pablo Orgaz 0d520026a3
fix: Windows 11 failing to auto-delete tmp file (#1260) 2023-11-17 18:23:57 +01:00
Iván Martínez 2a417d2f61
Fix/qdrant support (#1253)
* Disable check same thread by default to enable disk-based Qdrant local client to work
2023-11-16 13:29:17 +01:00
Anush 03d1ae6d70
feat: Qdrant support (#1228)
* feat: Qdrant support

* Update private_gpt/components/vector_store/vector_store_component.py
2023-11-13 21:23:26 +01:00
Iván Martínez 86fc4781d8
Fix openai setting literal (#1221) 2023-11-12 22:29:26 +01:00
Pablo Orgaz 022bd718e3
fix: Remove global state (#1216)
* Remove all global settings state

* chore: remove autogenerated class

* chore: cleanup

* chore: merge conflicts
2023-11-12 22:20:36 +01:00
Iván Martínez f394ca61bb
Reuse existing stored index during ingestion (#1220) 2023-11-12 22:14:38 +01:00
lopagela aa70d3d9f0
Add simple Basic auth (#1203)
* Add simple Basic auth

To enable the basic authentication, one must set `server.auth.enabled`
to true.

The static string defined in `server.auth.secret` must be set in the
header `Authorization`.

The health check endpoint will always be accessible, no matter the API
auth configuration.

* Fix linting and type check

* Fighting with mypy being too restrictive

Had to disable mypy in the `auth` as we are not using the same signature
for the authenticated method.

mypy was complaining that the signatures of `authenticated` must be
identical, no matter in which logical branch we are.
Given that fastapi is accomodating itself of method signatures (it will
inject the dependencies in the method call), this warning of mypy is
actually preventing us to do something legit.

mypy doc: https://mypy.readthedocs.io/en/stable/common_issues.html

* Write tests to verify that the simple auth is working
2023-11-12 19:05:00 +01:00
Iván Martínez b7647542f4
Curate sources to avoid the UI crashing (#1212)
* Curate sources to avoid the UI crashing

* Remove sources from chat history to avoid confusing the LLM
2023-11-12 10:59:51 +01:00
lopagela a579c9bdc5
Update poetry lock (#1209)
* Update the version of llama_index used to fix transient openai errors

* Update poetry.lock file

* Make `local` mode the default mode by default
2023-11-11 22:44:19 +01:00
Iván Martínez a22969ad1f
Add sources to completions APIs and UI (#1206) 2023-11-11 21:39:15 +01:00
lopagela 8487440a6f
Add basic CORS (#1198) 2023-11-10 14:29:43 +01:00
lopagela a666fd5b73
Refactor UI state management (#1191)
* Added logs at generation of the UI, and generate the UI in an object
* Make ingest script more verbose in case of an error at ingestion time
* Removed the explicit state in the UI containing ingested files
* Make script of ingestion a bit more verbose by displaying stack traces
* Change the browser tab title of privateGPT ui to `My Private GPT`
2023-11-10 10:42:43 +01:00
Iván Martínez c81f4b2ebd
Search in Docs to UI (#1186)
Move from Context Chunks JSON response to a more comprehensive Search in Docs functionality
2023-11-09 12:44:57 +01:00
lopagela 23cd3fea10
Parse JSON files using llama_index JSONReader (#1176)
Patch the default list of llama_index to support JSON files.
This injection of JSON documents should improve the comprehension in
JSON files, as there is a parsing of JSON files.
2023-11-07 15:39:40 +01:00