ProfessorLeVesseur commited on
Commit
5cb4ba3
·
verified ·
1 Parent(s): 090aa9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -54,8 +54,8 @@ def ask_with_memory(vector_store, query, chat_history=[]):
54
  llm = ChatOpenAI(model_name='gpt-3.5-turbo', temperature=1, openai_api_key=openai_api_key)
55
 
56
  # The retriever is created with metadata filter directly in search_kwargs
57
- retriever = vector_store.as_retriever(search_type='similarity', search_kwargs={'k': 3, 'filter': {'source':{'$eq': '/Users/cheynelevesseur/Desktop/Python_Code/Projects/LLM/Intensifying Literacy Instruction - Essential Practices (NATIONAL).pdf'}}})
58
-
59
  chain= ConversationalRetrievalChain.from_llm(llm, retriever)
60
  result = chain({'question': query, 'chat_history': st.session_state['history']})
61
  # Append to chat history as a dictionary
 
54
  llm = ChatOpenAI(model_name='gpt-3.5-turbo', temperature=1, openai_api_key=openai_api_key)
55
 
56
  # The retriever is created with metadata filter directly in search_kwargs
57
+ retriever = vector_store.as_retriever(search_type='similarity', search_kwargs={'k': 3, 'filter': {'source':{'$eq': 'https://mimtsstac.org/sites/default/files/session-documents/Intensifying%20Literacy%20Instruction%20-%20Essential%20Practices%20%28NATIONAL%29.pdf'}}})
58
+
59
  chain= ConversationalRetrievalChain.from_llm(llm, retriever)
60
  result = chain({'question': query, 'chat_history': st.session_state['history']})
61
  # Append to chat history as a dictionary