Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ embed_instruction = "Represent the text from the BMW website for retrieval"
|
|
24 |
query_instruction = "Query the most relevant text from the BMW website"
|
25 |
embeddings = HuggingFaceInstructEmbeddings(model_name=model_name, embed_instruction=embed_instruction, query_instruction=query_instruction)
|
26 |
vectordb = Chroma(persist_directory=persist_directory, embedding_function=embeddings)
|
27 |
-
chain = RetrievalQAWithSourcesChain.from_chain_type(llm, chain_type="stuff", retriever=
|
28 |
|
29 |
def chat(message, history):
|
30 |
history = history or []
|
|
|
24 |
query_instruction = "Query the most relevant text from the BMW website"
|
25 |
embeddings = HuggingFaceInstructEmbeddings(model_name=model_name, embed_instruction=embed_instruction, query_instruction=query_instruction)
|
26 |
vectordb = Chroma(persist_directory=persist_directory, embedding_function=embeddings)
|
27 |
+
chain = RetrievalQAWithSourcesChain.from_chain_type(llm, chain_type="stuff", retriever=vectordb.as_retriever(), memory=memory)
|
28 |
|
29 |
def chat(message, history):
|
30 |
history = history or []
|