jchen8000 commited on
Commit
d87610a
·
verified ·
1 Parent(s): cc53565

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -10
app.py CHANGED
@@ -93,16 +93,6 @@ def generate_response(query, history, model, temperature, max_tokens, top_p, see
93
  llm = ChatGroq(groq_api_key=os.environ.get("GROQ_API_KEY"), model=model)
94
  custom_rag_prompt = PromptTemplate.from_template(template)
95
 
96
-
97
- # Retrive the final prompt that sent to the LLM
98
- docs = retriever.invoke(query)
99
- context = format_docs(docs)
100
- inputs = {"context": context, "question": query}
101
-
102
- prompt_value = custom_rag_prompt.invoke(inputs)
103
- final_prompt = prompt_value.to_string()
104
- print("Final Prompt Sent to LLM:\n", final_prompt)
105
-
106
  rag_chain = (
107
  {"context": retriever | format_docs, "question": RunnablePassthrough()}
108
  | custom_rag_prompt
 
93
  llm = ChatGroq(groq_api_key=os.environ.get("GROQ_API_KEY"), model=model)
94
  custom_rag_prompt = PromptTemplate.from_template(template)
95
 
 
 
 
 
 
 
 
 
 
 
96
  rag_chain = (
97
  {"context": retriever | format_docs, "question": RunnablePassthrough()}
98
  | custom_rag_prompt