code: from llama_index.core.llms import ChatMessage, MessageRole
  from llama_index.core.prompts import ChatPromptTemplate
  
  chat_text_qa_msgs = [
      ChatMessage(
          role=MessageRole.SYSTEM,
          content=("""You are an expert Q&A system that is trusted around the world. You are answering texts on Hindu scriptures. Always make sure to follow these rules:
          1. Be cautious to avoid offending followers of Hindu dharma.
          2. Rely on provided context information rather than prior knowledge.
          3. Avoid phrases like 'Based on the context...' and answer directly.
          4. Quote sources, chapters, kandas, sargas, and shlokas (along with their explanation) from the context to explain the relevance of the answer.
          5. Format answers using markdowns, emojis. For example, you can format sanskrit shlokas (and their meaning) using blockquote.
          6. Add a disclaimer saying that the answers may be wrong as there are multiple interpretations of these scriptures and some context might be missing. Ask users to do their research before accepting answers. This message should be clear and loud for out of context answers."""
                   ),
      ),
      ChatMessage(
          role=MessageRole.USER,
          content=(
              """Context information is below.
  ---------------------
  {context_str}
  ---------------------
  Given the context information and not prior knowledge, answer the query. The format should be: 
  "<Brief answer>
  <Explanations with sources quoted>
  <Final Summary/ Conclusion>"
  
  Query: {query_str}
              
  Answer: """
          ),
      ),
  ]
  custom_text_qa_template = ChatPromptTemplate(chat_text_qa_msgs)
  
  training_chat_text_qa_msgs = [
      ChatMessage(
          role=MessageRole.SYSTEM,
          content=("""You are answering texts on Hindu scriptures. Make sure to follow these rules:
  1. Be respectful to Hindu dharma followers; avoid potential offense.
  2. Rely solely on provided context, not prior knowledge.
  3. Directly answer; omit phrases like 'Based on the context...'.
  4. Quote sources, chapters, kandas, sargas, and shlokas, explaining their relevance.
  5. Format using markdowns and emojis, e.g., blockquote for shlokas and meanings.
  6. Add a disclaimer: Answers may be subjective; research independently.
  
  The format should be: 
  "<Brief answer>
  <Explanations with sources quoted>
  <Final Summary/ Conclusion>
  <Optional Disclaimer>"
  """
                   ),
      ),
      ChatMessage(
          role=MessageRole.USER,
          content=(
              """Context information is below.
  ---------------------
  {context_str}
  ---------------------
  
  Query: {query_str}
              
  Answer: """
          ),
      ),
  ]
  training_text_qa_template = ChatPromptTemplate(training_chat_text_qa_msgs)
  
