|
|
|
@ -162,7 +162,7 @@
|
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": [
|
|
|
|
|
"!poetry run pip install --upgrade langchain-openai tiktoken chromadb hnswlib"
|
|
|
|
|
"!poetry run pip install --upgrade langchain-openai tiktoken langchain-chroma hnswlib"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@ -211,7 +211,7 @@
|
|
|
|
|
"outputs": [],
|
|
|
|
|
"source": [
|
|
|
|
|
"from langchain.chains import RetrievalQA\n",
|
|
|
|
|
"from langchain_community.vectorstores.chroma import Chroma\n",
|
|
|
|
|
"from langchain_chroma import Chroma\n",
|
|
|
|
|
"from langchain_openai import OpenAI, OpenAIEmbeddings\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"embedding = OpenAIEmbeddings()\n",
|
|
|
|
@ -365,7 +365,7 @@
|
|
|
|
|
"source": [
|
|
|
|
|
"from langchain.chains.query_constructor.schema import AttributeInfo\n",
|
|
|
|
|
"from langchain.retrievers.self_query.base import SelfQueryRetriever\n",
|
|
|
|
|
"from langchain_community.vectorstores.chroma import Chroma\n",
|
|
|
|
|
"from langchain_chroma import Chroma\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"EXCLUDE_KEYS = [\"id\", \"xpath\", \"structure\"]\n",
|
|
|
|
|
"metadata_field_info = [\n",
|
|
|
|
@ -540,7 +540,7 @@
|
|
|
|
|
"source": [
|
|
|
|
|
"from langchain.retrievers.multi_vector import MultiVectorRetriever, SearchType\n",
|
|
|
|
|
"from langchain.storage import InMemoryStore\n",
|
|
|
|
|
"from langchain_community.vectorstores.chroma import Chroma\n",
|
|
|
|
|
"from langchain_chroma import Chroma\n",
|
|
|
|
|
"from langchain_openai import OpenAIEmbeddings\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"# The vectorstore to use to index the child chunks\n",
|
|
|
|
|