Create responses.py
Browse files- responses.py +51 -0
responses.py
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
RESPONSES = {
|
2 |
+
'welcome': {
|
3 |
+
'en':
|
4 |
+
"""Welcome to the Decision Making Helper Bot! ๐ค
|
5 |
+
I can help you make decisions in English or Hebrew.
|
6 |
+
Just ask me a question or use /start followed by your question.
|
7 |
+
For example: /start Should I go to the beach today?""",
|
8 |
+
'he':
|
9 |
+
"""ืืจืืืื ืืืืื ืืืื ืฉืขืืืจ ืืงืื ืืืืืืืช! ๐ค
|
10 |
+
ืื ื ืืืื ืืขืืืจ ืืงืื ืืืืืืช ืืขืืจืืช ืื ืืื ืืืืช.
|
11 |
+
ืคืฉืื ืฉืืื ืืืชื ืฉืืื ืื ืืฉืชืืฉื ื- /start ืืืืจืื ืืฉืืื.
|
12 |
+
ืืืืืื: /start ืืื ืืืื ืื ืืืืช ืืืื ืืื?"""
|
13 |
+
},
|
14 |
+
'help': {
|
15 |
+
'en':
|
16 |
+
"""Here's how to use the Decision Making Helper Bot:
|
17 |
+
1. Ask a question directly
|
18 |
+
2. Use /start followed by your question
|
19 |
+
3. Wait for my response
|
20 |
+
I'll analyze your question and help you make a decision!""",
|
21 |
+
'he':
|
22 |
+
"""ืื ื ืืืฆื ืืืฉืชืืฉ ืืืื ืฉืขืืืจ ืืงืื ืืืืืืช:
|
23 |
+
1. ืฉืืื ืฉืืื
|
24 |
+
2. ืืฉืชืืฉื ื- /start ืืืืจืื ืฉืืื ืืช ืืฉืืื
|
25 |
+
3. ืืืชืื ื ืืชืฉืืื ืฉืื
|
26 |
+
ืื ื ืื ืชื ืืช ืืฉืืื ืืืขืืืจ ืืงืื ืืืืื!"""
|
27 |
+
},
|
28 |
+
'decide_help': {
|
29 |
+
'en': "Please provide a question after the /start command!",
|
30 |
+
'he': "ืื ื ืืืกืืคื ืฉืืื ืืืจื ืืคืงืืื /start!"
|
31 |
+
},
|
32 |
+
'decision': {
|
33 |
+
'en': "Regarding: {question}\nMy decision is: {decision}",
|
34 |
+
'he': "ืืืื ืืฉืืื: {question}\nืืืืืื ืฉืื ืืื: {decision}"
|
35 |
+
},
|
36 |
+
'no_question': {
|
37 |
+
'en': "Please ask me a question to help you decide!",
|
38 |
+
'he': "ืื ื ืฉืืื ืืืชื ืฉืืื ืืื ืฉืืืื ืืขืืืจ ืืื ืืืืืื!"
|
39 |
+
},
|
40 |
+
'error': {
|
41 |
+
'en': "Sorry, an error occurred. Please try again later.",
|
42 |
+
'he': "ืืฆืืขืจ, ืืืจืขื ืฉืืืื. ืื ื ื ืกื ืฉืื ืืืืืจ ืืืชืจ."
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
def get_response(key: str, language: str) -> str:
|
48 |
+
"""
|
49 |
+
Get the response string for a given key and language.
|
50 |
+
"""
|
51 |
+
return RESPONSES.get(key, {}).get(language, RESPONSES[key]['en'])
|