def generate_response(retrieved_nodes, query_str,patient_information, qa_prompt, llm): context_str = "\n\n".join([r.get_content() for r in retrieved_nodes]) fmt_qa_prompt = qa_prompt.format(context_str=context_str, query_str=query_str,information=information) response = llm.complete(fmt_qa_prompt) return str(response), fmt_qa_prompt