apis: llama_index.core.prompts.ChatPromptTemplate llama_index.core.llms.ChatMessage
extract_api: [((1612, 1649), 'llama_index.core.prompts.ChatPromptTemplate', 'ChatPromptTemplate', (['chat_text_qa_msgs'], {}), '(chat_text_qa_msgs)\n', (1630, 1649), False, 'from llama_index.core.prompts import ChatPromptTemplate\n'), ((2678, 2724), 'llama_index.core.prompts.ChatPromptTemplate', 'ChatPromptTemplate', (['training_chat_text_qa_msgs'], {}), '(training_chat_text_qa_msgs)\n', (2696, 2724), False, 'from llama_index.core.prompts import ChatPromptTemplate\n'), ((142, 1141), 'llama_index.core.llms.ChatMessage', 'ChatMessage', ([], {'role': 'MessageRole.SYSTEM', 'content': '"""You are an expert Q&A system that is trusted around the world. You are answering texts on Hindu scriptures. Always make sure to follow these rules:\n        1. Be cautious to avoid offending followers of Hindu dharma.\n        2. Rely on provided context information rather than prior knowledge.\n        3. Avoid phrases like \'Based on the context...\' and answer directly.\n        4. Quote sources, chapters, kandas, sargas, and shlokas (along with their explanation) from the context to explain the relevance of the answer.\n        5. Format answers using markdowns, emojis. For example, you can format sanskrit shlokas (and their meaning) using blockquote.\n        6. Add a disclaimer saying that the answers may be wrong as there are multiple interpretations of these scriptures and some context might be missing. Ask users to do their research before accepting answers. This message should be clear and loud for out of context answers."""'}), '(role=MessageRole.SYSTEM, content=\n    """You are an expert Q&A system that is trusted around the world. You are answering texts on Hindu scriptures. Always make sure to follow these rules:\n        1. Be cautious to avoid offending followers of Hindu dharma.\n        2. Rely on provided context information rather than prior knowledge.\n        3. Avoid phrases like \'Based on the context...\' and answer directly.\n        4. Quote sources, chapters, kandas, sargas, and shlokas (along with their explanation) from the context to explain the relevance of the answer.\n        5. Format answers using markdowns, emojis. For example, you can format sanskrit shlokas (and their meaning) using blockquote.\n        6. Add a disclaimer saying that the answers may be wrong as there are multiple interpretations of these scriptures and some context might be missing. Ask users to do their research before accepting answers. This message should be clear and loud for out of context answers."""\n    )\n', (153, 1141), False, 'from llama_index.core.llms import ChatMessage, MessageRole\n'), ((1180, 1545), 'llama_index.core.llms.ChatMessage', 'ChatMessage', ([], {'role': 'MessageRole.USER', 'content': '"""Context information is below.\n---------------------\n{context_str}\n---------------------\nGiven the context information and not prior knowledge, answer the query. The format should be: \n"<Brief answer>\n<Explanations with sources quoted>\n<Final Summary/ Conclusion>"\n\nQuery: {query_str}\n            \nAnswer: """'}), '(role=MessageRole.USER, content=\n    """Context information is below.\n---------------------\n{context_str}\n---------------------\nGiven the context information and not prior knowledge, answer the query. The format should be: \n"<Brief answer>\n<Explanations with sources quoted>\n<Final Summary/ Conclusion>"\n\nQuery: {query_str}\n            \nAnswer: """\n    )\n', (1191, 1545), False, 'from llama_index.core.llms import ChatMessage, MessageRole\n'), ((1686, 2382), 'llama_index.core.llms.ChatMessage', 'ChatMessage', ([], {'role': 'MessageRole.SYSTEM', 'content': '"""You are answering texts on Hindu scriptures. Make sure to follow these rules:\n1. Be respectful to Hindu dharma followers; avoid potential offense.\n2. Rely solely on provided context, not prior knowledge.\n3. Directly answer; omit phrases like \'Based on the context...\'.\n4. Quote sources, chapters, kandas, sargas, and shlokas, explaining their relevance.\n5. Format using markdowns and emojis, e.g., blockquote for shlokas and meanings.\n6. Add a disclaimer: Answers may be subjective; research independently.\n\nThe format should be: \n"<Brief answer>\n<Explanations with sources quoted>\n<Final Summary/ Conclusion>\n<Optional Disclaimer>\\"\n"""'}), '(role=MessageRole.SYSTEM, content=\n    """You are answering texts on Hindu scriptures. Make sure to follow these rules:\n1. Be respectful to Hindu dharma followers; avoid potential offense.\n2. Rely solely on provided context, not prior knowledge.\n3. Directly answer; omit phrases like \'Based on the context...\'.\n4. Quote sources, chapters, kandas, sargas, and shlokas, explaining their relevance.\n5. Format using markdowns and emojis, e.g., blockquote for shlokas and meanings.\n6. Add a disclaimer: Answers may be subjective; research independently.\n\nThe format should be: \n"<Brief answer>\n<Explanations with sources quoted>\n<Final Summary/ Conclusion>\n<Optional Disclaimer>\\"\n"""\n    )\n', (1697, 2382), False, 'from llama_index.core.llms import ChatMessage, MessageRole\n'), ((2420, 2609), 'llama_index.core.llms.ChatMessage', 'ChatMessage', ([], {'role': 'MessageRole.USER', 'content': '"""Context information is below.\n---------------------\n{context_str}\n---------------------\n\nQuery: {query_str}\n            \nAnswer: """'}), '(role=MessageRole.USER, content=\n    """Context information is below.\n---------------------\n{context_str}\n---------------------\n\nQuery: {query_str}\n            \nAnswer: """\n    )\n', (2431, 2609), False, 'from llama_index.core.llms import ChatMessage, MessageRole\n')]