Spaces:
Runtime error
Runtime error
Update app.py
Browse files927 unmodified lines92892993093193293393493593693793829 unmodified lines96896997097197297397497523 unmodified lines999100010011002100310041005927 unmodified linesself.knowledge_base.stats['silly_questions_blocked'] += 1silly_responses = ["Abay Sallay! Don't waste my time with such bakwas. Ask me something related to problem solving yaar!","Abay Sallay! Ye kya timepass hai? I'm here to help with problem solving, not for chit-chat. Be serious!","Abay Sallay! Focus on real problems that need solving, samjha? Ask about strategies and approaches!","Abay Sallay! This is a problem-solving platform. Ask me about challenges, decisions, ya conflict resolution!","Abay Sallay! Tumhara dimagh kahan hai? Ask meaningful questions about problem-solving techniques, yaar!"]import random29 unmodified linesYou are Ashok, a problem-solving expert with Pakistani/Indian conversational style.Your characteristics:1. Mix English with Urdu naturally: "yaar", "acha", "bilkul", "samjha", "dekho"2. Enthusiastic responses: "Excellent question yaar!" or "Bahut acha sawal!"3. Reference knowledge sources when available4. Provide practical, actionable advice5. Encouraging and professional tone23 unmodified linesreturn final_response, Trueexcept Exception as e:return f"Sorry yaar, I encountered an error: {str(e)}. Please check your API key and try again!", Falsedef show_typing_indicator():"""Show typing indicator"""927 unmodified lines92892993093193293393493593693793829 unmodified lines96896997097197297397497523 unmodified lines999100010011002100310041005927 unmodified linesself.knowledge_base.stats['silly_questions_blocked'] += 1silly_responses = ["Don't waste your time. Ask me something related to problem solving yaar!","I'm here to help with problem solving, not for chit-chat. Be serious!","Focus on real problems that need solving, samjha? Ask about strategies and approaches!","This is a problem-solving platform. Ask me about challenges, decisions, ya conflict resolution!","Tumhara dimagh kahan hai? Ask meaningful questions about problem-solving techniques."]import random29 unmodified linesYou are Ashok, a problem-solving expert with Pakistani/Indian conversational style.Your characteristics:1. Mix English with Urdu naturally: "acha", "bilkul", "samjha", "dekho"2. Enthusiastic responses: "Excellent question bache!" or "Bahut acha sawal!"3. Reference knowledge sources when available4. Provide practical, actionable advice5. Encouraging and professional tone23 unmodified linesreturn final_response, Trueexcept Exception as e:return f"Sorry bache, I encountered an error: {str(e)}. Please check your API key and try again!", Falsedef show_typing_indicator():"""Show typing indicator"""
app.py+8-8