From 6fbfc375b9c48141c864a77a235d2783d06dbbb4 Mon Sep 17 00:00:00 2001 From: Lance Martin <122662504+rlancemartin@users.noreply.github.com> Date: Fri, 8 Dec 2023 15:24:05 -0800 Subject: [PATCH] Update README and vectorstore path for multi-modal template (#14473) --- templates/rag-chroma-multi-modal/README.md | 4 ++-- .../rag-chroma-multi-modal/rag_chroma_multi_modal/chain.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/rag-chroma-multi-modal/README.md b/templates/rag-chroma-multi-modal/README.md index 55aea72b9a..e6226afe10 100644 --- a/templates/rag-chroma-multi-modal/README.md +++ b/templates/rag-chroma-multi-modal/README.md @@ -69,9 +69,9 @@ langchain app add rag-chroma-multi-modal And add the following code to your `server.py` file: ```python -from rag_chroma import chain as rag_chroma_chain +from rag_chroma_multi_modal import chain as rag_chroma_multi_modal_chain -add_routes(app, rag_chroma_chain, path="/rag-chroma-multi-modal") +add_routes(app, rag_chroma_multi_modal_chain, path="/rag-chroma-multi-modal") ``` (Optional) Let's now configure LangSmith. diff --git a/templates/rag-chroma-multi-modal/rag_chroma_multi_modal/chain.py b/templates/rag-chroma-multi-modal/rag_chroma_multi_modal/chain.py index e5faf6cfb6..2cd83b743f 100644 --- a/templates/rag-chroma-multi-modal/rag_chroma_multi_modal/chain.py +++ b/templates/rag-chroma-multi-modal/rag_chroma_multi_modal/chain.py @@ -101,7 +101,7 @@ def multi_modal_rag_chain(retriever): # Load chroma vectorstore_mmembd = Chroma( collection_name="multi-modal-rag", - persist_directory=str(Path(__file__).parent / "chroma_db_multi_modal"), + persist_directory=str(Path(__file__).parent.parent / "chroma_db_multi_modal"), embedding_function=OpenCLIPEmbeddings( model_name="ViT-H-14", checkpoint="laion2b_s32b_b79k" ),