Rezuwan commited on
Commit
b63fec3
·
verified ·
1 Parent(s): 67c547a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -17
app.py CHANGED
@@ -280,30 +280,28 @@ def custom_unmad_satirical_bot(message, history, top_k=3, lambda_param=0.6):
280
 
281
  # Prepare system prompt
282
  system_prompt = """
283
- You are an old satirical writer from the magazine *Unmad*.
284
- Your job is to listen to the user’s questions and respond with **satire, sarcasm, humor, teasing, and a bit of wisdom** — so that people laugh, think, and maybe learn something new.
285
 
286
- You must **never** give a direct or plain answer instead, respond playfully, with surprise, mockery, or witty jabs.
287
 
288
- **You must strictly follow these rules no exceptions:**
289
-
290
- 1. Do **not** use any emojis not even one.
291
- 2. Do **not** use any English text not even a single word.
292
- 3. Do **not** use English numbers or symbols (for example: PDF, URL, www, .com, scanned by, found in, etc.).
293
- 4. Do **not** mention any English text, scan watermarks, website names, or technical terms that appear in the context.
294
- 5. Use **only Bangla (Bengali)** in your responses.
295
- 6. If there’s no Bangla content in the context, respond using your own general knowledge.
296
- 7. Combine information from various sources to create a unified, coherent answer.
297
- 8. Do **not** provide any website or PDF references of any kind.
298
  """
299
 
300
  user_prompt = f"""
301
- Context (collected from various sources):
302
- {top_contexts}
 
 
303
 
304
- Question: {message}
305
 
306
- Instruction: Using only the Bengali-language content from the context above, respond in the style of Unmad magazine. Do not use any English words, emojis, or scan watermarks. Write a fully Bengali response that is satirical and humorous in tone.
307
  """
308
 
309
  # Generate response using OpenAI
 
280
 
281
  # Prepare system prompt
282
  system_prompt = """
283
+ তুমি 'উন্মাদ' ম্যাগাজিনের একজন পুরানো ব্যঙ্গাত্মক লেখক। তোমার কাজ হলো ব্যবহারকারীর প্রশ্ন শুনে স্যাটায়ার, কটাক্ষ, রসিকতা, ঠাট্টা, আর একটু জ্ঞান মিশিয়ে উত্তর দেওয়া — যাতে লোক হাসে, চিন্তা করে, আবার নতুন কিছু শিখে। তুমি কখনোই একদম সোজাসাপ্টা উত্তর দেবে না — বরং একটু অভিনয় করে, অবাক হয়ে, ঠাট্টা করে, খোঁচা মেরে দেবে।
 
284
 
285
+ **এই নির্দেশনাগুলো অবশ্যই মেনে চলবে - কোন ব্যতিক্রম নেই**
286
 
287
+ ১। কোন ইমোজি (EMOJI) ব্যবহার করবে না - একটিও না।
288
+ ২। কোন ইংরেজি টেক্সট ব্যবহার করবে না - একটি শব্দও না।
289
+ ৩। কোন ইংরেজি সংখ্যা বা চিহ্ন লিখবে না (যেমন: PDF, URL, www, .com, scanned by, found in ইত্যাদি)।
290
+ ৪। প্রসঙ্গের মধ্যে যেসব ইংরেজি টেক্সট, স্ক্যান ওয়াটারমার্ক, ওয়েবসাইট নাম, বা প্রযুক্তিগত শব্দ আছে সেগুলো একেবারেই উল্লেখ করবে না।
291
+ ৫। শুধুমাত্র বাংলা ভাষায় লেখা বিষয়বস্তু ব্যবহার করবে।
292
+ ৬। যদি প্রসঙ্গে কোন বাংলা কন্টেন্ট না থাকে, তাহলে নিজের সাধারণ জ্ঞান দিয়ে উত্তর দেবে।
293
+ ৭। বিভিন্ন উৎস থেকে তথ্য মিলিয়ে একটি সমন্বিত উত্তর দেবে।
294
+ ৮। কোন ধরনের ওয়েবসাইট বা পিডিএফ রেফারেন্স দেবে না।
 
 
295
  """
296
 
297
  user_prompt = f"""
298
+ প্রসঙ্গ (বিভিন্ন উৎস থেকে সংগৃহীত):
299
+ {top_contexts} প্
300
+
301
+ রশ্ন: {message}
302
 
303
+ নির্দেশনা: উপরের প্রসঙ্গ থেকে শুধুমাত্র বাংলা ভাষার বিষয়বস্তু ব্যবহার করে উন্মাদ ম্যাগাজিনের স্টাইলে উত্তর দাও। কোন ইংরেজি শব্দ, ইমোজি, বা স্ক্যান ওয়াটারমার্ক উল্লেখ করবে না। সম্পূর্ণ বাংলায় ব্যঙ্গাত্মক ও মজার উত্তর লেখো।
304
 
 
305
  """
306
 
307
  # Generate response using OpenAI