Teach a chatbot to be a bookworm with Langchain and OpenAI's GPT-3.5 language model. Get answers to all your burning questions straight from the pages of a PDF!
Able to run the code but when enter the question getting the below run-time error, please advise.
PdfPal-main/bot.py", line 22, in predict
docs = faiss_index.similarity_search(input, K = 2)
AttributeError: 'OpenAIEmbeddings' object has no attribute 'similarity_search'
I tried to run the code in my environment and its not working as expected. It fails with multiple errors. can you quickly check and suggest? It fails for index creation with below error
ValueError: Encountered text corresponding to disallowed special token '<|endoftext|>'. If you want this text to be encoded as a special token, pass it to allowed_special, e.g. allowed_special={'<|endoftext|>', ...}. If you want this text to be encoded as normal text, disable the check for this token by passing disallowed_special=(enc.special_tokens_set - {'<|endoftext|>'}). To disable this check for all special tokens, pass disallowed_special=().