Skip to content

Commit 597a396

Browse files
committed
ML/LangChain: Fix standalone vector_search.py example program
1 parent 2f0c256 commit 597a396

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

topic/machine-learning/llm-langchain/vector_search.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,14 @@
2424
from langchain_text_splitters import CharacterTextSplitter
2525
from langchain_openai import OpenAIEmbeddings
2626

27+
import nltk
28+
2729

2830
def main():
2931

32+
nltk.download("averaged_perceptron_tagger_eng")
33+
nltk.download("punkt_tab")
34+
3035
# Load the document, split it into chunks, embed each chunk,
3136
# and load it into the vector store.
3237
state_of_the_union_url = "https://github.com/langchain-ai/langchain/raw/v0.0.325/docs/docs/modules/state_of_the_union.txt"

0 commit comments

Comments
 (0)