Ritesh-hf commited on
Commit
75eb663
1 Parent(s): 1447b04

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -99,12 +99,12 @@ llm = ChatPerplexity(temperature=0, pplx_api_key=GROQ_API_KEY, model="llama-3.1-
99
  # base_compressor=compressor, base_retriever=retriever
100
  # )
101
 
102
- compressor = FlashrankRerank(top_n=10)
103
 
104
 
105
- compression_retriever = ContextualCompressionRetriever(
106
- base_compressor=compressor, base_retriever=retriever
107
- )
108
 
109
  # Contextualization prompt and retriever
110
  contextualize_q_system_prompt = """ Given a chat history and the latest user question \
@@ -119,7 +119,7 @@ contextualize_q_prompt = ChatPromptTemplate.from_messages(
119
  ("human", "{input}")
120
  ]
121
  )
122
- history_aware_retriever = create_history_aware_retriever(llm, compression_retriever, contextualize_q_prompt)
123
 
124
  # QA system prompt and chain
125
  qa_system_prompt = """ You are a highly skilled information retrieval assistant. Use the following context to answer questions effectively.
 
99
  # base_compressor=compressor, base_retriever=retriever
100
  # )
101
 
102
+ # compressor = FlashrankRerank(top_n=10)
103
 
104
 
105
+ # compression_retriever = ContextualCompressionRetriever(
106
+ # base_compressor=compressor, base_retriever=retriever
107
+ # )
108
 
109
  # Contextualization prompt and retriever
110
  contextualize_q_system_prompt = """ Given a chat history and the latest user question \
 
119
  ("human", "{input}")
120
  ]
121
  )
122
+ history_aware_retriever = create_history_aware_retriever(llm, retriever, contextualize_q_prompt)
123
 
124
  # QA system prompt and chain
125
  qa_system_prompt = """ You are a highly skilled information retrieval assistant. Use the following context to answer questions effectively.