forked from QuivrHQ/quivr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: introducing configurable retrieval workflows (QuivrHQ#3227)
# Description Major PR which, among other things, introduces the possibility of easily customizing the retrieval workflows. Workflows are based on LangGraph, and can be customized using a [yaml configuration file](core/tests/test_llm_endpoint.py), and adding the implementation of the nodes logic into [quivr_rag_langgraph.py](https://github.com/QuivrHQ/quivr/blob/1a0c98437a357e7bbc8039f3fd49912052a1640b/backend/core/quivr_core/quivr_rag_langgraph.py) This is a first, simple implementation that will significantly evolve in the coming weeks to enable more complex workflows (for instance, with conditional nodes). We also plan to adopt a similar approach for the ingestion part, i.e. to enable user to easily customize the ingestion pipeline. Closes CORE-195, CORE-203, CORE-204 ## Checklist before requesting a review Please delete options that are not relevant. - [X] My code follows the style guidelines of this project - [X] I have performed a self-review of my code - [X] I have commented hard-to-understand areas - [X] I have ideally added tests that prove my fix is effective or that my feature works - [X] New and existing unit tests pass locally with my changes - [X] Any dependent changes have been merged ## Screenshots (if appropriate):
- Loading branch information
1 parent
5e48594
commit ef90e8e
Showing
85 changed files
with
5,348 additions
and
782 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,30 @@ | ||
#### QUIVR Configuration | ||
# This file is used to configure the Quivr stack. It is used by the `docker-compose.yml` file to configure the stack. | ||
|
||
# API KEYS | ||
# OPENAI. Update this to use your API key. To skip OpenAI integration use a fake key, for example: tk-aabbccddAABBCCDDEeFfGgHhIiJKLmnopjklMNOPqQqQqQqQ | ||
OPENAI_API_KEY=CHANGE_ME | ||
OPENAI_API_KEY=your-openai-api-key | ||
# ANTHROPIC_API_KEY=your-anthropic-api-key | ||
# MISTRAL_API_KEY=your-mistral-api-key | ||
# GROQ_API_KEY=your-groq-api-key | ||
|
||
COHERE_API_KEY=your-cohere-api-key | ||
# JINA_API_KEY=your-jina-api-key | ||
|
||
# UNSTRUCTURED_API_KEY=your-unstructured-api-key | ||
# UNSTRUCTURED_API_URL=https://api.unstructured.io/general/v0/general | ||
|
||
# LLAMA_PARSE_API_KEY=your-llamaparse-api-key | ||
|
||
# Configuration files path | ||
BRAIN_CONFIG_PATH=config/retrieval_config_workflow.yaml | ||
CHAT_LLM_CONFIG_PATH=config/chat_llm_config.yaml | ||
|
||
# LangSmith | ||
# LANGCHAIN_TRACING_V2=true | ||
# LANGCHAIN_ENDPOINT="https://api.smith.langchain.com" | ||
# LANGCHAIN_API_KEY=your-langchain-api-key | ||
# LANGCHAIN_PROJECT=your-langchain-project-name | ||
|
||
# LOCAL | ||
# OLLAMA_API_BASE_URL=http://host.docker.internal:11434 # Uncomment to activate ollama. This is the local url for the ollama api | ||
|
@@ -32,7 +54,6 @@ EXTERNAL_SUPABASE_URL=http://localhost:54321 | |
SUPABASE_SERVICE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU | ||
PG_DATABASE_URL=postgresql://postgres:[email protected]:54322/postgres | ||
PG_DATABASE_ASYNC_URL=postgresql+asyncpg://postgres:[email protected]:54322/postgres | ||
ANTHROPIC_API_KEY=null | ||
JWT_SECRET_KEY=super-secret-jwt-token-with-at-least-32-characters-long | ||
AUTHENTICATE=true | ||
TELEMETRY_ENABLED=true | ||
|
@@ -41,7 +62,6 @@ CELEBRY_BROKER_QUEUE_NAME=quivr-preview.fifo | |
QUIVR_DOMAIN=http://localhost:3000/ | ||
BACKEND_URL=http://localhost:5050 | ||
EMBEDDING_DIM=1536 | ||
#COHERE_API_KEY=CHANGE_ME | ||
DEACTIVATE_STRIPE=true | ||
|
||
#RESEND | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
backend/api/quivr_api/modules/chat/controller/chat/utils.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.