pratham0011 commited on
Commit
0279ba5
·
verified ·
1 Parent(s): cf2c2a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -61,13 +61,16 @@ def handle_query(query):
61
  index = load_index_from_storage(storage_context)
62
  chat_text_qa_msgs = [
63
  (
64
- "user",
65
- """You are a Q&A assistant named CHAT-DOC. Your main goal is to provide answers as accurately as possible, based on the instructions and context given to you. If a question does not match the provided context or is outside the scope of the document, kindly advise the user to ask questions within the context of the document.
 
66
  Context:
67
- {context_str}
 
68
  Question:
69
- {query_str}
70
- """
 
71
  )
72
  ]
73
  text_qa_template = ChatPromptTemplate.from_messages(chat_text_qa_msgs)
 
61
  index = load_index_from_storage(storage_context)
62
  chat_text_qa_msgs = [
63
  (
64
+ "<start_of_turn>user"
65
+ '''You are a Q&A assistant named CHAT-DOC. Your main goal is to provide answers as accurately as possible, based on the instructions and context given to you. If a question does not match the provided context or is outside the scope of the document, kindly advise the user to ask questions within the context of the document.
66
+
67
  Context:
68
+ {context_str}
69
+
70
  Question:
71
+ {query_str}
72
+ <end_of_turn>'''
73
+
74
  )
75
  ]
76
  text_qa_template = ChatPromptTemplate.from_messages(chat_text_qa_msgs)