valeriylo commited on
Commit
8e54579
·
1 Parent(s): 72b87dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -69,7 +69,8 @@ def get_conversation_chain(vectorstore, model_name):
69
  conversation_chain = ConversationalRetrievalChain.from_llm(llm=llm,
70
  #condense_question_prompt=CONDENSE_QUESTION_PROMPT,
71
  retriever=vectorstore.as_retriever(),
72
- memory=memory
 
73
  )
74
 
75
  return conversation_chain
@@ -124,3 +125,5 @@ with st.sidebar:
124
 
125
  # create conversation chain
126
  st.session_state.conversation = get_conversation_chain(vectorstore, model_name)
 
 
 
69
  conversation_chain = ConversationalRetrievalChain.from_llm(llm=llm,
70
  #condense_question_prompt=CONDENSE_QUESTION_PROMPT,
71
  retriever=vectorstore.as_retriever(),
72
+ memory=memory,
73
+ return_source_documents=True)
74
  )
75
 
76
  return conversation_chain
 
125
 
126
  # create conversation chain
127
  st.session_state.conversation = get_conversation_chain(vectorstore, model_name)
128
+
129
+ st.text_area(st.session_state.conversation['source_documents'][0])