Gopikanth123 commited on
Commit
d3b93f0
·
verified ·
1 Parent(s): 620dd85

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +16 -22
main.py CHANGED
@@ -67,29 +67,23 @@ 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
- """
74
- You are the Taj Hotel chatbot, known as Taj Hotel Helper.
75
- Your goal is to provide accurate and professional answers to
76
- user queries about the Taj Hotel in the language they use:
77
- English, Telugu, or Hindi. Always respond clearly and concisely,
78
- ideally within 10-15 words. If you don't know the answer, say so politely.
79
-
80
- Context:
81
- {context_str}
82
-
83
- User's Question:
84
- {query_str}
85
-
86
- Language-Specific Guidance:
87
- - For English: Respond in English.
88
- - For Telugu: తెలుగు లో సమాధానం ఇవ్వండి.
89
- - For Hindi: हिंदी में उत्तर दें.
90
- """
91
- )
92
  ]
 
93
 
94
  text_qa_template = ChatPromptTemplate.from_messages(chat_text_qa_msgs)
95
 
 
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 professionally and concisely in the user's preferred language.
75
+ Prioritize accuracy and refer only to your context. If unsure, admit it gracefully.
76
+
77
+ Context: {context_str}
78
+ User's Question: {query_str}
79
+
80
+ Reply Rules:
81
+ - Be concise: 10-15 words per answer.
82
+ - Match the language: English, Telugu, or Hindi.
83
+ """
84
+ )
 
 
 
 
 
 
 
85
  ]
86
+
87
 
88
  text_qa_template = ChatPromptTemplate.from_messages(chat_text_qa_msgs)
89