[LangChain] No using OpenAI API RetrievalQA
ยท
๐ฃ๏ธ Natural Language Processing
LangChain No using OpenAI API (1) QA๋ฅผ ์ํ Document ๋ถ๋ฌ์ค๊ธฐ # Load and process the text files # loader = TextLoader("./data/texts") loader = DirectoryLoader('./pdf/', glob="./*.pdf", loader_cls=PyPDFLoader) documents = loader.load() # Document ๋ถ์ text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200) texts = text_splitter.split_documents(documents) (2) Embedding # HuggingF..