vip11017 commited on
Commit
fa5a94c
·
1 Parent(s): b2636aa

changed the intro message

Browse files
Files changed (1) hide show
  1. app/ingestion/rag_setup.py +12 -9
app/ingestion/rag_setup.py CHANGED
@@ -211,20 +211,23 @@ STRICT RULES:
211
 
212
  def build_welcome_message(ingest: ChatbotIngest) -> str:
213
  """
214
- Build the welcome message for the chatbot using its ingest config.
215
  """
216
  # Determine chatbot name
217
  chatbot_name = ingest.chatbot_name or f"{ingest.company_name} Assistant"
218
 
219
  # Filter out "capture leads (email, phone)" from purposes
220
- purposes = [p for p in ingest.chatbot_purpose if p.lower() != "capture leads (email, phone)"]
221
-
222
- # Construct intro message
223
- intro_msg = (
224
- f"Hello! 👋 I'm {chatbot_name}, your virtual assistant for {ingest.company_name}.\n"
225
- "I can help you with:\n"
226
- + "\n".join(f"- {p}" for p in purposes if p is not "Capture Leads(email, phone")
227
- + "\nPlease ask me anything or start with one of the suggested FAQs below."
 
 
 
228
  )
229
 
230
  return intro_msg
 
211
 
212
  def build_welcome_message(ingest: ChatbotIngest) -> str:
213
  """
214
+ Build a flexible and user-friendly welcome message for the chatbot using its ingest config.
215
  """
216
  # Determine chatbot name
217
  chatbot_name = ingest.chatbot_name or f"{ingest.company_name} Assistant"
218
 
219
  # Filter out "capture leads (email, phone)" from purposes
220
+ purposes = [p for p in ingest.chatbot_purpose or [] if p.lower() != "capture leads (email, phone)"]
221
+
222
+ # Start message
223
+ intro_msg = f"Hello! 👋 I'm {chatbot_name}, your virtual assistant for {ingest.company_name}.\n"
224
+
225
+ if purposes:
226
+ intro_msg += "I can help you with:\n" + "\n".join(f"- {p}" for p in purposes) + "\n"
227
+
228
+ # Add flexible closing
229
+ intro_msg += (
230
+ "Just type your question below and I'll do my best to help!"
231
  )
232
 
233
  return intro_msg