diff --git a/docs/docs/how_to/caching_embeddings.ipynb b/docs/docs/how_to/caching_embeddings.ipynb index 232ba7bac0e..71868b812f2 100644 --- a/docs/docs/how_to/caching_embeddings.ipynb +++ b/docs/docs/how_to/caching_embeddings.ipynb @@ -124,7 +124,7 @@ "metadata": {}, "outputs": [], "source": [ - "raw_documents = TextLoader(\"../../state_of_the_union.txt\").load()\n", + "raw_documents = TextLoader(\"state_of_the_union.txt\").load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "documents = text_splitter.split_documents(raw_documents)" ] diff --git a/docs/docs/how_to/character_text_splitter.ipynb b/docs/docs/how_to/character_text_splitter.ipynb index 9ba265c0b0f..3f79bb5ca54 100644 --- a/docs/docs/how_to/character_text_splitter.ipynb +++ b/docs/docs/how_to/character_text_splitter.ipynb @@ -45,7 +45,7 @@ "from langchain_text_splitters import CharacterTextSplitter\n", "\n", "# Load an example document\n", - "with open(\"../../../docs/modules/state_of_the_union.txt\") as f:\n", + "with open(\"state_of_the_union.txt\") as f:\n", " state_of_the_union = f.read()\n", "\n", "text_splitter = CharacterTextSplitter(\n", diff --git a/docs/docs/how_to/multi_vector.ipynb b/docs/docs/how_to/multi_vector.ipynb index 566aae27da0..9a2948215c1 100644 --- a/docs/docs/how_to/multi_vector.ipynb +++ b/docs/docs/how_to/multi_vector.ipynb @@ -52,7 +52,7 @@ "source": [ "loaders = [\n", " TextLoader(\"../../paul_graham_essay.txt\"),\n", - " TextLoader(\"../../state_of_the_union.txt\"),\n", + " TextLoader(\"state_of_the_union.txt\"),\n", "]\n", "docs = []\n", "for loader in loaders:\n", @@ -143,7 +143,7 @@ { "data": { "text/plain": [ - "Document(page_content='Tonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. \\n\\nOne of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court.', metadata={'doc_id': '2fd77862-9ed5-4fad-bf76-e487b747b333', 'source': '../../state_of_the_union.txt'})" + "Document(page_content='Tonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. \\n\\nOne of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court.', metadata={'doc_id': '2fd77862-9ed5-4fad-bf76-e487b747b333', 'source': 'state_of_the_union.txt'})" ] }, "execution_count": 8, diff --git a/docs/docs/how_to/parent_document_retriever.ipynb b/docs/docs/how_to/parent_document_retriever.ipynb index ed72050de02..674c7098c34 100644 --- a/docs/docs/how_to/parent_document_retriever.ipynb +++ b/docs/docs/how_to/parent_document_retriever.ipynb @@ -58,7 +58,7 @@ "source": [ "loaders = [\n", " TextLoader(\"../../paul_graham_essay.txt\"),\n", - " TextLoader(\"../../state_of_the_union.txt\"),\n", + " TextLoader(\"state_of_the_union.txt\"),\n", "]\n", "docs = []\n", "for loader in loaders:\n", diff --git a/docs/docs/how_to/recursive_text_splitter.ipynb b/docs/docs/how_to/recursive_text_splitter.ipynb index f46fafb9e62..8d48ce2ff28 100644 --- a/docs/docs/how_to/recursive_text_splitter.ipynb +++ b/docs/docs/how_to/recursive_text_splitter.ipynb @@ -48,7 +48,7 @@ "from langchain_text_splitters import RecursiveCharacterTextSplitter\n", "\n", "# Load example document\n", - "with open(\"../../../docs/modules/state_of_the_union.txt\") as f:\n", + "with open(\"state_of_the_union.txt\") as f:\n", " state_of_the_union = f.read()\n", "\n", "text_splitter = RecursiveCharacterTextSplitter(\n", diff --git a/docs/docs/how_to/semantic-chunker.ipynb b/docs/docs/how_to/semantic-chunker.ipynb index d3d5fd44556..fbf50f3f57d 100644 --- a/docs/docs/how_to/semantic-chunker.ipynb +++ b/docs/docs/how_to/semantic-chunker.ipynb @@ -52,7 +52,7 @@ "outputs": [], "source": [ "# This is a long document we can split up.\n", - "with open(\"../../../docs/modules/state_of_the_union.txt\") as f:\n", + "with open(\"state_of_the_union.txt\") as f:\n", " state_of_the_union = f.read()" ] }, diff --git a/docs/docs/how_to/split_by_token.ipynb b/docs/docs/how_to/split_by_token.ipynb index 64d265d6f2a..c956dd10267 100644 --- a/docs/docs/how_to/split_by_token.ipynb +++ b/docs/docs/how_to/split_by_token.ipynb @@ -50,7 +50,7 @@ "from langchain_text_splitters import CharacterTextSplitter\n", "\n", "# This is a long document we can split up.\n", - "with open(\"../../../docs/modules/state_of_the_union.txt\") as f:\n", + "with open(\"state_of_the_union.txt\") as f:\n", " state_of_the_union = f.read()" ] }, @@ -199,7 +199,7 @@ "outputs": [], "source": [ "# This is a long document we can split up.\n", - "with open(\"../../../docs/modules/state_of_the_union.txt\") as f:\n", + "with open(\"state_of_the_union.txt\") as f:\n", " state_of_the_union = f.read()" ] }, @@ -392,7 +392,7 @@ "outputs": [], "source": [ "# This is a long document we can split up.\n", - "with open(\"../../../docs/modules/state_of_the_union.txt\") as f:\n", + "with open(\"state_of_the_union.txt\") as f:\n", " state_of_the_union = f.read()" ] }, @@ -596,7 +596,7 @@ "outputs": [], "source": [ "# This is a long document we can split up.\n", - "with open(\"../../../state_of_the_union.txt\") as f:\n", + "with open(\"state_of_the_union.txt\") as f:\n", " state_of_the_union = f.read()\n", "from langchain_text_splitters import CharacterTextSplitter" ] diff --git a/docs/docs/integrations/callbacks/uptrain.ipynb b/docs/docs/integrations/callbacks/uptrain.ipynb index d69441fc7b7..b462a6c96b4 100644 --- a/docs/docs/integrations/callbacks/uptrain.ipynb +++ b/docs/docs/integrations/callbacks/uptrain.ipynb @@ -135,7 +135,7 @@ "metadata": {}, "outputs": [], "source": [ - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()" ] }, diff --git a/docs/docs/integrations/document_loaders/surrealdb.ipynb b/docs/docs/integrations/document_loaders/surrealdb.ipynb index e8e68effb97..14836a69dad 100644 --- a/docs/docs/integrations/document_loaders/surrealdb.ipynb +++ b/docs/docs/integrations/document_loaders/surrealdb.ipynb @@ -143,7 +143,7 @@ "data": { "text/plain": [ "{'id': 'documents:zzz434sa584xl3b4ohvk',\n", - " 'source': '../../modules/state_of_the_union.txt',\n", + " 'source': '../../how_to/state_of_the_union.txt',\n", " 'ns': 'langchain',\n", " 'db': 'database',\n", " 'table': 'documents'}" diff --git a/docs/docs/integrations/document_transformers/cross_encoder_reranker.ipynb b/docs/docs/integrations/document_transformers/cross_encoder_reranker.ipynb index 45a8be69562..a636ba84679 100644 --- a/docs/docs/integrations/document_transformers/cross_encoder_reranker.ipynb +++ b/docs/docs/integrations/document_transformers/cross_encoder_reranker.ipynb @@ -71,7 +71,7 @@ "from langchain_community.vectorstores import FAISS\n", "from langchain_text_splitters import RecursiveCharacterTextSplitter\n", "\n", - "documents = TextLoader(\"../../modules/state_of_the_union.txt\").load()\n", + "documents = TextLoader(\"../../how_to/state_of_the_union.txt\").load()\n", "text_splitter = RecursiveCharacterTextSplitter(chunk_size=500, chunk_overlap=100)\n", "texts = text_splitter.split_documents(documents)\n", "embeddingsModel = HuggingFaceEmbeddings(\n", diff --git a/docs/docs/integrations/document_transformers/jina_rerank.ipynb b/docs/docs/integrations/document_transformers/jina_rerank.ipynb index beebf1ccb32..5585ecd4357 100644 --- a/docs/docs/integrations/document_transformers/jina_rerank.ipynb +++ b/docs/docs/integrations/document_transformers/jina_rerank.ipynb @@ -101,7 +101,7 @@ "from langchain_text_splitters import RecursiveCharacterTextSplitter\n", "\n", "documents = TextLoader(\n", - " \"../../modules/state_of_the_union.txt\",\n", + " \"../../how_to/state_of_the_union.txt\",\n", ").load()\n", "text_splitter = RecursiveCharacterTextSplitter(chunk_size=500, chunk_overlap=100)\n", "texts = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/document_transformers/openvino_rerank.ipynb b/docs/docs/integrations/document_transformers/openvino_rerank.ipynb index e7961bdd7b7..14da3d1222c 100644 --- a/docs/docs/integrations/document_transformers/openvino_rerank.ipynb +++ b/docs/docs/integrations/document_transformers/openvino_rerank.ipynb @@ -119,7 +119,7 @@ "One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \n", "\n", "And I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 73}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 73}\n", "----------------------------------------------------------------------------------------------------\n", "Document 2:\n", "\n", @@ -134,7 +134,7 @@ "The VA is pioneering new ways of linking toxic exposures to diseases, already helping more veterans get benefits. \n", "\n", "And tonight, I’m announcing we’re expanding eligibility to veterans suffering from nine respiratory cancers.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 88}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 88}\n", "----------------------------------------------------------------------------------------------------\n", "Document 3:\n", "\n", @@ -149,7 +149,7 @@ "But cancer from prolonged exposure to burn pits ravaged Heath’s lungs and body. \n", "\n", "Danielle says Heath was a fighter to the very end.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 87}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 87}\n", "----------------------------------------------------------------------------------------------------\n", "Document 4:\n", "\n", @@ -160,7 +160,7 @@ "This is personal to me and Jill, to Kamala, and to so many of you. \n", "\n", "Cancer is the #2 cause of death in America–second only to heart disease.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 89}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 89}\n", "----------------------------------------------------------------------------------------------------\n", "Document 5:\n", "\n", @@ -169,7 +169,7 @@ "We will buy American to make sure everything from the deck of an aircraft carrier to the steel on highway guardrails are made in America. \n", "\n", "But to compete for the best jobs of the future, we also need to level the playing field with China and other competitors.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 29}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 29}\n", "----------------------------------------------------------------------------------------------------\n", "Document 6:\n", "\n", @@ -180,7 +180,7 @@ "Groups of citizens blocking tanks with their bodies. Everyone from students to retirees teachers turned soldiers defending their homeland. \n", "\n", "In this struggle as President Zelenskyy said in his speech to the European Parliament “Light will win over darkness.” The Ukrainian Ambassador to the United States is here tonight.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 2}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 2}\n", "----------------------------------------------------------------------------------------------------\n", "Document 7:\n", "\n", @@ -193,7 +193,7 @@ "Inflation is robbing them of the gains they might otherwise feel. \n", "\n", "I get it. That’s why my top priority is getting prices under control.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 35}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 35}\n", "----------------------------------------------------------------------------------------------------\n", "Document 8:\n", "\n", @@ -203,7 +203,7 @@ "\n", "Invest in America. Educate Americans. Grow the workforce. Build the economy from the bottom up \n", "and the middle out, not from the top down.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 23}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 23}\n", "----------------------------------------------------------------------------------------------------\n", "Document 9:\n", "\n", @@ -212,7 +212,7 @@ "And I’m taking robust action to make sure the pain of our sanctions is targeted at Russia’s economy. And I will use every tool at our disposal to protect American businesses and consumers. \n", "\n", "Tonight, I can announce that the United States has worked with 30 other countries to release 60 Million barrels of oil from reserves around the world.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 14}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 14}\n", "----------------------------------------------------------------------------------------------------\n", "Document 10:\n", "\n", @@ -223,7 +223,7 @@ "Just last year, 55 Fortune 500 corporations earned $40 billion in profits and paid zero dollars in federal income tax. \n", "\n", "That’s simply not fair. That’s why I’ve proposed a 15% minimum tax rate for corporations.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 46}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 46}\n", "----------------------------------------------------------------------------------------------------\n", "Document 11:\n", "\n", @@ -232,7 +232,7 @@ "For Joshua, and for the 200,000 other young people with Type 1 diabetes, let’s cap the cost of insulin at $35 a month so everyone can afford it. \n", "\n", "Drug companies will still do very well. And while we’re at it let Medicare negotiate lower prices for prescription drugs, like the VA already does.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 41}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 41}\n", "----------------------------------------------------------------------------------------------------\n", "Document 12:\n", "\n", @@ -241,14 +241,14 @@ "We’ll create good jobs for millions of Americans, modernizing roads, airports, ports, and waterways all across America. \n", "\n", "And we’ll do it all to withstand the devastating effects of the climate crisis and promote environmental justice.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 26}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 26}\n", "----------------------------------------------------------------------------------------------------\n", "Document 13:\n", "\n", "As I said last year, especially to our younger transgender Americans, I will always have your back as your President, so you can be yourself and reach your God-given potential. \n", "\n", "While it often appears that we never agree, that isn’t true. I signed 80 bipartisan bills into law last year. From preventing government shutdowns to protecting Asian-Americans from still-too-common hate crimes to reforming military justice.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 79}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 79}\n", "----------------------------------------------------------------------------------------------------\n", "Document 14:\n", "\n", @@ -261,14 +261,14 @@ "When they came home, many of the world’s fittest and best trained warriors were never the same. \n", "\n", "Headaches. Numbness. Dizziness.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 85}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 85}\n", "----------------------------------------------------------------------------------------------------\n", "Document 15:\n", "\n", "A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she’s been nominated, she’s received a broad range of support—from the Fraternal Order of Police to former judges appointed by Democrats and Republicans. \n", "\n", "And if we are to advance liberty and justice, we need to secure the Border and fix the immigration system.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 74}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 74}\n", "----------------------------------------------------------------------------------------------------\n", "Document 16:\n", "\n", @@ -279,7 +279,7 @@ "I know what works: Investing in crime prevention and community police officers who’ll walk the beat, who’ll know the neighborhood, and who can restore trust and safety. \n", "\n", "So let’s not abandon our streets. Or choose between safety and equal justice.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 67}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 67}\n", "----------------------------------------------------------------------------------------------------\n", "Document 17:\n", "\n", @@ -288,7 +288,7 @@ "4,000 projects have already been announced. \n", "\n", "And tonight, I’m announcing that this year we will start fixing over 65,000 miles of highway and 1,500 bridges in disrepair.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 27}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 27}\n", "----------------------------------------------------------------------------------------------------\n", "Document 18:\n", "\n", @@ -302,7 +302,7 @@ "More support for patients and families. \n", "\n", "To get there, I call on Congress to fund ARPA-H, the Advanced Research Projects Agency for Health.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 90}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 90}\n", "----------------------------------------------------------------------------------------------------\n", "Document 19:\n", "\n", @@ -315,7 +315,7 @@ "And so many families are living paycheck to paycheck, struggling to keep up with the rising cost of food, gas, housing, and so much more. \n", "\n", "I understand.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 18}\n", + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 18}\n", "----------------------------------------------------------------------------------------------------\n", "Document 20:\n", "\n", @@ -326,7 +326,7 @@ "Imagine what it’s like to look at your child who needs insulin and have no idea how you’re going to pay for it. \n", "\n", "What it does to your dignity, your ability to look your child in the eye, to be the parent you expect to be.\n", - "Metadata: {'source': '../../modules/state_of_the_union.txt', 'id': 40}\n" + "Metadata: {'source': '../../how_to/state_of_the_union.txt', 'id': 40}\n" ] } ], @@ -337,7 +337,7 @@ "from langchain_text_splitters import RecursiveCharacterTextSplitter\n", "\n", "documents = TextLoader(\n", - " \"../../modules/state_of_the_union.txt\",\n", + " \"../../how_to/state_of_the_union.txt\",\n", ").load()\n", "text_splitter = RecursiveCharacterTextSplitter(chunk_size=500, chunk_overlap=100)\n", "texts = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/document_transformers/voyageai-reranker.ipynb b/docs/docs/integrations/document_transformers/voyageai-reranker.ipynb index 4fcc94fbfe0..52b5264161b 100644 --- a/docs/docs/integrations/document_transformers/voyageai-reranker.ipynb +++ b/docs/docs/integrations/document_transformers/voyageai-reranker.ipynb @@ -318,7 +318,7 @@ "from langchain_text_splitters import RecursiveCharacterTextSplitter\n", "from langchain_voyageai import VoyageAIEmbeddings\n", "\n", - "documents = TextLoader(\"../../modules/state_of_the_union.txt\").load()\n", + "documents = TextLoader(\"../../how_to/state_of_the_union.txt\").load()\n", "text_splitter = RecursiveCharacterTextSplitter(chunk_size=500, chunk_overlap=100)\n", "texts = text_splitter.split_documents(documents)\n", "retriever = FAISS.from_documents(\n", diff --git a/docs/docs/integrations/graphs/networkx.ipynb b/docs/docs/integrations/graphs/networkx.ipynb index 3021ca5fc1d..675db35dfbe 100644 --- a/docs/docs/integrations/graphs/networkx.ipynb +++ b/docs/docs/integrations/graphs/networkx.ipynb @@ -70,7 +70,7 @@ "metadata": {}, "outputs": [], "source": [ - "with open(\"../../../modules/state_of_the_union.txt\") as f:\n", + "with open(\"../../../how_to/state_of_the_union.txt\") as f:\n", " all_text = f.read()" ] }, diff --git a/docs/docs/integrations/llms/llm_caching.ipynb b/docs/docs/integrations/llms/llm_caching.ipynb index 3ba31073582..db7b11a7f89 100644 --- a/docs/docs/integrations/llms/llm_caching.ipynb +++ b/docs/docs/integrations/llms/llm_caching.ipynb @@ -1766,7 +1766,7 @@ "metadata": {}, "outputs": [], "source": [ - "with open(\"../../modules/state_of_the_union.txt\") as f:\n", + "with open(\"../../how_to/state_of_the_union.txt\") as f:\n", " state_of_the_union = f.read()\n", "texts = text_splitter.split_text(state_of_the_union)" ] diff --git a/docs/docs/integrations/llms/manifest.ipynb b/docs/docs/integrations/llms/manifest.ipynb index fbd2c4aedfb..6c8cbd9f954 100644 --- a/docs/docs/integrations/llms/manifest.ipynb +++ b/docs/docs/integrations/llms/manifest.ipynb @@ -116,7 +116,7 @@ } ], "source": [ - "with open(\"../../modules/state_of_the_union.txt\") as f:\n", + "with open(\"../../how_to/state_of_the_union.txt\") as f:\n", " state_of_the_union = f.read()\n", "mp_chain.run(state_of_the_union)" ] diff --git a/docs/docs/integrations/retrievers/azure_ai_search.ipynb b/docs/docs/integrations/retrievers/azure_ai_search.ipynb index 53745cb9731..6b2b32afb6b 100644 --- a/docs/docs/integrations/retrievers/azure_ai_search.ipynb +++ b/docs/docs/integrations/retrievers/azure_ai_search.ipynb @@ -213,7 +213,7 @@ "from langchain_community.document_loaders import TextLoader\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\", encoding=\"utf-8\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\", encoding=\"utf-8\")\n", "\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=400, chunk_overlap=0)\n", diff --git a/docs/docs/integrations/retrievers/cohere-reranker.ipynb b/docs/docs/integrations/retrievers/cohere-reranker.ipynb index 423086a1dfc..623869d02c9 100644 --- a/docs/docs/integrations/retrievers/cohere-reranker.ipynb +++ b/docs/docs/integrations/retrievers/cohere-reranker.ipynb @@ -306,7 +306,7 @@ "from langchain_community.vectorstores import FAISS\n", "from langchain_text_splitters import RecursiveCharacterTextSplitter\n", "\n", - "documents = TextLoader(\"../../modules/state_of_the_union.txt\").load()\n", + "documents = TextLoader(\"../../how_to/state_of_the_union.txt\").load()\n", "text_splitter = RecursiveCharacterTextSplitter(chunk_size=500, chunk_overlap=100)\n", "texts = text_splitter.split_documents(documents)\n", "retriever = FAISS.from_documents(texts, CohereEmbeddings()).as_retriever(\n", diff --git a/docs/docs/integrations/retrievers/flashrank-reranker.ipynb b/docs/docs/integrations/retrievers/flashrank-reranker.ipynb index 6c0517afe8f..722bafb6c62 100644 --- a/docs/docs/integrations/retrievers/flashrank-reranker.ipynb +++ b/docs/docs/integrations/retrievers/flashrank-reranker.ipynb @@ -317,7 +317,7 @@ "from langchain_text_splitters import RecursiveCharacterTextSplitter\n", "\n", "documents = TextLoader(\n", - " \"../../modules/state_of_the_union.txt\",\n", + " \"../../how_to/state_of_the_union.txt\",\n", ").load()\n", "text_splitter = RecursiveCharacterTextSplitter(chunk_size=500, chunk_overlap=100)\n", "texts = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/retrievers/jaguar.ipynb b/docs/docs/integrations/retrievers/jaguar.ipynb index e1b56d7732f..a13720987b3 100644 --- a/docs/docs/integrations/retrievers/jaguar.ipynb +++ b/docs/docs/integrations/retrievers/jaguar.ipynb @@ -62,7 +62,7 @@ "\"\"\" \n", "Load a text file into a set of documents \n", "\"\"\"\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=300)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/retrievers/kinetica.ipynb b/docs/docs/integrations/retrievers/kinetica.ipynb index 63f2fd16d5a..c045fb982a1 100644 --- a/docs/docs/integrations/retrievers/kinetica.ipynb +++ b/docs/docs/integrations/retrievers/kinetica.ipynb @@ -103,7 +103,7 @@ "metadata": {}, "outputs": [], "source": [ - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/retrievers/llmlingua.ipynb b/docs/docs/integrations/retrievers/llmlingua.ipynb index 5cac38d5c30..a6646547dc6 100644 --- a/docs/docs/integrations/retrievers/llmlingua.ipynb +++ b/docs/docs/integrations/retrievers/llmlingua.ipynb @@ -286,7 +286,7 @@ "from langchain_text_splitters import RecursiveCharacterTextSplitter\n", "\n", "documents = TextLoader(\n", - " \"../../modules/state_of_the_union.txt\",\n", + " \"../../how_to/state_of_the_union.txt\",\n", ").load()\n", "\n", "text_splitter = RecursiveCharacterTextSplitter(chunk_size=500, chunk_overlap=100)\n", diff --git a/docs/docs/integrations/retrievers/singlestoredb.ipynb b/docs/docs/integrations/retrievers/singlestoredb.ipynb index 68f9dd86978..7b9dc4c0837 100644 --- a/docs/docs/integrations/retrievers/singlestoredb.ipynb +++ b/docs/docs/integrations/retrievers/singlestoredb.ipynb @@ -55,7 +55,7 @@ "from langchain_openai import OpenAIEmbeddings\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/activeloop_deeplake.ipynb b/docs/docs/integrations/vectorstores/activeloop_deeplake.ipynb index 8aa95f1559e..770251137ff 100644 --- a/docs/docs/integrations/vectorstores/activeloop_deeplake.ipynb +++ b/docs/docs/integrations/vectorstores/activeloop_deeplake.ipynb @@ -78,7 +78,7 @@ "source": [ "from langchain_community.document_loaders import TextLoader\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", @@ -334,9 +334,9 @@ { "data": { "text/plain": [ - "[Document(page_content='Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. \\n\\nTonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. \\n\\nOne of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../modules/state_of_the_union.txt', 'year': 2013}),\n", - " Document(page_content='A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she’s been nominated, she’s received a broad range of support—from the Fraternal Order of Police to former judges appointed by Democrats and Republicans. \\n\\nAnd if we are to advance liberty and justice, we need to secure the Border and fix the immigration system. \\n\\nWe can do both. At our border, we’ve installed new technology like cutting-edge scanners to better detect drug smuggling. \\n\\nWe’ve set up joint patrols with Mexico and Guatemala to catch more human traffickers. \\n\\nWe’re putting in place dedicated immigration judges so families fleeing persecution and violence can have their cases heard faster. \\n\\nWe’re securing commitments and supporting partners in South and Central America to host more refugees and secure their own borders.', metadata={'source': '../../modules/state_of_the_union.txt', 'year': 2013}),\n", - " Document(page_content='Tonight, I’m announcing a crackdown on these companies overcharging American businesses and consumers. \\n\\nAnd as Wall Street firms take over more nursing homes, quality in those homes has gone down and costs have gone up. \\n\\nThat ends on my watch. \\n\\nMedicare is going to set higher standards for nursing homes and make sure your loved ones get the care they deserve and expect. \\n\\nWe’ll also cut costs and keep the economy going strong by giving workers a fair shot, provide more training and apprenticeships, hire them based on their skills not degrees. \\n\\nLet’s pass the Paycheck Fairness Act and paid leave. \\n\\nRaise the minimum wage to $15 an hour and extend the Child Tax Credit, so no one has to raise a family in poverty. \\n\\nLet’s increase Pell Grants and increase our historic support of HBCUs, and invest in what Jill—our First Lady who teaches full-time—calls America’s best-kept secret: community colleges.', metadata={'source': '../../modules/state_of_the_union.txt', 'year': 2013})]" + "[Document(page_content='Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. \\n\\nTonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. \\n\\nOne of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../how_to/state_of_the_union.txt', 'year': 2013}),\n", + " Document(page_content='A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she’s been nominated, she’s received a broad range of support—from the Fraternal Order of Police to former judges appointed by Democrats and Republicans. \\n\\nAnd if we are to advance liberty and justice, we need to secure the Border and fix the immigration system. \\n\\nWe can do both. At our border, we’ve installed new technology like cutting-edge scanners to better detect drug smuggling. \\n\\nWe’ve set up joint patrols with Mexico and Guatemala to catch more human traffickers. \\n\\nWe’re putting in place dedicated immigration judges so families fleeing persecution and violence can have their cases heard faster. \\n\\nWe’re securing commitments and supporting partners in South and Central America to host more refugees and secure their own borders.', metadata={'source': '../../how_to/state_of_the_union.txt', 'year': 2013}),\n", + " Document(page_content='Tonight, I’m announcing a crackdown on these companies overcharging American businesses and consumers. \\n\\nAnd as Wall Street firms take over more nursing homes, quality in those homes has gone down and costs have gone up. \\n\\nThat ends on my watch. \\n\\nMedicare is going to set higher standards for nursing homes and make sure your loved ones get the care they deserve and expect. \\n\\nWe’ll also cut costs and keep the economy going strong by giving workers a fair shot, provide more training and apprenticeships, hire them based on their skills not degrees. \\n\\nLet’s pass the Paycheck Fairness Act and paid leave. \\n\\nRaise the minimum wage to $15 an hour and extend the Child Tax Credit, so no one has to raise a family in poverty. \\n\\nLet’s increase Pell Grants and increase our historic support of HBCUs, and invest in what Jill—our First Lady who teaches full-time—calls America’s best-kept secret: community colleges.', metadata={'source': '../../how_to/state_of_the_union.txt', 'year': 2013})]" ] }, "execution_count": 11, @@ -367,10 +367,10 @@ { "data": { "text/plain": [ - "[Document(page_content='Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. \\n\\nTonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. \\n\\nOne of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../modules/state_of_the_union.txt', 'year': 2013}),\n", - " Document(page_content='A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she’s been nominated, she’s received a broad range of support—from the Fraternal Order of Police to former judges appointed by Democrats and Republicans. \\n\\nAnd if we are to advance liberty and justice, we need to secure the Border and fix the immigration system. \\n\\nWe can do both. At our border, we’ve installed new technology like cutting-edge scanners to better detect drug smuggling. \\n\\nWe’ve set up joint patrols with Mexico and Guatemala to catch more human traffickers. \\n\\nWe’re putting in place dedicated immigration judges so families fleeing persecution and violence can have their cases heard faster. \\n\\nWe’re securing commitments and supporting partners in South and Central America to host more refugees and secure their own borders.', metadata={'source': '../../modules/state_of_the_union.txt', 'year': 2013}),\n", - " Document(page_content='Tonight, I’m announcing a crackdown on these companies overcharging American businesses and consumers. \\n\\nAnd as Wall Street firms take over more nursing homes, quality in those homes has gone down and costs have gone up. \\n\\nThat ends on my watch. \\n\\nMedicare is going to set higher standards for nursing homes and make sure your loved ones get the care they deserve and expect. \\n\\nWe’ll also cut costs and keep the economy going strong by giving workers a fair shot, provide more training and apprenticeships, hire them based on their skills not degrees. \\n\\nLet’s pass the Paycheck Fairness Act and paid leave. \\n\\nRaise the minimum wage to $15 an hour and extend the Child Tax Credit, so no one has to raise a family in poverty. \\n\\nLet’s increase Pell Grants and increase our historic support of HBCUs, and invest in what Jill—our First Lady who teaches full-time—calls America’s best-kept secret: community colleges.', metadata={'source': '../../modules/state_of_the_union.txt', 'year': 2013}),\n", - " Document(page_content='And for our LGBTQ+ Americans, let’s finally get the bipartisan Equality Act to my desk. The onslaught of state laws targeting transgender Americans and their families is wrong. \\n\\nAs I said last year, especially to our younger transgender Americans, I will always have your back as your President, so you can be yourself and reach your God-given potential. \\n\\nWhile it often appears that we never agree, that isn’t true. I signed 80 bipartisan bills into law last year. From preventing government shutdowns to protecting Asian-Americans from still-too-common hate crimes to reforming military justice. \\n\\nAnd soon, we’ll strengthen the Violence Against Women Act that I first wrote three decades ago. It is important for us to show the nation that we can come together and do big things. \\n\\nSo tonight I’m offering a Unity Agenda for the Nation. Four big things we can do together. \\n\\nFirst, beat the opioid epidemic.', metadata={'source': '../../modules/state_of_the_union.txt', 'year': 2012})]" + "[Document(page_content='Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. \\n\\nTonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. \\n\\nOne of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../how_to/state_of_the_union.txt', 'year': 2013}),\n", + " Document(page_content='A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she’s been nominated, she’s received a broad range of support—from the Fraternal Order of Police to former judges appointed by Democrats and Republicans. \\n\\nAnd if we are to advance liberty and justice, we need to secure the Border and fix the immigration system. \\n\\nWe can do both. At our border, we’ve installed new technology like cutting-edge scanners to better detect drug smuggling. \\n\\nWe’ve set up joint patrols with Mexico and Guatemala to catch more human traffickers. \\n\\nWe’re putting in place dedicated immigration judges so families fleeing persecution and violence can have their cases heard faster. \\n\\nWe’re securing commitments and supporting partners in South and Central America to host more refugees and secure their own borders.', metadata={'source': '../../how_to/state_of_the_union.txt', 'year': 2013}),\n", + " Document(page_content='Tonight, I’m announcing a crackdown on these companies overcharging American businesses and consumers. \\n\\nAnd as Wall Street firms take over more nursing homes, quality in those homes has gone down and costs have gone up. \\n\\nThat ends on my watch. \\n\\nMedicare is going to set higher standards for nursing homes and make sure your loved ones get the care they deserve and expect. \\n\\nWe’ll also cut costs and keep the economy going strong by giving workers a fair shot, provide more training and apprenticeships, hire them based on their skills not degrees. \\n\\nLet’s pass the Paycheck Fairness Act and paid leave. \\n\\nRaise the minimum wage to $15 an hour and extend the Child Tax Credit, so no one has to raise a family in poverty. \\n\\nLet’s increase Pell Grants and increase our historic support of HBCUs, and invest in what Jill—our First Lady who teaches full-time—calls America’s best-kept secret: community colleges.', metadata={'source': '../../how_to/state_of_the_union.txt', 'year': 2013}),\n", + " Document(page_content='And for our LGBTQ+ Americans, let’s finally get the bipartisan Equality Act to my desk. The onslaught of state laws targeting transgender Americans and their families is wrong. \\n\\nAs I said last year, especially to our younger transgender Americans, I will always have your back as your President, so you can be yourself and reach your God-given potential. \\n\\nWhile it often appears that we never agree, that isn’t true. I signed 80 bipartisan bills into law last year. From preventing government shutdowns to protecting Asian-Americans from still-too-common hate crimes to reforming military justice. \\n\\nAnd soon, we’ll strengthen the Violence Against Women Act that I first wrote three decades ago. It is important for us to show the nation that we can come together and do big things. \\n\\nSo tonight I’m offering a Unity Agenda for the Nation. Four big things we can do together. \\n\\nFirst, beat the opioid epidemic.', metadata={'source': '../../how_to/state_of_the_union.txt', 'year': 2012})]" ] }, "execution_count": 12, @@ -400,10 +400,10 @@ { "data": { "text/plain": [ - "[Document(page_content='Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. \\n\\nTonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. \\n\\nOne of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../modules/state_of_the_union.txt', 'year': 2013}),\n", - " Document(page_content='Tonight, I’m announcing a crackdown on these companies overcharging American businesses and consumers. \\n\\nAnd as Wall Street firms take over more nursing homes, quality in those homes has gone down and costs have gone up. \\n\\nThat ends on my watch. \\n\\nMedicare is going to set higher standards for nursing homes and make sure your loved ones get the care they deserve and expect. \\n\\nWe’ll also cut costs and keep the economy going strong by giving workers a fair shot, provide more training and apprenticeships, hire them based on their skills not degrees. \\n\\nLet’s pass the Paycheck Fairness Act and paid leave. \\n\\nRaise the minimum wage to $15 an hour and extend the Child Tax Credit, so no one has to raise a family in poverty. \\n\\nLet’s increase Pell Grants and increase our historic support of HBCUs, and invest in what Jill—our First Lady who teaches full-time—calls America’s best-kept secret: community colleges.', metadata={'source': '../../modules/state_of_the_union.txt', 'year': 2013}),\n", - " Document(page_content='A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she’s been nominated, she’s received a broad range of support—from the Fraternal Order of Police to former judges appointed by Democrats and Republicans. \\n\\nAnd if we are to advance liberty and justice, we need to secure the Border and fix the immigration system. \\n\\nWe can do both. At our border, we’ve installed new technology like cutting-edge scanners to better detect drug smuggling. \\n\\nWe’ve set up joint patrols with Mexico and Guatemala to catch more human traffickers. \\n\\nWe’re putting in place dedicated immigration judges so families fleeing persecution and violence can have their cases heard faster. \\n\\nWe’re securing commitments and supporting partners in South and Central America to host more refugees and secure their own borders.', metadata={'source': '../../modules/state_of_the_union.txt', 'year': 2013}),\n", - " Document(page_content='And for our LGBTQ+ Americans, let’s finally get the bipartisan Equality Act to my desk. The onslaught of state laws targeting transgender Americans and their families is wrong. \\n\\nAs I said last year, especially to our younger transgender Americans, I will always have your back as your President, so you can be yourself and reach your God-given potential. \\n\\nWhile it often appears that we never agree, that isn’t true. I signed 80 bipartisan bills into law last year. From preventing government shutdowns to protecting Asian-Americans from still-too-common hate crimes to reforming military justice. \\n\\nAnd soon, we’ll strengthen the Violence Against Women Act that I first wrote three decades ago. It is important for us to show the nation that we can come together and do big things. \\n\\nSo tonight I’m offering a Unity Agenda for the Nation. Four big things we can do together. \\n\\nFirst, beat the opioid epidemic.', metadata={'source': '../../modules/state_of_the_union.txt', 'year': 2012})]" + "[Document(page_content='Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. \\n\\nTonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. \\n\\nOne of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../how_to/state_of_the_union.txt', 'year': 2013}),\n", + " Document(page_content='Tonight, I’m announcing a crackdown on these companies overcharging American businesses and consumers. \\n\\nAnd as Wall Street firms take over more nursing homes, quality in those homes has gone down and costs have gone up. \\n\\nThat ends on my watch. \\n\\nMedicare is going to set higher standards for nursing homes and make sure your loved ones get the care they deserve and expect. \\n\\nWe’ll also cut costs and keep the economy going strong by giving workers a fair shot, provide more training and apprenticeships, hire them based on their skills not degrees. \\n\\nLet’s pass the Paycheck Fairness Act and paid leave. \\n\\nRaise the minimum wage to $15 an hour and extend the Child Tax Credit, so no one has to raise a family in poverty. \\n\\nLet’s increase Pell Grants and increase our historic support of HBCUs, and invest in what Jill—our First Lady who teaches full-time—calls America’s best-kept secret: community colleges.', metadata={'source': '../../how_to/state_of_the_union.txt', 'year': 2013}),\n", + " Document(page_content='A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she’s been nominated, she’s received a broad range of support—from the Fraternal Order of Police to former judges appointed by Democrats and Republicans. \\n\\nAnd if we are to advance liberty and justice, we need to secure the Border and fix the immigration system. \\n\\nWe can do both. At our border, we’ve installed new technology like cutting-edge scanners to better detect drug smuggling. \\n\\nWe’ve set up joint patrols with Mexico and Guatemala to catch more human traffickers. \\n\\nWe’re putting in place dedicated immigration judges so families fleeing persecution and violence can have their cases heard faster. \\n\\nWe’re securing commitments and supporting partners in South and Central America to host more refugees and secure their own borders.', metadata={'source': '../../how_to/state_of_the_union.txt', 'year': 2013}),\n", + " Document(page_content='And for our LGBTQ+ Americans, let’s finally get the bipartisan Equality Act to my desk. The onslaught of state laws targeting transgender Americans and their families is wrong. \\n\\nAs I said last year, especially to our younger transgender Americans, I will always have your back as your President, so you can be yourself and reach your God-given potential. \\n\\nWhile it often appears that we never agree, that isn’t true. I signed 80 bipartisan bills into law last year. From preventing government shutdowns to protecting Asian-Americans from still-too-common hate crimes to reforming military justice. \\n\\nAnd soon, we’ll strengthen the Violence Against Women Act that I first wrote three decades ago. It is important for us to show the nation that we can come together and do big things. \\n\\nSo tonight I’m offering a Unity Agenda for the Nation. Four big things we can do together. \\n\\nFirst, beat the opioid epidemic.', metadata={'source': '../../how_to/state_of_the_union.txt', 'year': 2012})]" ] }, "execution_count": 13, diff --git a/docs/docs/integrations/vectorstores/analyticdb.ipynb b/docs/docs/integrations/vectorstores/analyticdb.ipynb index dc335d89f25..dc3404651a4 100644 --- a/docs/docs/integrations/vectorstores/analyticdb.ipynb +++ b/docs/docs/integrations/vectorstores/analyticdb.ipynb @@ -43,7 +43,7 @@ "source": [ "from langchain_community.document_loaders import TextLoader\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/annoy.ipynb b/docs/docs/integrations/vectorstores/annoy.ipynb index 470b2a02865..a98f9591f8c 100644 --- a/docs/docs/integrations/vectorstores/annoy.ipynb +++ b/docs/docs/integrations/vectorstores/annoy.ipynb @@ -151,7 +151,7 @@ "from langchain_community.document_loaders import TextLoader\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txtn.txtn.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txtn.txtn.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)" diff --git a/docs/docs/integrations/vectorstores/atlas.ipynb b/docs/docs/integrations/vectorstores/atlas.ipynb index 6f1950a1328..0887b4c03f5 100644 --- a/docs/docs/integrations/vectorstores/atlas.ipynb +++ b/docs/docs/integrations/vectorstores/atlas.ipynb @@ -103,7 +103,7 @@ }, "outputs": [], "source": [ - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = SpacyTextSplitter(separator=\"|\")\n", "texts = []\n", diff --git a/docs/docs/integrations/vectorstores/awadb.ipynb b/docs/docs/integrations/vectorstores/awadb.ipynb index 9df3cf8bab9..a7592e03c17 100644 --- a/docs/docs/integrations/vectorstores/awadb.ipynb +++ b/docs/docs/integrations/vectorstores/awadb.ipynb @@ -40,7 +40,7 @@ "metadata": {}, "outputs": [], "source": [ - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=100, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)" @@ -112,7 +112,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "(Document(page_content='And I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../modules/state_of_the_union.txt'}), 0.561813814013747)\n" + "(Document(page_content='And I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../how_to/state_of_the_union.txt'}), 0.561813814013747)\n" ] } ], diff --git a/docs/docs/integrations/vectorstores/azure_cosmos_db.ipynb b/docs/docs/integrations/vectorstores/azure_cosmos_db.ipynb index 5db035b51c5..db5daf7ec47 100644 --- a/docs/docs/integrations/vectorstores/azure_cosmos_db.ipynb +++ b/docs/docs/integrations/vectorstores/azure_cosmos_db.ipynb @@ -145,7 +145,7 @@ "from langchain_openai import OpenAIEmbeddings\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "SOURCE_FILE_NAME = \"../../modules/state_of_the_union.txt\"\n", + "SOURCE_FILE_NAME = \"../../how_to/state_of_the_union.txt\"\n", "\n", "loader = TextLoader(SOURCE_FILE_NAME)\n", "documents = loader.load()\n", diff --git a/docs/docs/integrations/vectorstores/azuresearch.ipynb b/docs/docs/integrations/vectorstores/azuresearch.ipynb index 65ddb5d4089..ffa429d9a80 100644 --- a/docs/docs/integrations/vectorstores/azuresearch.ipynb +++ b/docs/docs/integrations/vectorstores/azuresearch.ipynb @@ -237,7 +237,7 @@ "from langchain_community.document_loaders import TextLoader\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\", encoding=\"utf-8\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\", encoding=\"utf-8\")\n", "\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", @@ -303,13 +303,13 @@ "name": "stdout", "output_type": "stream", "text": [ - "[(Document(page_content='Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. \\n\\nTonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. \\n\\nOne of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../modules/state_of_the_union.txt'}),\n", + "[(Document(page_content='Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. \\n\\nTonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. \\n\\nOne of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../how_to/state_of_the_union.txt'}),\n", " 0.84402436),\n", - " (Document(page_content='A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she’s been nominated, she’s received a broad range of support—from the Fraternal Order of Police to former judges appointed by Democrats and Republicans. \\n\\nAnd if we are to advance liberty and justice, we need to secure the Border and fix the immigration system. \\n\\nWe can do both. At our border, we’ve installed new technology like cutting-edge scanners to better detect drug smuggling. \\n\\nWe’ve set up joint patrols with Mexico and Guatemala to catch more human traffickers. \\n\\nWe’re putting in place dedicated immigration judges so families fleeing persecution and violence can have their cases heard faster. \\n\\nWe’re securing commitments and supporting partners in South and Central America to host more refugees and secure their own borders.', metadata={'source': '../../modules/state_of_the_union.txt'}),\n", + " (Document(page_content='A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she’s been nominated, she’s received a broad range of support—from the Fraternal Order of Police to former judges appointed by Democrats and Republicans. \\n\\nAnd if we are to advance liberty and justice, we need to secure the Border and fix the immigration system. \\n\\nWe can do both. At our border, we’ve installed new technology like cutting-edge scanners to better detect drug smuggling. \\n\\nWe’ve set up joint patrols with Mexico and Guatemala to catch more human traffickers. \\n\\nWe’re putting in place dedicated immigration judges so families fleeing persecution and violence can have their cases heard faster. \\n\\nWe’re securing commitments and supporting partners in South and Central America to host more refugees and secure their own borders.', metadata={'source': '../../how_to/state_of_the_union.txt'}),\n", " 0.82128483),\n", - " (Document(page_content='And for our LGBTQ+ Americans, let’s finally get the bipartisan Equality Act to my desk. The onslaught of state laws targeting transgender Americans and their families is wrong. \\n\\nAs I said last year, especially to our younger transgender Americans, I will always have your back as your President, so you can be yourself and reach your God-given potential. \\n\\nWhile it often appears that we never agree, that isn’t true. I signed 80 bipartisan bills into law last year. From preventing government shutdowns to protecting Asian-Americans from still-too-common hate crimes to reforming military justice. \\n\\nAnd soon, we’ll strengthen the Violence Against Women Act that I first wrote three decades ago. It is important for us to show the nation that we can come together and do big things. \\n\\nSo tonight I’m offering a Unity Agenda for the Nation. Four big things we can do together. \\n\\nFirst, beat the opioid epidemic.', metadata={'source': '../../modules/state_of_the_union.txt'}),\n", + " (Document(page_content='And for our LGBTQ+ Americans, let’s finally get the bipartisan Equality Act to my desk. The onslaught of state laws targeting transgender Americans and their families is wrong. \\n\\nAs I said last year, especially to our younger transgender Americans, I will always have your back as your President, so you can be yourself and reach your God-given potential. \\n\\nWhile it often appears that we never agree, that isn’t true. I signed 80 bipartisan bills into law last year. From preventing government shutdowns to protecting Asian-Americans from still-too-common hate crimes to reforming military justice. \\n\\nAnd soon, we’ll strengthen the Violence Against Women Act that I first wrote three decades ago. It is important for us to show the nation that we can come together and do big things. \\n\\nSo tonight I’m offering a Unity Agenda for the Nation. Four big things we can do together. \\n\\nFirst, beat the opioid epidemic.', metadata={'source': '../../how_to/state_of_the_union.txt'}),\n", " 0.8151042),\n", - " (Document(page_content='Tonight, I’m announcing a crackdown on these companies overcharging American businesses and consumers. \\n\\nAnd as Wall Street firms take over more nursing homes, quality in those homes has gone down and costs have gone up. \\n\\nThat ends on my watch. \\n\\nMedicare is going to set higher standards for nursing homes and make sure your loved ones get the care they deserve and expect. \\n\\nWe’ll also cut costs and keep the economy going strong by giving workers a fair shot, provide more training and apprenticeships, hire them based on their skills not degrees. \\n\\nLet’s pass the Paycheck Fairness Act and paid leave. \\n\\nRaise the minimum wage to $15 an hour and extend the Child Tax Credit, so no one has to raise a family in poverty. \\n\\nLet’s increase Pell Grants and increase our historic support of HBCUs, and invest in what Jill—our First Lady who teaches full-time—calls America’s best-kept secret: community colleges.', metadata={'source': '../../modules/state_of_the_union.txt'}),\n", + " (Document(page_content='Tonight, I’m announcing a crackdown on these companies overcharging American businesses and consumers. \\n\\nAnd as Wall Street firms take over more nursing homes, quality in those homes has gone down and costs have gone up. \\n\\nThat ends on my watch. \\n\\nMedicare is going to set higher standards for nursing homes and make sure your loved ones get the care they deserve and expect. \\n\\nWe’ll also cut costs and keep the economy going strong by giving workers a fair shot, provide more training and apprenticeships, hire them based on their skills not degrees. \\n\\nLet’s pass the Paycheck Fairness Act and paid leave. \\n\\nRaise the minimum wage to $15 an hour and extend the Child Tax Credit, so no one has to raise a family in poverty. \\n\\nLet’s increase Pell Grants and increase our historic support of HBCUs, and invest in what Jill—our First Lady who teaches full-time—calls America’s best-kept secret: community colleges.', metadata={'source': '../../how_to/state_of_the_union.txt'}),\n", " 0.8148832)]\n" ] } diff --git a/docs/docs/integrations/vectorstores/bagel.ipynb b/docs/docs/integrations/vectorstores/bagel.ipynb index 3ab59d0deb2..c29f5847409 100644 --- a/docs/docs/integrations/vectorstores/bagel.ipynb +++ b/docs/docs/integrations/vectorstores/bagel.ipynb @@ -111,7 +111,7 @@ "from langchain_community.document_loaders import TextLoader\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)[:10]" diff --git a/docs/docs/integrations/vectorstores/bageldb.ipynb b/docs/docs/integrations/vectorstores/bageldb.ipynb index 795f1c85f8a..ed07db31c8b 100644 --- a/docs/docs/integrations/vectorstores/bageldb.ipynb +++ b/docs/docs/integrations/vectorstores/bageldb.ipynb @@ -111,7 +111,7 @@ "from langchain_community.document_loaders import TextLoader\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)[:10]" diff --git a/docs/docs/integrations/vectorstores/baiduvectordb.ipynb b/docs/docs/integrations/vectorstores/baiduvectordb.ipynb index e42c8d68830..63fe0cbbd40 100644 --- a/docs/docs/integrations/vectorstores/baiduvectordb.ipynb +++ b/docs/docs/integrations/vectorstores/baiduvectordb.ipynb @@ -50,7 +50,7 @@ "metadata": {}, "outputs": [], "source": [ - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/chroma.ipynb b/docs/docs/integrations/vectorstores/chroma.ipynb index 747abbebb82..72be3d5fd17 100644 --- a/docs/docs/integrations/vectorstores/chroma.ipynb +++ b/docs/docs/integrations/vectorstores/chroma.ipynb @@ -73,7 +73,7 @@ "from langchain_text_splitters import CharacterTextSplitter\n", "\n", "# load the document and split it into chunks\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "\n", "# split it into chunks\n", @@ -318,7 +318,7 @@ "\n", "# update the metadata for a document\n", "docs[0].metadata = {\n", - " \"source\": \"../../modules/state_of_the_union.txt\",\n", + " \"source\": \"../../how_to/state_of_the_union.txt\",\n", " \"new_value\": \"hello world\",\n", "}\n", "example_db.update_document(ids[0], docs[0])\n", diff --git a/docs/docs/integrations/vectorstores/clickhouse.ipynb b/docs/docs/integrations/vectorstores/clickhouse.ipynb index 9a2d3930f27..90527963b97 100644 --- a/docs/docs/integrations/vectorstores/clickhouse.ipynb +++ b/docs/docs/integrations/vectorstores/clickhouse.ipynb @@ -121,7 +121,7 @@ "source": [ "from langchain_community.document_loaders import TextLoader\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", @@ -306,7 +306,7 @@ "from langchain_community.document_loaders import TextLoader\n", "from langchain_community.vectorstores import Clickhouse, ClickhouseSettings\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/couchbase.ipynb b/docs/docs/integrations/vectorstores/couchbase.ipynb index 2f379951d81..76a4b398612 100644 --- a/docs/docs/integrations/vectorstores/couchbase.ipynb +++ b/docs/docs/integrations/vectorstores/couchbase.ipynb @@ -344,7 +344,7 @@ "from langchain.text_splitter import CharacterTextSplitter\n", "from langchain_community.document_loaders import TextLoader\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=500, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)" @@ -378,7 +378,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "page_content='One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.' metadata={'source': '../../modules/state_of_the_union.txt'}\n" + "page_content='One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.' metadata={'source': '../../how_to/state_of_the_union.txt'}\n" ] } ], @@ -407,7 +407,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "page_content='One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.' metadata={'source': '../../modules/state_of_the_union.txt'}\n", + "page_content='One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.' metadata={'source': '../../how_to/state_of_the_union.txt'}\n", "Score: 0.8211871385574341\n" ] } @@ -445,7 +445,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "page_content='One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.' metadata={'source': '../../modules/state_of_the_union.txt'}\n" + "page_content='One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.' metadata={'source': '../../how_to/state_of_the_union.txt'}\n" ] } ], @@ -489,7 +489,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "{'author': 'John Doe', 'date': '2016-01-01', 'rating': 2, 'source': '../../modules/state_of_the_union.txt'}\n" + "{'author': 'John Doe', 'date': '2016-01-01', 'rating': 2, 'source': '../../how_to/state_of_the_union.txt'}\n" ] } ], @@ -596,7 +596,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "page_content='He will never extinguish their love of freedom. He will never weaken the resolve of the free world. \\n\\nWe meet tonight in an America that has lived through two of the hardest years this nation has ever faced. \\n\\nThe pandemic has been punishing. \\n\\nAnd so many families are living paycheck to paycheck, struggling to keep up with the rising cost of food, gas, housing, and so much more. \\n\\nI understand.' metadata={'author': 'Jane Doe', 'date': '2017-01-01', 'rating': 3, 'source': '../../modules/state_of_the_union.txt'}\n" + "page_content='He will never extinguish their love of freedom. He will never weaken the resolve of the free world. \\n\\nWe meet tonight in an America that has lived through two of the hardest years this nation has ever faced. \\n\\nThe pandemic has been punishing. \\n\\nAnd so many families are living paycheck to paycheck, struggling to keep up with the rising cost of food, gas, housing, and so much more. \\n\\nI understand.' metadata={'author': 'Jane Doe', 'date': '2017-01-01', 'rating': 3, 'source': '../../how_to/state_of_the_union.txt'}\n" ] } ], @@ -636,7 +636,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "(Document(page_content='He will never extinguish their love of freedom. He will never weaken the resolve of the free world. \\n\\nWe meet tonight in an America that has lived through two of the hardest years this nation has ever faced. \\n\\nThe pandemic has been punishing. \\n\\nAnd so many families are living paycheck to paycheck, struggling to keep up with the rising cost of food, gas, housing, and so much more. \\n\\nI understand.', metadata={'author': 'Jane Doe', 'date': '2017-01-01', 'rating': 3, 'source': '../../modules/state_of_the_union.txt'}), 0.9000703597577832)\n" + "(Document(page_content='He will never extinguish their love of freedom. He will never weaken the resolve of the free world. \\n\\nWe meet tonight in an America that has lived through two of the hardest years this nation has ever faced. \\n\\nThe pandemic has been punishing. \\n\\nAnd so many families are living paycheck to paycheck, struggling to keep up with the rising cost of food, gas, housing, and so much more. \\n\\nI understand.', metadata={'author': 'Jane Doe', 'date': '2017-01-01', 'rating': 3, 'source': '../../how_to/state_of_the_union.txt'}), 0.9000703597577832)\n" ] } ], @@ -678,7 +678,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "(Document(page_content='He will never extinguish their love of freedom. He will never weaken the resolve of the free world. \\n\\nWe meet tonight in an America that has lived through two of the hardest years this nation has ever faced. \\n\\nThe pandemic has been punishing. \\n\\nAnd so many families are living paycheck to paycheck, struggling to keep up with the rising cost of food, gas, housing, and so much more. \\n\\nI understand.', metadata={'author': 'Jane Doe', 'date': '2017-01-01', 'rating': 3, 'source': '../../modules/state_of_the_union.txt'}), 1.3598770370389914)\n" + "(Document(page_content='He will never extinguish their love of freedom. He will never weaken the resolve of the free world. \\n\\nWe meet tonight in an America that has lived through two of the hardest years this nation has ever faced. \\n\\nThe pandemic has been punishing. \\n\\nAnd so many families are living paycheck to paycheck, struggling to keep up with the rising cost of food, gas, housing, and so much more. \\n\\nI understand.', metadata={'author': 'Jane Doe', 'date': '2017-01-01', 'rating': 3, 'source': '../../how_to/state_of_the_union.txt'}), 1.3598770370389914)\n" ] } ], diff --git a/docs/docs/integrations/vectorstores/dashvector.ipynb b/docs/docs/integrations/vectorstores/dashvector.ipynb index 1694ca2ae2d..adb4c8a420c 100644 --- a/docs/docs/integrations/vectorstores/dashvector.ipynb +++ b/docs/docs/integrations/vectorstores/dashvector.ipynb @@ -123,7 +123,7 @@ "source": [ "from langchain_community.document_loaders import TextLoader\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/databricks_vector_search.ipynb b/docs/docs/integrations/vectorstores/databricks_vector_search.ipynb index fa01ba052f0..50cc25b1119 100644 --- a/docs/docs/integrations/vectorstores/databricks_vector_search.ipynb +++ b/docs/docs/integrations/vectorstores/databricks_vector_search.ipynb @@ -63,7 +63,7 @@ "from langchain_openai import OpenAIEmbeddings\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/dingo.ipynb b/docs/docs/integrations/vectorstores/dingo.ipynb index 44e1c0616a6..72f5ac3f75d 100644 --- a/docs/docs/integrations/vectorstores/dingo.ipynb +++ b/docs/docs/integrations/vectorstores/dingo.ipynb @@ -85,7 +85,7 @@ "source": [ "from langchain_community.document_loaders import TextLoader\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/docarray_hnsw.ipynb b/docs/docs/integrations/vectorstores/docarray_hnsw.ipynb index 53e7211c444..63f8baecb52 100644 --- a/docs/docs/integrations/vectorstores/docarray_hnsw.ipynb +++ b/docs/docs/integrations/vectorstores/docarray_hnsw.ipynb @@ -88,7 +88,7 @@ }, "outputs": [], "source": [ - "documents = TextLoader(\"../../modules/state_of_the_union.txt\").load()\n", + "documents = TextLoader(\"../../how_to/state_of_the_union.txt\").load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", "\n", diff --git a/docs/docs/integrations/vectorstores/docarray_in_memory.ipynb b/docs/docs/integrations/vectorstores/docarray_in_memory.ipynb index ebb9ef9162e..81a4f49ec91 100644 --- a/docs/docs/integrations/vectorstores/docarray_in_memory.ipynb +++ b/docs/docs/integrations/vectorstores/docarray_in_memory.ipynb @@ -85,7 +85,7 @@ }, "outputs": [], "source": [ - "documents = TextLoader(\"../../modules/state_of_the_union.txt\").load()\n", + "documents = TextLoader(\"../../how_to/state_of_the_union.txt\").load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", "\n", diff --git a/docs/docs/integrations/vectorstores/documentdb.ipynb b/docs/docs/integrations/vectorstores/documentdb.ipynb index 577a5462cd7..7ac610f299c 100644 --- a/docs/docs/integrations/vectorstores/documentdb.ipynb +++ b/docs/docs/integrations/vectorstores/documentdb.ipynb @@ -150,7 +150,7 @@ " DocumentDBVectorSearch,\n", ")\n", "\n", - "SOURCE_FILE_NAME = \"../../modules/state_of_the_union.txt\"\n", + "SOURCE_FILE_NAME = \"../../how_to/state_of_the_union.txt\"\n", "\n", "loader = TextLoader(SOURCE_FILE_NAME)\n", "documents = loader.load()\n", diff --git a/docs/docs/integrations/vectorstores/duckdb.ipynb b/docs/docs/integrations/vectorstores/duckdb.ipynb index 6a62fe218fe..3be07eace0b 100644 --- a/docs/docs/integrations/vectorstores/duckdb.ipynb +++ b/docs/docs/integrations/vectorstores/duckdb.ipynb @@ -55,7 +55,7 @@ "from langchain.document_loaders import TextLoader\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "\n", "documents = CharacterTextSplitter().split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/elasticsearch.ipynb b/docs/docs/integrations/vectorstores/elasticsearch.ipynb index 2cf6b282426..6c1fccbdc49 100644 --- a/docs/docs/integrations/vectorstores/elasticsearch.ipynb +++ b/docs/docs/integrations/vectorstores/elasticsearch.ipynb @@ -219,7 +219,7 @@ "from langchain_community.document_loaders import TextLoader\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=500, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", @@ -240,7 +240,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "[Document(page_content='One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../modules/state_of_the_union.txt'}), Document(page_content='As I said last year, especially to our younger transgender Americans, I will always have your back as your President, so you can be yourself and reach your God-given potential. \\n\\nWhile it often appears that we never agree, that isn’t true. I signed 80 bipartisan bills into law last year. From preventing government shutdowns to protecting Asian-Americans from still-too-common hate crimes to reforming military justice.', metadata={'source': '../../modules/state_of_the_union.txt'}), Document(page_content='A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she’s been nominated, she’s received a broad range of support—from the Fraternal Order of Police to former judges appointed by Democrats and Republicans. \\n\\nAnd if we are to advance liberty and justice, we need to secure the Border and fix the immigration system.', metadata={'source': '../../modules/state_of_the_union.txt'}), Document(page_content='This is personal to me and Jill, to Kamala, and to so many of you. \\n\\nCancer is the #2 cause of death in America–second only to heart disease. \\n\\nLast month, I announced our plan to supercharge \\nthe Cancer Moonshot that President Obama asked me to lead six years ago. \\n\\nOur goal is to cut the cancer death rate by at least 50% over the next 25 years, turn more cancers from death sentences into treatable diseases. \\n\\nMore support for patients and families.', metadata={'source': '../../modules/state_of_the_union.txt'})]\n" + "[Document(page_content='One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../how_to/state_of_the_union.txt'}), Document(page_content='As I said last year, especially to our younger transgender Americans, I will always have your back as your President, so you can be yourself and reach your God-given potential. \\n\\nWhile it often appears that we never agree, that isn’t true. I signed 80 bipartisan bills into law last year. From preventing government shutdowns to protecting Asian-Americans from still-too-common hate crimes to reforming military justice.', metadata={'source': '../../how_to/state_of_the_union.txt'}), Document(page_content='A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she’s been nominated, she’s received a broad range of support—from the Fraternal Order of Police to former judges appointed by Democrats and Republicans. \\n\\nAnd if we are to advance liberty and justice, we need to secure the Border and fix the immigration system.', metadata={'source': '../../how_to/state_of_the_union.txt'}), Document(page_content='This is personal to me and Jill, to Kamala, and to so many of you. \\n\\nCancer is the #2 cause of death in America–second only to heart disease. \\n\\nLast month, I announced our plan to supercharge \\nthe Cancer Moonshot that President Obama asked me to lead six years ago. \\n\\nOur goal is to cut the cancer death rate by at least 50% over the next 25 years, turn more cancers from death sentences into treatable diseases. \\n\\nMore support for patients and families.', metadata={'source': '../../how_to/state_of_the_union.txt'})]\n" ] } ], @@ -279,7 +279,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "{'source': '../../modules/state_of_the_union.txt', 'date': '2016-01-01', 'rating': 2, 'author': 'John Doe'}\n" + "{'source': '../../how_to/state_of_the_union.txt', 'date': '2016-01-01', 'rating': 2, 'author': 'John Doe'}\n" ] } ], @@ -321,7 +321,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "{'source': '../../modules/state_of_the_union.txt', 'date': '2016-01-01', 'rating': 2, 'author': 'John Doe'}\n" + "{'source': '../../how_to/state_of_the_union.txt', 'date': '2016-01-01', 'rating': 2, 'author': 'John Doe'}\n" ] } ], @@ -353,7 +353,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "{'source': '../../modules/state_of_the_union.txt', 'date': '2016-01-01', 'rating': 2, 'author': 'John Doe'}\n" + "{'source': '../../how_to/state_of_the_union.txt', 'date': '2016-01-01', 'rating': 2, 'author': 'John Doe'}\n" ] } ], @@ -383,7 +383,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "{'source': '../../modules/state_of_the_union.txt', 'date': '2012-01-01', 'rating': 3, 'author': 'John Doe', 'geo_location': {'lat': 40.12, 'lon': -71.34}}\n" + "{'source': '../../how_to/state_of_the_union.txt', 'date': '2012-01-01', 'rating': 3, 'author': 'John Doe', 'geo_location': {'lat': 40.12, 'lon': -71.34}}\n" ] } ], @@ -413,7 +413,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "{'source': '../../modules/state_of_the_union.txt', 'date': '2012-01-01', 'rating': 3, 'author': 'John Doe', 'geo_location': {'lat': 40.12, 'lon': -71.34}}\n" + "{'source': '../../how_to/state_of_the_union.txt', 'date': '2012-01-01', 'rating': 3, 'author': 'John Doe', 'geo_location': {'lat': 40.12, 'lon': -71.34}}\n" ] } ], @@ -690,7 +690,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "page_content='One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.' metadata={'source': '../../modules/state_of_the_union.txt'}\n" + "page_content='One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.' metadata={'source': '../../how_to/state_of_the_union.txt'}\n" ] } ], @@ -806,7 +806,7 @@ "{'query': {'match': {'text': 'What did the president say about Ketanji Brown Jackson'}}}\n", "\n", "Results:\n", - "page_content='One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.' metadata={'source': '../../modules/state_of_the_union.txt'}\n" + "page_content='One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.' metadata={'source': '../../how_to/state_of_the_union.txt'}\n" ] } ], diff --git a/docs/docs/integrations/vectorstores/epsilla.ipynb b/docs/docs/integrations/vectorstores/epsilla.ipynb index b81d5b474eb..f8377859b34 100644 --- a/docs/docs/integrations/vectorstores/epsilla.ipynb +++ b/docs/docs/integrations/vectorstores/epsilla.ipynb @@ -70,7 +70,7 @@ "from langchain_community.document_loaders import TextLoader\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "\n", "documents = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0).split_documents(\n", diff --git a/docs/docs/integrations/vectorstores/faiss.ipynb b/docs/docs/integrations/vectorstores/faiss.ipynb index 27969437df2..3c569e4a985 100644 --- a/docs/docs/integrations/vectorstores/faiss.ipynb +++ b/docs/docs/integrations/vectorstores/faiss.ipynb @@ -104,7 +104,7 @@ "from langchain_openai import OpenAIEmbeddings\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", @@ -235,7 +235,7 @@ { "data": { "text/plain": [ - "(Document(page_content='Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. \\n\\nTonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. \\n\\nOne of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../modules/state_of_the_union.txt'}),\n", + "(Document(page_content='Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. \\n\\nTonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. \\n\\nOne of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../how_to/state_of_the_union.txt'}),\n", " 0.36913747)" ] }, diff --git a/docs/docs/integrations/vectorstores/hippo.ipynb b/docs/docs/integrations/vectorstores/hippo.ipynb index a6c30f100ba..dd2013edef5 100644 --- a/docs/docs/integrations/vectorstores/hippo.ipynb +++ b/docs/docs/integrations/vectorstores/hippo.ipynb @@ -133,7 +133,7 @@ "outputs": [], "source": [ "os.environ[\"OPENAI_API_KEY\"] = \"YOUR OPENAI KEY\"\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()" ] }, diff --git a/docs/docs/integrations/vectorstores/hologres.ipynb b/docs/docs/integrations/vectorstores/hologres.ipynb index 43a5cf91a56..31541f85e06 100644 --- a/docs/docs/integrations/vectorstores/hologres.ipynb +++ b/docs/docs/integrations/vectorstores/hologres.ipynb @@ -53,7 +53,7 @@ "source": [ "from langchain_community.document_loaders import TextLoader\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/jaguar.ipynb b/docs/docs/integrations/vectorstores/jaguar.ipynb index f12e5d2ca8c..0e520a0d299 100644 --- a/docs/docs/integrations/vectorstores/jaguar.ipynb +++ b/docs/docs/integrations/vectorstores/jaguar.ipynb @@ -67,7 +67,7 @@ "\"\"\" \n", "Load a text file into a set of documents \n", "\"\"\"\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=300)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/kinetica.ipynb b/docs/docs/integrations/vectorstores/kinetica.ipynb index c8a666f2497..7798418b9a6 100644 --- a/docs/docs/integrations/vectorstores/kinetica.ipynb +++ b/docs/docs/integrations/vectorstores/kinetica.ipynb @@ -130,7 +130,7 @@ "metadata": {}, "outputs": [], "source": [ - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", @@ -456,7 +456,7 @@ { "data": { "text/plain": [ - "(Document(page_content='A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she’s been nominated, she’s received a broad range of support—from the Fraternal Order of Police to former judges appointed by Democrats and Republicans. \\n\\nAnd if we are to advance liberty and justice, we need to secure the Border and fix the immigration system. \\n\\nWe can do both. At our border, we’ve installed new technology like cutting-edge scanners to better detect drug smuggling. \\n\\nWe’ve set up joint patrols with Mexico and Guatemala to catch more human traffickers. \\n\\nWe’re putting in place dedicated immigration judges so families fleeing persecution and violence can have their cases heard faster. \\n\\nWe’re securing commitments and supporting partners in South and Central America to host more refugees and secure their own borders.', metadata={'source': '../../modules/state_of_the_union.txt'}),\n", + "(Document(page_content='A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she’s been nominated, she’s received a broad range of support—from the Fraternal Order of Police to former judges appointed by Democrats and Republicans. \\n\\nAnd if we are to advance liberty and justice, we need to secure the Border and fix the immigration system. \\n\\nWe can do both. At our border, we’ve installed new technology like cutting-edge scanners to better detect drug smuggling. \\n\\nWe’ve set up joint patrols with Mexico and Guatemala to catch more human traffickers. \\n\\nWe’re putting in place dedicated immigration judges so families fleeing persecution and violence can have their cases heard faster. \\n\\nWe’re securing commitments and supporting partners in South and Central America to host more refugees and secure their own borders.', metadata={'source': '../../how_to/state_of_the_union.txt'}),\n", " 0.6946534514427185)" ] }, @@ -510,7 +510,7 @@ { "data": { "text/plain": [ - "(Document(page_content='A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she’s been nominated, she’s received a broad range of support—from the Fraternal Order of Police to former judges appointed by Democrats and Republicans. \\n\\nAnd if we are to advance liberty and justice, we need to secure the Border and fix the immigration system. \\n\\nWe can do both. At our border, we’ve installed new technology like cutting-edge scanners to better detect drug smuggling. \\n\\nWe’ve set up joint patrols with Mexico and Guatemala to catch more human traffickers. \\n\\nWe’re putting in place dedicated immigration judges so families fleeing persecution and violence can have their cases heard faster. \\n\\nWe’re securing commitments and supporting partners in South and Central America to host more refugees and secure their own borders.', metadata={'source': '../../modules/state_of_the_union.txt'}),\n", + "(Document(page_content='A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she’s been nominated, she’s received a broad range of support—from the Fraternal Order of Police to former judges appointed by Democrats and Republicans. \\n\\nAnd if we are to advance liberty and justice, we need to secure the Border and fix the immigration system. \\n\\nWe can do both. At our border, we’ve installed new technology like cutting-edge scanners to better detect drug smuggling. \\n\\nWe’ve set up joint patrols with Mexico and Guatemala to catch more human traffickers. \\n\\nWe’re putting in place dedicated immigration judges so families fleeing persecution and violence can have their cases heard faster. \\n\\nWe’re securing commitments and supporting partners in South and Central America to host more refugees and secure their own borders.', metadata={'source': '../../how_to/state_of_the_union.txt'}),\n", " 0.6946534514427185)" ] }, diff --git a/docs/docs/integrations/vectorstores/lancedb.ipynb b/docs/docs/integrations/vectorstores/lancedb.ipynb index bd67759b976..52a1b365795 100644 --- a/docs/docs/integrations/vectorstores/lancedb.ipynb +++ b/docs/docs/integrations/vectorstores/lancedb.ipynb @@ -67,7 +67,7 @@ "from langchain_openai import OpenAIEmbeddings\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "\n", "documents = CharacterTextSplitter().split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/lantern.ipynb b/docs/docs/integrations/vectorstores/lantern.ipynb index 2a8a54ef997..d1599a68900 100644 --- a/docs/docs/integrations/vectorstores/lantern.ipynb +++ b/docs/docs/integrations/vectorstores/lantern.ipynb @@ -125,7 +125,7 @@ }, "outputs": [], "source": [ - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", @@ -526,7 +526,7 @@ { "data": { "text/plain": [ - "(Document(page_content='And let’s pass the PRO Act when a majority of workers want to form a union—they shouldn’t be stopped. \\n\\nWhen we invest in our workers, when we build the economy from the bottom up and the middle out together, we can do something we haven’t done in a long time: build a better America. \\n\\nFor more than two years, COVID-19 has impacted every decision in our lives and the life of the nation. \\n\\nAnd I know you’re tired, frustrated, and exhausted. \\n\\nBut I also know this. \\n\\nBecause of the progress we’ve made, because of your resilience and the tools we have, tonight I can say \\nwe are moving forward safely, back to more normal routines. \\n\\nWe’ve reached a new moment in the fight against COVID-19, with severe cases down to a level not seen since last July. \\n\\nJust a few days ago, the Centers for Disease Control and Prevention—the CDC—issued new mask guidelines. \\n\\nUnder these new guidelines, most Americans in most of the country can now be mask free.', metadata={'source': '../../modules/state_of_the_union.txt'}),\n", + "(Document(page_content='And let’s pass the PRO Act when a majority of workers want to form a union—they shouldn’t be stopped. \\n\\nWhen we invest in our workers, when we build the economy from the bottom up and the middle out together, we can do something we haven’t done in a long time: build a better America. \\n\\nFor more than two years, COVID-19 has impacted every decision in our lives and the life of the nation. \\n\\nAnd I know you’re tired, frustrated, and exhausted. \\n\\nBut I also know this. \\n\\nBecause of the progress we’ve made, because of your resilience and the tools we have, tonight I can say \\nwe are moving forward safely, back to more normal routines. \\n\\nWe’ve reached a new moment in the fight against COVID-19, with severe cases down to a level not seen since last July. \\n\\nJust a few days ago, the Centers for Disease Control and Prevention—the CDC—issued new mask guidelines. \\n\\nUnder these new guidelines, most Americans in most of the country can now be mask free.', metadata={'source': '../../how_to/state_of_the_union.txt'}),\n", " 0.24038416)" ] }, @@ -581,7 +581,7 @@ { "data": { "text/plain": [ - "(Document(page_content='And let’s pass the PRO Act when a majority of workers want to form a union—they shouldn’t be stopped. \\n\\nWhen we invest in our workers, when we build the economy from the bottom up and the middle out together, we can do something we haven’t done in a long time: build a better America. \\n\\nFor more than two years, COVID-19 has impacted every decision in our lives and the life of the nation. \\n\\nAnd I know you’re tired, frustrated, and exhausted. \\n\\nBut I also know this. \\n\\nBecause of the progress we’ve made, because of your resilience and the tools we have, tonight I can say \\nwe are moving forward safely, back to more normal routines. \\n\\nWe’ve reached a new moment in the fight against COVID-19, with severe cases down to a level not seen since last July. \\n\\nJust a few days ago, the Centers for Disease Control and Prevention—the CDC—issued new mask guidelines. \\n\\nUnder these new guidelines, most Americans in most of the country can now be mask free.', metadata={'source': '../../modules/state_of_the_union.txt'}),\n", + "(Document(page_content='And let’s pass the PRO Act when a majority of workers want to form a union—they shouldn’t be stopped. \\n\\nWhen we invest in our workers, when we build the economy from the bottom up and the middle out together, we can do something we haven’t done in a long time: build a better America. \\n\\nFor more than two years, COVID-19 has impacted every decision in our lives and the life of the nation. \\n\\nAnd I know you’re tired, frustrated, and exhausted. \\n\\nBut I also know this. \\n\\nBecause of the progress we’ve made, because of your resilience and the tools we have, tonight I can say \\nwe are moving forward safely, back to more normal routines. \\n\\nWe’ve reached a new moment in the fight against COVID-19, with severe cases down to a level not seen since last July. \\n\\nJust a few days ago, the Centers for Disease Control and Prevention—the CDC—issued new mask guidelines. \\n\\nUnder these new guidelines, most Americans in most of the country can now be mask free.', metadata={'source': '../../how_to/state_of_the_union.txt'}),\n", " 0.2403456)" ] }, diff --git a/docs/docs/integrations/vectorstores/marqo.ipynb b/docs/docs/integrations/vectorstores/marqo.ipynb index bb1abe10d14..879661fc697 100644 --- a/docs/docs/integrations/vectorstores/marqo.ipynb +++ b/docs/docs/integrations/vectorstores/marqo.ipynb @@ -52,7 +52,7 @@ "source": [ "from langchain_community.document_loaders import TextLoader\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)" @@ -489,7 +489,7 @@ "metadata": {}, "outputs": [], "source": [ - "with open(\"../../modules/state_of_the_union.txt\") as f:\n", + "with open(\"../../how_to/state_of_the_union.txt\") as f:\n", " state_of_the_union = f.read()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "texts = text_splitter.split_text(state_of_the_union)" diff --git a/docs/docs/integrations/vectorstores/meilisearch.ipynb b/docs/docs/integrations/vectorstores/meilisearch.ipynb index 58ed11a5681..97c8d5cade4 100644 --- a/docs/docs/integrations/vectorstores/meilisearch.ipynb +++ b/docs/docs/integrations/vectorstores/meilisearch.ipynb @@ -146,7 +146,7 @@ "metadata": {}, "outputs": [], "source": [ - "with open(\"../../modules/state_of_the_union.txt\") as f:\n", + "with open(\"../../how_to/state_of_the_union.txt\") as f:\n", " state_of_the_union = f.read()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "texts = text_splitter.split_text(state_of_the_union)" @@ -189,7 +189,7 @@ "from langchain_community.document_loaders import TextLoader\n", "\n", "# Load text\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "\n", diff --git a/docs/docs/integrations/vectorstores/milvus.ipynb b/docs/docs/integrations/vectorstores/milvus.ipynb index 33677534a86..48283001f7a 100644 --- a/docs/docs/integrations/vectorstores/milvus.ipynb +++ b/docs/docs/integrations/vectorstores/milvus.ipynb @@ -83,7 +83,7 @@ "source": [ "from langchain_community.document_loaders import TextLoader\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/momento_vector_index.ipynb b/docs/docs/integrations/vectorstores/momento_vector_index.ipynb index b987baf9c30..50990c5f400 100644 --- a/docs/docs/integrations/vectorstores/momento_vector_index.ipynb +++ b/docs/docs/integrations/vectorstores/momento_vector_index.ipynb @@ -177,7 +177,7 @@ } ], "source": [ - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "len(documents)" ] diff --git a/docs/docs/integrations/vectorstores/myscale.ipynb b/docs/docs/integrations/vectorstores/myscale.ipynb index 77ed9aa4686..760a55b4620 100644 --- a/docs/docs/integrations/vectorstores/myscale.ipynb +++ b/docs/docs/integrations/vectorstores/myscale.ipynb @@ -115,7 +115,7 @@ "source": [ "from langchain_community.document_loaders import TextLoader\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", @@ -222,7 +222,7 @@ "from langchain_community.document_loaders import TextLoader\n", "from langchain_community.vectorstores import MyScale\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/neo4jvector.ipynb b/docs/docs/integrations/vectorstores/neo4jvector.ipynb index 9f076b2b1af..c18fe20e3ff 100644 --- a/docs/docs/integrations/vectorstores/neo4jvector.ipynb +++ b/docs/docs/integrations/vectorstores/neo4jvector.ipynb @@ -86,7 +86,7 @@ "metadata": {}, "outputs": [], "source": [ - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", @@ -728,7 +728,7 @@ { "data": { "text/plain": [ - "Document(page_content='Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. \\n\\nTonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. \\n\\nOne of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../modules/state_of_the_union.txt'})" + "Document(page_content='Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. \\n\\nTonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. \\n\\nOne of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../how_to/state_of_the_union.txt'})" ] }, "execution_count": 26, @@ -780,7 +780,7 @@ "data": { "text/plain": [ "{'answer': 'The president honored Justice Stephen Breyer for his service to the country and mentioned his retirement from the United States Supreme Court.\\n',\n", - " 'sources': '../../modules/state_of_the_union.txt'}" + " 'sources': '../../how_to/state_of_the_union.txt'}" ] }, "execution_count": 29, diff --git a/docs/docs/integrations/vectorstores/opensearch.ipynb b/docs/docs/integrations/vectorstores/opensearch.ipynb index a63920bd75c..e377273ebe8 100644 --- a/docs/docs/integrations/vectorstores/opensearch.ipynb +++ b/docs/docs/integrations/vectorstores/opensearch.ipynb @@ -83,7 +83,7 @@ "source": [ "from langchain_community.document_loaders import TextLoader\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/pgvecto_rs.ipynb b/docs/docs/integrations/vectorstores/pgvecto_rs.ipynb index 4f9e6155244..8771b0d88a6 100644 --- a/docs/docs/integrations/vectorstores/pgvecto_rs.ipynb +++ b/docs/docs/integrations/vectorstores/pgvecto_rs.ipynb @@ -39,7 +39,7 @@ "metadata": {}, "outputs": [], "source": [ - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", @@ -196,7 +196,7 @@ "\n", "query = \"What did the president say about Ketanji Brown Jackson\"\n", "docs: List[Document] = db1.similarity_search(\n", - " query, k=4, filter=meta_contains({\"source\": \"../../modules/state_of_the_union.txt\"})\n", + " query, k=4, filter=meta_contains({\"source\": \"../../how_to/state_of_the_union.txt\"})\n", ")\n", "\n", "for doc in docs:\n", @@ -219,7 +219,7 @@ "source": [ "query = \"What did the president say about Ketanji Brown Jackson\"\n", "docs: List[Document] = db1.similarity_search(\n", - " query, k=4, filter={\"source\": \"../../modules/state_of_the_union.txt\"}\n", + " query, k=4, filter={\"source\": \"../../how_to/state_of_the_union.txt\"}\n", ")\n", "\n", "for doc in docs:\n", diff --git a/docs/docs/integrations/vectorstores/pinecone.ipynb b/docs/docs/integrations/vectorstores/pinecone.ipynb index 2877ebd0044..4e4a479843d 100644 --- a/docs/docs/integrations/vectorstores/pinecone.ipynb +++ b/docs/docs/integrations/vectorstores/pinecone.ipynb @@ -64,7 +64,7 @@ "from langchain_openai import OpenAIEmbeddings\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/qdrant.ipynb b/docs/docs/integrations/vectorstores/qdrant.ipynb index 1f86779f457..c256510526d 100644 --- a/docs/docs/integrations/vectorstores/qdrant.ipynb +++ b/docs/docs/integrations/vectorstores/qdrant.ipynb @@ -97,7 +97,7 @@ }, "outputs": [], "source": [ - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/relyt.ipynb b/docs/docs/integrations/vectorstores/relyt.ipynb index b6956f5a449..4692e06b027 100644 --- a/docs/docs/integrations/vectorstores/relyt.ipynb +++ b/docs/docs/integrations/vectorstores/relyt.ipynb @@ -52,7 +52,7 @@ "metadata": {}, "outputs": [], "source": [ - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/rockset.ipynb b/docs/docs/integrations/vectorstores/rockset.ipynb index 1c494079298..8d1f5bf147b 100644 --- a/docs/docs/integrations/vectorstores/rockset.ipynb +++ b/docs/docs/integrations/vectorstores/rockset.ipynb @@ -113,7 +113,7 @@ "from langchain_openai import OpenAIEmbeddings\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)" diff --git a/docs/docs/integrations/vectorstores/sap_hanavector.ipynb b/docs/docs/integrations/vectorstores/sap_hanavector.ipynb index 37f9c86ecc6..e364d9e5f04 100644 --- a/docs/docs/integrations/vectorstores/sap_hanavector.ipynb +++ b/docs/docs/integrations/vectorstores/sap_hanavector.ipynb @@ -115,7 +115,7 @@ "from langchain_openai import OpenAIEmbeddings\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "text_documents = TextLoader(\"../../modules/state_of_the_union.txt\").load()\n", + "text_documents = TextLoader(\"../../how_to/state_of_the_union.txt\").load()\n", "text_splitter = CharacterTextSplitter(chunk_size=500, chunk_overlap=0)\n", "text_chunks = text_splitter.split_documents(text_documents)\n", "print(f\"Number of document chunks: {len(text_chunks)}\")\n", diff --git a/docs/docs/integrations/vectorstores/semadb.ipynb b/docs/docs/integrations/vectorstores/semadb.ipynb index 597b7fa1029..77f4c777b1d 100644 --- a/docs/docs/integrations/vectorstores/semadb.ipynb +++ b/docs/docs/integrations/vectorstores/semadb.ipynb @@ -64,7 +64,7 @@ "from langchain_community.document_loaders import TextLoader\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=400, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", @@ -221,7 +221,7 @@ { "data": { "text/plain": [ - "(Document(page_content='And I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../modules/state_of_the_union.txt', 'text': 'And I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.'}),\n", + "(Document(page_content='And I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'source': '../../how_to/state_of_the_union.txt', 'text': 'And I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.'}),\n", " 0.42369342)" ] }, diff --git a/docs/docs/integrations/vectorstores/sklearn.ipynb b/docs/docs/integrations/vectorstores/sklearn.ipynb index 740ebfa9724..66a16d31d60 100644 --- a/docs/docs/integrations/vectorstores/sklearn.ipynb +++ b/docs/docs/integrations/vectorstores/sklearn.ipynb @@ -65,7 +65,7 @@ "from langchain_openai import OpenAIEmbeddings\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/sqlitevss.ipynb b/docs/docs/integrations/vectorstores/sqlitevss.ipynb index c53d6f8730a..03b30e347fd 100644 --- a/docs/docs/integrations/vectorstores/sqlitevss.ipynb +++ b/docs/docs/integrations/vectorstores/sqlitevss.ipynb @@ -77,7 +77,7 @@ "from langchain_text_splitters import CharacterTextSplitter\n", "\n", "# load the document and split it into chunks\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "\n", "# split it into chunks\n", @@ -154,7 +154,7 @@ "from langchain_text_splitters import CharacterTextSplitter\n", "\n", "# load the document and split it into chunks\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "\n", "# split it into chunks\n", diff --git a/docs/docs/integrations/vectorstores/supabase.ipynb b/docs/docs/integrations/vectorstores/supabase.ipynb index 34d43f8a8b1..e13d11e5ab6 100644 --- a/docs/docs/integrations/vectorstores/supabase.ipynb +++ b/docs/docs/integrations/vectorstores/supabase.ipynb @@ -186,7 +186,7 @@ "from langchain_community.document_loaders import TextLoader\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)" diff --git a/docs/docs/integrations/vectorstores/surrealdb.ipynb b/docs/docs/integrations/vectorstores/surrealdb.ipynb index 9da27930cc5..3f7dd5ed64d 100644 --- a/docs/docs/integrations/vectorstores/surrealdb.ipynb +++ b/docs/docs/integrations/vectorstores/surrealdb.ipynb @@ -88,7 +88,7 @@ }, "outputs": [], "source": [ - "documents = TextLoader(\"../../modules/state_of_the_union.txt\").load()\n", + "documents = TextLoader(\"../../how_to/state_of_the_union.txt\").load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", "\n", @@ -263,7 +263,7 @@ { "data": { "text/plain": [ - "(Document(page_content='Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. \\n\\nTonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. \\n\\nOne of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'id': 'documents:slgdlhjkfknhqo15xz0w', 'source': '../../modules/state_of_the_union.txt'}),\n", + "(Document(page_content='Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections. \\n\\nTonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service. \\n\\nOne of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court. \\n\\nAnd I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.', metadata={'id': 'documents:slgdlhjkfknhqo15xz0w', 'source': '../../how_to/state_of_the_union.txt'}),\n", " 0.39839531721941895)" ] }, diff --git a/docs/docs/integrations/vectorstores/tair.ipynb b/docs/docs/integrations/vectorstores/tair.ipynb index 090bce30e64..ad0f066256d 100644 --- a/docs/docs/integrations/vectorstores/tair.ipynb +++ b/docs/docs/integrations/vectorstores/tair.ipynb @@ -33,7 +33,7 @@ "source": [ "from langchain_community.document_loaders import TextLoader\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/tencentvectordb.ipynb b/docs/docs/integrations/vectorstores/tencentvectordb.ipynb index af679022d4a..bdd646a4b67 100644 --- a/docs/docs/integrations/vectorstores/tencentvectordb.ipynb +++ b/docs/docs/integrations/vectorstores/tencentvectordb.ipynb @@ -64,7 +64,7 @@ }, "outputs": [], "source": [ - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)" diff --git a/docs/docs/integrations/vectorstores/tidb_vector.ipynb b/docs/docs/integrations/vectorstores/tidb_vector.ipynb index b9337ec1c25..e8ca6c7c82e 100644 --- a/docs/docs/integrations/vectorstores/tidb_vector.ipynb +++ b/docs/docs/integrations/vectorstores/tidb_vector.ipynb @@ -89,7 +89,7 @@ "metadata": {}, "outputs": [], "source": [ - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/tiledb.ipynb b/docs/docs/integrations/vectorstores/tiledb.ipynb index 2fe5a868a8d..a81608e34dd 100644 --- a/docs/docs/integrations/vectorstores/tiledb.ipynb +++ b/docs/docs/integrations/vectorstores/tiledb.ipynb @@ -48,7 +48,7 @@ "from langchain_community.vectorstores import TileDB\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "raw_documents = TextLoader(\"../../modules/state_of_the_union.txt\").load()\n", + "raw_documents = TextLoader(\"../../how_to/state_of_the_union.txt\").load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "documents = text_splitter.split_documents(raw_documents)\n", "embeddings = HuggingFaceEmbeddings()\n", diff --git a/docs/docs/integrations/vectorstores/typesense.ipynb b/docs/docs/integrations/vectorstores/typesense.ipynb index 892409bfd38..77726f1cbb9 100644 --- a/docs/docs/integrations/vectorstores/typesense.ipynb +++ b/docs/docs/integrations/vectorstores/typesense.ipynb @@ -112,7 +112,7 @@ }, "outputs": [], "source": [ - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/upstash.ipynb b/docs/docs/integrations/vectorstores/upstash.ipynb index 95da0ab26ff..d0e44efa709 100644 --- a/docs/docs/integrations/vectorstores/upstash.ipynb +++ b/docs/docs/integrations/vectorstores/upstash.ipynb @@ -93,9 +93,9 @@ { "data": { "text/plain": [ - "[Document(page_content='Madam Speaker, Madam Vice President, our First Lady and Second Gentleman. Members of Congress and the Cabinet. Justices of the Supreme Court. My fellow Americans. \\n\\nLast year COVID-19 kept us apart. This year we are finally together again. \\n\\nTonight, we meet as Democrats Republicans and Independents. But most importantly as Americans. \\n\\nWith a duty to one another to the American people to the Constitution. \\n\\nAnd with an unwavering resolve that freedom will always triumph over tyranny. \\n\\nSix days ago, Russia’s Vladimir Putin sought to shake the foundations of the free world thinking he could make it bend to his menacing ways. But he badly miscalculated. \\n\\nHe thought he could roll into Ukraine and the world would roll over. Instead he met a wall of strength he never imagined. \\n\\nHe met the Ukrainian people. \\n\\nFrom President Zelenskyy to every Ukrainian, their fearlessness, their courage, their determination, inspires the world.', metadata={'source': '../../modules/state_of_the_union.txt'}),\n", - " Document(page_content='Groups of citizens blocking tanks with their bodies. Everyone from students to retirees teachers turned soldiers defending their homeland. \\n\\nIn this struggle as President Zelenskyy said in his speech to the European Parliament “Light will win over darkness.” The Ukrainian Ambassador to the United States is here tonight. \\n\\nLet each of us here tonight in this Chamber send an unmistakable signal to Ukraine and to the world. \\n\\nPlease rise if you are able and show that, Yes, we the United States of America stand with the Ukrainian people. \\n\\nThroughout our history we’ve learned this lesson when dictators do not pay a price for their aggression they cause more chaos. \\n\\nThey keep moving. \\n\\nAnd the costs and the threats to America and the world keep rising. \\n\\nThat’s why the NATO Alliance was created to secure peace and stability in Europe after World War 2. \\n\\nThe United States is a member along with 29 other nations. \\n\\nIt matters. American diplomacy matters. American resolve matters.', metadata={'source': '../../modules/state_of_the_union.txt'}),\n", - " Document(page_content='Putin’s latest attack on Ukraine was premeditated and unprovoked. \\n\\nHe rejected repeated efforts at diplomacy. \\n\\nHe thought the West and NATO wouldn’t respond. And he thought he could divide us at home. Putin was wrong. We were ready. Here is what we did. \\n\\nWe prepared extensively and carefully. \\n\\nWe spent months building a coalition of other freedom-loving nations from Europe and the Americas to Asia and Africa to confront Putin. \\n\\nI spent countless hours unifying our European allies. We shared with the world in advance what we knew Putin was planning and precisely how he would try to falsely justify his aggression. \\n\\nWe countered Russia’s lies with truth. \\n\\nAnd now that he has acted the free world is holding him accountable. \\n\\nAlong with twenty-seven members of the European Union including France, Germany, Italy, as well as countries like the United Kingdom, Canada, Japan, Korea, Australia, New Zealand, and many others, even Switzerland.', metadata={'source': '../../modules/state_of_the_union.txt'})]" + "[Document(page_content='Madam Speaker, Madam Vice President, our First Lady and Second Gentleman. Members of Congress and the Cabinet. Justices of the Supreme Court. My fellow Americans. \\n\\nLast year COVID-19 kept us apart. This year we are finally together again. \\n\\nTonight, we meet as Democrats Republicans and Independents. But most importantly as Americans. \\n\\nWith a duty to one another to the American people to the Constitution. \\n\\nAnd with an unwavering resolve that freedom will always triumph over tyranny. \\n\\nSix days ago, Russia’s Vladimir Putin sought to shake the foundations of the free world thinking he could make it bend to his menacing ways. But he badly miscalculated. \\n\\nHe thought he could roll into Ukraine and the world would roll over. Instead he met a wall of strength he never imagined. \\n\\nHe met the Ukrainian people. \\n\\nFrom President Zelenskyy to every Ukrainian, their fearlessness, their courage, their determination, inspires the world.', metadata={'source': '../../how_to/state_of_the_union.txt'}),\n", + " Document(page_content='Groups of citizens blocking tanks with their bodies. Everyone from students to retirees teachers turned soldiers defending their homeland. \\n\\nIn this struggle as President Zelenskyy said in his speech to the European Parliament “Light will win over darkness.” The Ukrainian Ambassador to the United States is here tonight. \\n\\nLet each of us here tonight in this Chamber send an unmistakable signal to Ukraine and to the world. \\n\\nPlease rise if you are able and show that, Yes, we the United States of America stand with the Ukrainian people. \\n\\nThroughout our history we’ve learned this lesson when dictators do not pay a price for their aggression they cause more chaos. \\n\\nThey keep moving. \\n\\nAnd the costs and the threats to America and the world keep rising. \\n\\nThat’s why the NATO Alliance was created to secure peace and stability in Europe after World War 2. \\n\\nThe United States is a member along with 29 other nations. \\n\\nIt matters. American diplomacy matters. American resolve matters.', metadata={'source': '../../how_to/state_of_the_union.txt'}),\n", + " Document(page_content='Putin’s latest attack on Ukraine was premeditated and unprovoked. \\n\\nHe rejected repeated efforts at diplomacy. \\n\\nHe thought the West and NATO wouldn’t respond. And he thought he could divide us at home. Putin was wrong. We were ready. Here is what we did. \\n\\nWe prepared extensively and carefully. \\n\\nWe spent months building a coalition of other freedom-loving nations from Europe and the Americas to Asia and Africa to confront Putin. \\n\\nI spent countless hours unifying our European allies. We shared with the world in advance what we knew Putin was planning and precisely how he would try to falsely justify his aggression. \\n\\nWe countered Russia’s lies with truth. \\n\\nAnd now that he has acted the free world is holding him accountable. \\n\\nAlong with twenty-seven members of the European Union including France, Germany, Italy, as well as countries like the United Kingdom, Canada, Japan, Korea, Australia, New Zealand, and many others, even Switzerland.', metadata={'source': '../../how_to/state_of_the_union.txt'})]" ] }, "execution_count": 17, @@ -107,7 +107,7 @@ "from langchain.text_splitter import CharacterTextSplitter\n", "from langchain_community.document_loaders import TextLoader\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", @@ -222,11 +222,11 @@ { "data": { "text/plain": [ - "[Document(page_content='And my report is this: the State of the Union is strong—because you, the American people, are strong. \\n\\nWe are stronger today than we were a year ago. \\n\\nAnd we will be stronger a year from now than we are today. \\n\\nNow is our moment to meet and overcome the challenges of our time. \\n\\nAnd we will, as one people. \\n\\nOne America. \\n\\nThe United States of America. \\n\\nMay God bless you all. May God protect our troops.', metadata={'source': '../../modules/state_of_the_union.txt'}),\n", - " Document(page_content='And built the strongest, freest, and most prosperous nation the world has ever known. \\n\\nNow is the hour. \\n\\nOur moment of responsibility. \\n\\nOur test of resolve and conscience, of history itself. \\n\\nIt is in this moment that our character is formed. Our purpose is found. Our future is forged. \\n\\nWell I know this nation. \\n\\nWe will meet the test. \\n\\nTo protect freedom and liberty, to expand fairness and opportunity. \\n\\nWe will save democracy. \\n\\nAs hard as these times have been, I am more optimistic about America today than I have been my whole life. \\n\\nBecause I see the future that is within our grasp. \\n\\nBecause I know there is simply nothing beyond our capacity. \\n\\nWe are the only nation on Earth that has always turned every crisis we have faced into an opportunity. \\n\\nThe only nation that can be defined by a single word: possibilities. \\n\\nSo on this night, in our 245th year as a nation, I have come to report on the State of the Union.', metadata={'source': '../../modules/state_of_the_union.txt'}),\n", - " Document(page_content='Groups of citizens blocking tanks with their bodies. Everyone from students to retirees teachers turned soldiers defending their homeland. \\n\\nIn this struggle as President Zelenskyy said in his speech to the European Parliament “Light will win over darkness.” The Ukrainian Ambassador to the United States is here tonight. \\n\\nLet each of us here tonight in this Chamber send an unmistakable signal to Ukraine and to the world. \\n\\nPlease rise if you are able and show that, Yes, we the United States of America stand with the Ukrainian people. \\n\\nThroughout our history we’ve learned this lesson when dictators do not pay a price for their aggression they cause more chaos. \\n\\nThey keep moving. \\n\\nAnd the costs and the threats to America and the world keep rising. \\n\\nThat’s why the NATO Alliance was created to secure peace and stability in Europe after World War 2. \\n\\nThe United States is a member along with 29 other nations. \\n\\nIt matters. American diplomacy matters. American resolve matters.', metadata={'source': '../../modules/state_of_the_union.txt'}),\n", - " Document(page_content='When we use taxpayer dollars to rebuild America – we are going to Buy American: buy American products to support American jobs. \\n\\nThe federal government spends about $600 Billion a year to keep the country safe and secure. \\n\\nThere’s been a law on the books for almost a century \\nto make sure taxpayers’ dollars support American jobs and businesses. \\n\\nEvery Administration says they’ll do it, but we are actually doing it. \\n\\nWe will buy American to make sure everything from the deck of an aircraft carrier to the steel on highway guardrails are made in America. \\n\\nBut to compete for the best jobs of the future, we also need to level the playing field with China and other competitors. \\n\\nThat’s why it is so important to pass the Bipartisan Innovation Act sitting in Congress that will make record investments in emerging technologies and American manufacturing. \\n\\nLet me give you one example of why it’s so important to pass it.', metadata={'source': '../../modules/state_of_the_union.txt'}),\n", - " Document(page_content='Madam Speaker, Madam Vice President, our First Lady and Second Gentleman. Members of Congress and the Cabinet. Justices of the Supreme Court. My fellow Americans. \\n\\nLast year COVID-19 kept us apart. This year we are finally together again. \\n\\nTonight, we meet as Democrats Republicans and Independents. But most importantly as Americans. \\n\\nWith a duty to one another to the American people to the Constitution. \\n\\nAnd with an unwavering resolve that freedom will always triumph over tyranny. \\n\\nSix days ago, Russia’s Vladimir Putin sought to shake the foundations of the free world thinking he could make it bend to his menacing ways. But he badly miscalculated. \\n\\nHe thought he could roll into Ukraine and the world would roll over. Instead he met a wall of strength he never imagined. \\n\\nHe met the Ukrainian people. \\n\\nFrom President Zelenskyy to every Ukrainian, their fearlessness, their courage, their determination, inspires the world.', metadata={'source': '../../modules/state_of_the_union.txt'})]" + "[Document(page_content='And my report is this: the State of the Union is strong—because you, the American people, are strong. \\n\\nWe are stronger today than we were a year ago. \\n\\nAnd we will be stronger a year from now than we are today. \\n\\nNow is our moment to meet and overcome the challenges of our time. \\n\\nAnd we will, as one people. \\n\\nOne America. \\n\\nThe United States of America. \\n\\nMay God bless you all. May God protect our troops.', metadata={'source': '../../how_to/state_of_the_union.txt'}),\n", + " Document(page_content='And built the strongest, freest, and most prosperous nation the world has ever known. \\n\\nNow is the hour. \\n\\nOur moment of responsibility. \\n\\nOur test of resolve and conscience, of history itself. \\n\\nIt is in this moment that our character is formed. Our purpose is found. Our future is forged. \\n\\nWell I know this nation. \\n\\nWe will meet the test. \\n\\nTo protect freedom and liberty, to expand fairness and opportunity. \\n\\nWe will save democracy. \\n\\nAs hard as these times have been, I am more optimistic about America today than I have been my whole life. \\n\\nBecause I see the future that is within our grasp. \\n\\nBecause I know there is simply nothing beyond our capacity. \\n\\nWe are the only nation on Earth that has always turned every crisis we have faced into an opportunity. \\n\\nThe only nation that can be defined by a single word: possibilities. \\n\\nSo on this night, in our 245th year as a nation, I have come to report on the State of the Union.', metadata={'source': '../../how_to/state_of_the_union.txt'}),\n", + " Document(page_content='Groups of citizens blocking tanks with their bodies. Everyone from students to retirees teachers turned soldiers defending their homeland. \\n\\nIn this struggle as President Zelenskyy said in his speech to the European Parliament “Light will win over darkness.” The Ukrainian Ambassador to the United States is here tonight. \\n\\nLet each of us here tonight in this Chamber send an unmistakable signal to Ukraine and to the world. \\n\\nPlease rise if you are able and show that, Yes, we the United States of America stand with the Ukrainian people. \\n\\nThroughout our history we’ve learned this lesson when dictators do not pay a price for their aggression they cause more chaos. \\n\\nThey keep moving. \\n\\nAnd the costs and the threats to America and the world keep rising. \\n\\nThat’s why the NATO Alliance was created to secure peace and stability in Europe after World War 2. \\n\\nThe United States is a member along with 29 other nations. \\n\\nIt matters. American diplomacy matters. American resolve matters.', metadata={'source': '../../how_to/state_of_the_union.txt'}),\n", + " Document(page_content='When we use taxpayer dollars to rebuild America – we are going to Buy American: buy American products to support American jobs. \\n\\nThe federal government spends about $600 Billion a year to keep the country safe and secure. \\n\\nThere’s been a law on the books for almost a century \\nto make sure taxpayers’ dollars support American jobs and businesses. \\n\\nEvery Administration says they’ll do it, but we are actually doing it. \\n\\nWe will buy American to make sure everything from the deck of an aircraft carrier to the steel on highway guardrails are made in America. \\n\\nBut to compete for the best jobs of the future, we also need to level the playing field with China and other competitors. \\n\\nThat’s why it is so important to pass the Bipartisan Innovation Act sitting in Congress that will make record investments in emerging technologies and American manufacturing. \\n\\nLet me give you one example of why it’s so important to pass it.', metadata={'source': '../../how_to/state_of_the_union.txt'}),\n", + " Document(page_content='Madam Speaker, Madam Vice President, our First Lady and Second Gentleman. Members of Congress and the Cabinet. Justices of the Supreme Court. My fellow Americans. \\n\\nLast year COVID-19 kept us apart. This year we are finally together again. \\n\\nTonight, we meet as Democrats Republicans and Independents. But most importantly as Americans. \\n\\nWith a duty to one another to the American people to the Constitution. \\n\\nAnd with an unwavering resolve that freedom will always triumph over tyranny. \\n\\nSix days ago, Russia’s Vladimir Putin sought to shake the foundations of the free world thinking he could make it bend to his menacing ways. But he badly miscalculated. \\n\\nHe thought he could roll into Ukraine and the world would roll over. Instead he met a wall of strength he never imagined. \\n\\nHe met the Ukrainian people. \\n\\nFrom President Zelenskyy to every Ukrainian, their fearlessness, their courage, their determination, inspires the world.', metadata={'source': '../../how_to/state_of_the_union.txt'})]" ] }, "execution_count": 29, @@ -282,11 +282,11 @@ "name": "stdout", "output_type": "stream", "text": [ - "{'source': '../../modules/state_of_the_union.txt'} - 0.87391514\n", - "{'source': '../../modules/state_of_the_union.txt'} - 0.8549463\n", - "{'source': '../../modules/state_of_the_union.txt'} - 0.847913\n", - "{'source': '../../modules/state_of_the_union.txt'} - 0.84328896\n", - "{'source': '../../modules/state_of_the_union.txt'} - 0.832347\n" + "{'source': '../../how_to/state_of_the_union.txt'} - 0.87391514\n", + "{'source': '../../how_to/state_of_the_union.txt'} - 0.8549463\n", + "{'source': '../../how_to/state_of_the_union.txt'} - 0.847913\n", + "{'source': '../../how_to/state_of_the_union.txt'} - 0.84328896\n", + "{'source': '../../how_to/state_of_the_union.txt'} - 0.832347\n" ] } ], diff --git a/docs/docs/integrations/vectorstores/vdms.ipynb b/docs/docs/integrations/vectorstores/vdms.ipynb index 6eeefed0b4e..6b67dcb9484 100644 --- a/docs/docs/integrations/vectorstores/vdms.ipynb +++ b/docs/docs/integrations/vectorstores/vdms.ipynb @@ -176,7 +176,7 @@ ], "source": [ "# load the document and split it into chunks\n", - "document_path = \"../../modules/state_of_the_union.txt\"\n", + "document_path = \"../../how_to/state_of_the_union.txt\"\n", "raw_documents = TextLoader(document_path).load()\n", "\n", "# split it into chunks\n", @@ -235,7 +235,7 @@ "\tid:\t32\n", "\tpage_number:\t32\n", "\tpresident_included:\tTrue\n", - "\tsource:\t../../modules/state_of_the_union.txt\n", + "\tsource:\t../../how_to/state_of_the_union.txt\n", "--------------------------------------------------\n", "\n", "Content:\n", @@ -259,7 +259,7 @@ "\tid:\t37\n", "\tpage_number:\t37\n", "\tpresident_included:\tFalse\n", - "\tsource:\t../../modules/state_of_the_union.txt\n", + "\tsource:\t../../how_to/state_of_the_union.txt\n", "--------------------------------------------------\n", "\n", "Content:\n", @@ -279,7 +279,7 @@ "\tid:\t33\n", "\tpage_number:\t33\n", "\tpresident_included:\tFalse\n", - "\tsource:\t../../modules/state_of_the_union.txt\n", + "\tsource:\t../../how_to/state_of_the_union.txt\n", "--------------------------------------------------\n", "\n" ] @@ -328,7 +328,7 @@ "\tid:\t32\n", "\tpage_number:\t32\n", "\tpresident_included:\tTrue\n", - "\tsource:\t../../modules/state_of_the_union.txt\n", + "\tsource:\t../../how_to/state_of_the_union.txt\n", "--------------------------------------------------\n", "\n", "Content:\n", @@ -348,7 +348,7 @@ "\tid:\t35\n", "\tpage_number:\t35\n", "\tpresident_included:\tTrue\n", - "\tsource:\t../../modules/state_of_the_union.txt\n", + "\tsource:\t../../how_to/state_of_the_union.txt\n", "--------------------------------------------------\n", "\n", "Content:\n", @@ -379,7 +379,7 @@ "\tid:\t40\n", "\tpage_number:\t40\n", "\tpresident_included:\tTrue\n", - "\tsource:\t../../modules/state_of_the_union.txt\n", + "\tsource:\t../../how_to/state_of_the_union.txt\n", "--------------------------------------------------\n", "\n" ] @@ -432,7 +432,7 @@ "\tid:\t32\n", "\tpage_number:\t32\n", "\tpresident_included:\tTrue\n", - "\tsource:\t../../modules/state_of_the_union.txt\n", + "\tsource:\t../../how_to/state_of_the_union.txt\n", "--------------------------------------------------\n", "\n", "Score:\t1.495247483253479\n", @@ -458,7 +458,7 @@ "\tid:\t37\n", "\tpage_number:\t37\n", "\tpresident_included:\tFalse\n", - "\tsource:\t../../modules/state_of_the_union.txt\n", + "\tsource:\t../../how_to/state_of_the_union.txt\n", "--------------------------------------------------\n", "\n", "Score:\t1.5008409023284912\n", @@ -480,7 +480,7 @@ "\tid:\t33\n", "\tpage_number:\t33\n", "\tpresident_included:\tFalse\n", - "\tsource:\t../../modules/state_of_the_union.txt\n", + "\tsource:\t../../how_to/state_of_the_union.txt\n", "--------------------------------------------------\n", "\n" ] @@ -540,7 +540,7 @@ "\tid:\t32\n", "\tpage_number:\t32\n", "\tpresident_included:\tTrue\n", - "\tsource:\t../../modules/state_of_the_union.txt\n", + "\tsource:\t../../how_to/state_of_the_union.txt\n", "--------------------------------------------------\n", "\n", "Score:\t1.495247483253479\n", @@ -566,7 +566,7 @@ "\tid:\t37\n", "\tpage_number:\t37\n", "\tpresident_included:\tFalse\n", - "\tsource:\t../../modules/state_of_the_union.txt\n", + "\tsource:\t../../how_to/state_of_the_union.txt\n", "--------------------------------------------------\n", "\n", "Score:\t1.5008409023284912\n", @@ -588,7 +588,7 @@ "\tid:\t33\n", "\tpage_number:\t33\n", "\tpresident_included:\tFalse\n", - "\tsource:\t../../modules/state_of_the_union.txt\n", + "\tsource:\t../../how_to/state_of_the_union.txt\n", "--------------------------------------------------\n", "\n" ] @@ -634,9 +634,9 @@ "output_type": "stream", "text": [ "Original metadata: \n", - "\t{'id': '32', 'page_number': 32, 'president_included': True, 'source': '../../modules/state_of_the_union.txt'}\n", + "\t{'id': '32', 'page_number': 32, 'president_included': True, 'source': '../../how_to/state_of_the_union.txt'}\n", "new metadata: \n", - "\t{'id': '32', 'page_number': 32, 'president_included': True, 'source': '../../modules/state_of_the_union.txt', 'new_value': 'hello world'}\n", + "\t{'id': '32', 'page_number': 32, 'president_included': True, 'source': '../../how_to/state_of_the_union.txt', 'new_value': 'hello world'}\n", "--------------------------------------------------\n", "\n", "UPDATED ENTRY (id=32):\n", @@ -663,7 +663,7 @@ "\tTrue\n", "\n", "source:\n", - "\t../../modules/state_of_the_union.txt\n", + "\t../../how_to/state_of_the_union.txt\n", "--------------------------------------------------\n", "\n" ] @@ -759,7 +759,7 @@ "\tnew_value:\thello world\n", "\tpage_number:\t32\n", "\tpresident_included:\tTrue\n", - "\tsource:\t../../modules/state_of_the_union.txt\n" + "\tsource:\t../../how_to/state_of_the_union.txt\n" ] } ], @@ -829,7 +829,7 @@ "\tTrue\n", "\n", "source:\n", - "\t../../modules/state_of_the_union.txt\n", + "\t../../how_to/state_of_the_union.txt\n", "--------------------------------------------------\n", "\n" ] @@ -889,7 +889,7 @@ "\tnew_value:\thello world\n", "\tpage_number:\t32\n", "\tpresident_included:\tTrue\n", - "\tsource:\t../../modules/state_of_the_union.txt\n" + "\tsource:\t../../how_to/state_of_the_union.txt\n" ] } ], @@ -934,7 +934,7 @@ "\tnew_value:\thello world\n", "\tpage_number:\t32\n", "\tpresident_included:\tTrue\n", - "\tsource:\t../../modules/state_of_the_union.txt\n" + "\tsource:\t../../how_to/state_of_the_union.txt\n" ] } ], @@ -981,7 +981,7 @@ "\tnew_value:\thello world\n", "\tpage_number:\t32\n", "\tpresident_included:\tTrue\n", - "\tsource:\t../../modules/state_of_the_union.txt\n", + "\tsource:\t../../how_to/state_of_the_union.txt\n", "--------------------------------------------------\n", "\n", "Score:\t1.507053256034851\n", @@ -1013,7 +1013,7 @@ "\tid:\t39\n", "\tpage_number:\t39\n", "\tpresident_included:\tFalse\n", - "\tsource:\t../../modules/state_of_the_union.txt\n", + "\tsource:\t../../how_to/state_of_the_union.txt\n", "--------------------------------------------------\n", "\n" ] diff --git a/docs/docs/integrations/vectorstores/vespa.ipynb b/docs/docs/integrations/vectorstores/vespa.ipynb index b93a8255fce..41b674b1754 100644 --- a/docs/docs/integrations/vectorstores/vespa.ipynb +++ b/docs/docs/integrations/vectorstores/vespa.ipynb @@ -153,7 +153,7 @@ "from langchain_community.document_loaders import TextLoader\n", "from langchain_text_splitters import CharacterTextSplitter\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/xata.ipynb b/docs/docs/integrations/vectorstores/xata.ipynb index bfbf646fa6f..10074c047a4 100644 --- a/docs/docs/integrations/vectorstores/xata.ipynb +++ b/docs/docs/integrations/vectorstores/xata.ipynb @@ -132,7 +132,7 @@ }, "outputs": [], "source": [ - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n", diff --git a/docs/docs/integrations/vectorstores/zilliz.ipynb b/docs/docs/integrations/vectorstores/zilliz.ipynb index eacee33e8c3..3a9b4bf2005 100644 --- a/docs/docs/integrations/vectorstores/zilliz.ipynb +++ b/docs/docs/integrations/vectorstores/zilliz.ipynb @@ -91,7 +91,7 @@ "source": [ "from langchain_community.document_loaders import TextLoader\n", "\n", - "loader = TextLoader(\"../../modules/state_of_the_union.txt\")\n", + "loader = TextLoader(\"../../how_to/state_of_the_union.txt\")\n", "documents = loader.load()\n", "text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)\n", "docs = text_splitter.split_documents(documents)\n",