Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -67,22 +67,25 @@ def data_ingestion_from_directory():
|
|
67 |
index.storage_context.persist(persist_dir=PERSIST_DIR)
|
68 |
|
69 |
def handle_query(query):
|
70 |
-
chat_text_qa_msgs = [
|
71 |
-
(
|
72 |
-
"user",
|
73 |
-
"""You are the Taj Hotel chatbot, Taj Hotel Helper.
|
74 |
-
Respond
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
|
|
|
|
|
|
86 |
|
87 |
|
88 |
text_qa_template = ChatPromptTemplate.from_messages(chat_text_qa_msgs)
|
|
|
67 |
index.storage_context.persist(persist_dir=PERSIST_DIR)
|
68 |
|
69 |
def handle_query(query):
|
70 |
+
chat_text_qa_msgs = [
|
71 |
+
(
|
72 |
+
"user",
|
73 |
+
"""You are the Taj Hotel chatbot, Taj Hotel Helper.
|
74 |
+
Respond concisely in the user's preferred language (English, Telugu, or Hindi).
|
75 |
+
Your task is to provide accurate information about the hotel’s services, amenities, and policies.
|
76 |
+
|
77 |
+
**Instructions:**
|
78 |
+
- **Context:** {context_str}
|
79 |
+
- **User's Question:** {query_str}
|
80 |
+
- **Response Guidelines:**
|
81 |
+
- Limit your response to 10-15 words for clarity.
|
82 |
+
- Use polite and professional language that reflects the luxury brand of the Taj Hotel.
|
83 |
+
- If unsure, acknowledge it politely and guide the user to find more information.
|
84 |
+
|
85 |
+
**Response:** [Your concise response here]
|
86 |
+
""".format(context_str=context_str, query_str=query)
|
87 |
+
)
|
88 |
+
]
|
89 |
|
90 |
|
91 |
text_qa_template = ChatPromptTemplate.from_messages(chat_text_qa_msgs)
|