File tree Expand file tree Collapse file tree 2 files changed +17
-10
lines changed Expand file tree Collapse file tree 2 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ Model = gpt-3.5-turbo-1106
9
9
# Higher temperature equals more creative (= less factual) output. much over 1.0 not recommended.
10
10
Temperature = 1.0
11
11
12
- # Timeout (in seconds to wait for the reply)
12
+ # Timeout on OpenAI API requests
13
+ # (in seconds to wait for the reply)
13
14
Timeout = 30.0
14
15
15
16
# Maximum number of tokens in context
@@ -38,6 +39,15 @@ IsBotDisabled = False
38
39
# Message to send to the user if the bot is disabled.
39
40
BotDisabledMsg = " This bot is currently taking a break! Sorry!"
40
41
42
+ # ~~~
43
+ # WIP
44
+ # ~~~
45
+ # Session timeout in minutes (0 = disable trimming based on time)
46
+ # SessionTimeoutMinutes = 1
47
+
48
+ # Max messages to retain after session timeout (0 = clear entire history)
49
+ # MaxRetainedMessages = 0
50
+
41
51
# ~~~~~~~~~~~
42
52
# Local setup
43
53
# ~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -58,15 +58,6 @@ class TelegramBot:
58
58
59
59
def __init__ (self ):
60
60
61
- # Load configuration first
62
- self .load_config ()
63
-
64
- # Initialize logging
65
- self .initialize_logging ()
66
-
67
- # Initialize chat logging if enabled
68
- self .initialize_chat_logging ()
69
-
70
61
# Attempt to get bot & API tokens
71
62
try :
72
63
self .telegram_bot_token = get_bot_token ()
@@ -75,6 +66,12 @@ def __init__(self):
75
66
self .logger .error (f"Required configuration not found: { e } " )
76
67
sys .exit (1 )
77
68
69
+ # Load configuration first
70
+ self .load_config ()
71
+
72
+ # Initialize logging
73
+ self .initialize_logging ()
74
+
78
75
# Initialize chat logging if enabled
79
76
self .initialize_chat_logging ()
80
77
You can’t perform that action at this time.
0 commit comments