Skip to content

Commit

Permalink
ML/LangChain: Fix standalone vector_search.py example program
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Oct 24, 2024
1 parent 2f0c256 commit 597a396
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions topic/machine-learning/llm-langchain/vector_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@
from langchain_text_splitters import CharacterTextSplitter
from langchain_openai import OpenAIEmbeddings

import nltk


def main():

nltk.download("averaged_perceptron_tagger_eng")
nltk.download("punkt_tab")

# Load the document, split it into chunks, embed each chunk,
# and load it into the vector store.
state_of_the_union_url = "https://github.com/langchain-ai/langchain/raw/v0.0.325/docs/docs/modules/state_of_the_union.txt"
Expand Down

0 comments on commit 597a396

Please sign in to comment.