Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for langchain 0.1.0? #50

Open
stockcrack opened this issue Jan 13, 2024 · 1 comment
Open

Update for langchain 0.1.0? #50

stockcrack opened this issue Jan 13, 2024 · 1 comment

Comments

@stockcrack
Copy link

Hi,

I think there are a couple updates to be made for langchain 0.1.0 if you want to keep this current.

from langchain_community.vectorstores import FAISS
from langchain_openai import ChatOpenAI, OpenAIEmbeddings

and

def get_conversation_chain(vectorstore):
    """Get conversation chain from vector store"""
    llm = ChatOpenAI()
    memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
    conversation_chain = ConversationalRetrievalChain.from_llm(
        llm=llm, memory=memory, retriever=vectorstore.as_retriever()
    )
    return conversation_chain
@sameersk2k
Copy link

from where to import ConversationalRetrievalChain . I tried langchain.chains its not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants