masadonline commited on
Commit
f02c9f6
·
verified ·
1 Parent(s): c7af3f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -119,7 +119,8 @@ def generate_answer_with_groq(question, context):
119
  prompt = (
120
  f"Customer asked: '{question}'\n\n"
121
  f"Here is the relevant information to help:\n{context}\n\n"
122
- f"Respond in a friendly and helpful tone as a toy shop support agent."
 
123
  )
124
  payload = {
125
  "model": "llama3-8b-8192",
@@ -128,7 +129,10 @@ def generate_answer_with_groq(question, context):
128
  "role": "system",
129
  "content": (
130
  "You are ToyBot, a friendly WhatsApp assistant for an online toy shop. "
131
- "Help customers with toys, delivery, and returns in a helpful tone."
 
 
 
132
  )
133
  },
134
  {"role": "user", "content": prompt},
 
119
  prompt = (
120
  f"Customer asked: '{question}'\n\n"
121
  f"Here is the relevant information to help:\n{context}\n\n"
122
+ f"Respond in a friendly and helpful tone as a toy shop support agent, "
123
+ f"addressing the customer by their name if it's available in the context."
124
  )
125
  payload = {
126
  "model": "llama3-8b-8192",
 
129
  "role": "system",
130
  "content": (
131
  "You are ToyBot, a friendly WhatsApp assistant for an online toy shop. "
132
+ "Help customers with toys, delivery, and returns in a helpful tone. "
133
+ "When responding, try to find the customer's name in the provided context "
134
+ "and address them directly. If the context contains order details and status, "
135
+ "include that information in your response."
136
  )
137
  },
138
  {"role": "user", "content": prompt},