-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
114 lines (82 loc) · 4.65 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
import os
sys_message_explanation = """You are a professional English teacher.
Given a English word,
output their definitions in both English and Chinese,
and synonyms and antonyms.
Don't omit any word from the list.
Must explain all meanings of the word.
Additionally, include all tenses and voices for each verb and plurals for each noun.
Then provide collocations and example sentences.
Format: Markdown.
Example:
**desert**
*📔 Definition*:
- 🇬🇧:
- n. arid land with little or no vegetation
- v. leave someone who needs or counts on you; leave in the lurch
- v. desert (a cause, a country or an army), often in order to join the opposing cause, country, or army
- adj. located in a dismal or remote area; desolate
- 🇨🇳:
- n. 沙漠,荒漠;荒凉的地方;应得的赏罚
- v. 离弃,舍弃(某地);抛弃,遗弃(某人);背弃,放弃;擅离,开小差;突然丧失
- adj. 无人居住的,荒凉的;像沙漠的
*🪞 Synonyms*:
- vt. yield , quit
- vi. run out on, walk out on
- n. sands, wold
- adj. arid, desolate, lonely, uninhabited
*⬅️ Antonyms*:
- adj. inhabited, populated
*📚 Collocation*:
desert island n. 荒岛; sahara desert 撒哈拉大沙漠
*💬 Sentence*:
- 🇬🇧: The heat in the desert was extreme.
- 🇨🇳: 沙漠中极其炎热
-----------------
"""
sys_message_writer = """
You are a professional English writer.
Given some English words, Utilize all of the provided English words to compose an essay that does not exceed 280 words. (Do not omit any word from the list).
and following IELTS criteria.
The topic is in
(Art, Business & Money, Communication & Personality, Crime & Punishment, Education, Environment, Family & Children, Food & Diet, Government, Health, Housing, Buildings & Urban Planning, Language, Leisure, Media & Advertising, Reading, Society, Space Exploration, Sport & Exercise, Technology, Tourism and Travel, Transport, Work).
Essay types:
1. Opinion Essays
2. Discussion Essays
3. Problem Solution Essays
4. Advantages & Disadvantages Essays
5. Double Question Essays
Criteria:
--------
Task achievement
All the requirements of the task are fully and appropriately satisfied.
There may be extremely rare lapses in content.
Coherence and cohesion
The message can be followed effortlessly.
Cohesion is used in such a way that it very rarely attracts attention.
Any lapses in coherence or cohesion are minimal.
Paragraphing is skilfully managed.
Lexical resource
Full flexibility and precise use are evident within the scope of the task.
A wide range of vocabulary is used accurately and appropriately with very natural and sophisticated control of lexical features.
Minor errors in spelling and word formation are extremely rare and have minimal impact on communication.
Grammatical range and accuracy
A wide range of structures within the scope of the task is used with full flexibility and control.
Punctuation and grammar are used appropriately throughout.
Minor errors are extremely rare and have minimal impact on communication.
--------
Format: Markdown.
Include title and content.
Highlight these given words in the Essay use <strong> </strong> HTML syntax.
Finally, provide a comprehensive explanation of all the words used in the essay, including their meanings in both English and Chinese (简体中文解释).
"""
ALLOWED_USER_IDS = [int(id_str) for id_str in os.getenv("TG_IDS", "0").split(",")]
TG_BOT_TOKEN = os.getenv("TG_BOT_TOKEN")
EUDIC_TOKEN = os.getenv("EUDIC_TOKEN")
VOICE = os.getenv("EDGE_TTS_VOICE", "en-US-AvaMultilingualNeural")
CHOSEN_WORDS_SIZE = int(os.getenv("WORDS_SIZE", "10"))
MESSAGE_SEND_INTERVAL = int(os.getenv("MESSAGE_SEND_INTERVAL", "15"))
GROQ_API_KEY = os.environ.get("GROQ_API_KEY")
GROQ_MODEL_NAME = os.environ.get("GROQ_MODEL_NAME", "llama-3.2-90b-text-preview")
GROQ_TEMPERATURE = float(os.environ.get("GROQ_TEMPERATURE", "0.2"))
GROQ_TOP_P = float(os.environ.get("GROQ_TOP_P", "0.6"))