Skip to content

Commit

Permalink
Running pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
ajosh0504 committed Dec 12, 2024
1 parent d74ee6a commit a31c01f
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions notebooks/techniques/langchain_parent_document_retrieval.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import getpass\n",
"import os\n",
"\n",
"from pymongo import MongoClient"
]
},
Expand Down Expand Up @@ -140,8 +141,8 @@
}
],
"source": [
"from datasets import load_dataset\n",
"import pandas as pd"
"import pandas as pd\n",
"from datasets import load_dataset"
]
},
{
Expand Down Expand Up @@ -398,8 +399,8 @@
"from langchain_mongodb.retrievers import (\n",
" MongoDBAtlasParentDocumentRetriever,\n",
")\n",
"from langchain_text_splitters import RecursiveCharacterTextSplitter\n",
"from langchain_openai import OpenAIEmbeddings"
"from langchain_openai import OpenAIEmbeddings\n",
"from langchain_text_splitters import RecursiveCharacterTextSplitter"
]
},
{
Expand Down Expand Up @@ -602,7 +603,7 @@
"collection = mongodb_client[DB_NAME][COLLECTION_NAME]\n",
"# Delete any existing documents from the collection\n",
"collection.delete_many({})\n",
"print(f\"Deletion complete.\")\n",
"print(\"Deletion complete.\")\n",
"# Ingest LangChain documents into MongoDB\n",
"results = await process_docs(docs)"
]
Expand All @@ -620,8 +621,8 @@
"metadata": {},
"outputs": [],
"source": [
"from pymongo.operations import SearchIndexModel\n",
"from pymongo.errors import OperationFailure"
"from pymongo.errors import OperationFailure\n",
"from pymongo.operations import SearchIndexModel"
]
},
{
Expand Down Expand Up @@ -702,10 +703,10 @@
"metadata": {},
"outputs": [],
"source": [
"from langchain_openai import ChatOpenAI\n",
"from langchain_core.output_parsers import StrOutputParser\n",
"from langchain_core.prompts import ChatPromptTemplate\n",
"from langchain_core.runnables import RunnablePassthrough\n",
"from langchain_core.output_parsers import StrOutputParser"
"from langchain_openai import ChatOpenAI"
]
},
{
Expand Down Expand Up @@ -795,13 +796,14 @@
"metadata": {},
"outputs": [],
"source": [
"from typing import Annotated, Dict\n",
"\n",
"from langchain.agents import tool\n",
"from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder\n",
"from typing import Annotated, Dict\n",
"from langgraph.graph import END, START, StateGraph\n",
"from langgraph.graph.message import add_messages\n",
"from typing_extensions import TypedDict\n",
"from langgraph.prebuilt import ToolNode, tools_condition\n",
"from langgraph.graph import StateGraph, START, END"
"from typing_extensions import TypedDict"
]
},
{
Expand Down

0 comments on commit a31c01f

Please sign in to comment.