From 5c35342082d6a7e0ab87d985ad8d1b1bb01e26b9 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Tue, 31 Oct 2023 08:42:38 -0700 Subject: [PATCH] Updated for 300x langchian series (#201) --- paperqa/docs.py | 5 +++-- setup.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/paperqa/docs.py b/paperqa/docs.py index b2496fa3a..7580bf09d 100644 --- a/paperqa/docs.py +++ b/paperqa/docs.py @@ -8,13 +8,14 @@ from pathlib import Path from typing import BinaryIO, Dict, List, Optional, Set, Union, cast -from langchain.base_language import BaseLanguageModel from langchain.chat_models import ChatOpenAI from langchain.embeddings.openai import OpenAIEmbeddings from langchain.memory import ConversationTokenBufferMemory from langchain.memory.chat_memory import BaseChatMemory from langchain.schema.embeddings import Embeddings -from langchain.vectorstores import FAISS, VectorStore +from langchain.schema.language_model import BaseLanguageModel +from langchain.schema.vectorstore import VectorStore +from langchain.vectorstores import FAISS try: from pydantic.v1 import BaseModel, validator diff --git a/setup.py b/setup.py index 267a8d376..c277abaa3 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ install_requires=[ "pypdf", "pydantic<2", - "langchain>=0.0.198", + "langchain>=0.0.303", "openai >= 0.27.8", "faiss-cpu", "PyCryptodome",