mirror of
https://github.com/aljazceru/chatgpt-telegram-bot.git
synced 2025-12-20 14:14:52 +01:00
increase MAX_HISTORY_SIZE to 15
This commit is contained in:
@@ -61,7 +61,7 @@ Customize the configuration by copying `.env.example` and renaming it to `.env`,
|
|||||||
| `SHOW_USAGE` | Whether to show OpenAI token usage information after each response | false |
|
| `SHOW_USAGE` | Whether to show OpenAI token usage information after each response | false |
|
||||||
| `STREAM` | Whether to stream responses | true |
|
| `STREAM` | Whether to stream responses | true |
|
||||||
| `MAX_TOKENS` | Upper bound on how many tokens the ChatGPT API will return | 1200 |
|
| `MAX_TOKENS` | Upper bound on how many tokens the ChatGPT API will return | 1200 |
|
||||||
| `MAX_HISTORY_SIZE` | Max number of messages to keep in memory, after which the conversation will be summarised to avoid excessive token usage | 10 |
|
| `MAX_HISTORY_SIZE` | Max number of messages to keep in memory, after which the conversation will be summarised to avoid excessive token usage | 15 |
|
||||||
| `MAX_CONVERSATION_AGE_MINUTES` | Maximum number of minutes a conversation should live since the last message, after which the conversation will be reset | 180 |
|
| `MAX_CONVERSATION_AGE_MINUTES` | Maximum number of minutes a conversation should live since the last message, after which the conversation will be reset | 180 |
|
||||||
| `VOICE_REPLY_WITH_TRANSCRIPT_ONLY` | Whether to answer to voice messages with the transcript only or with a ChatGPT response of the transcript | true |
|
| `VOICE_REPLY_WITH_TRANSCRIPT_ONLY` | Whether to answer to voice messages with the transcript only or with a ChatGPT response of the transcript | true |
|
||||||
| `N_CHOICES` | Number of answers to generate for each input message | 1 |
|
| `N_CHOICES` | Number of answers to generate for each input message | 1 |
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ def main():
|
|||||||
'show_usage': os.environ.get('SHOW_USAGE', 'false').lower() == 'true',
|
'show_usage': os.environ.get('SHOW_USAGE', 'false').lower() == 'true',
|
||||||
'stream': os.environ.get('STREAM', 'true').lower() == 'true',
|
'stream': os.environ.get('STREAM', 'true').lower() == 'true',
|
||||||
'proxy': os.environ.get('PROXY', None),
|
'proxy': os.environ.get('PROXY', None),
|
||||||
'max_history_size': int(os.environ.get('MAX_HISTORY_SIZE', 10)),
|
'max_history_size': int(os.environ.get('MAX_HISTORY_SIZE', 15)),
|
||||||
'max_conversation_age_minutes': int(os.environ.get('MAX_CONVERSATION_AGE_MINUTES', 180)),
|
'max_conversation_age_minutes': int(os.environ.get('MAX_CONVERSATION_AGE_MINUTES', 180)),
|
||||||
'assistant_prompt': os.environ.get('ASSISTANT_PROMPT', 'You are a helpful assistant.'),
|
'assistant_prompt': os.environ.get('ASSISTANT_PROMPT', 'You are a helpful assistant.'),
|
||||||
'max_tokens': int(os.environ.get('MAX_TOKENS', 1200)),
|
'max_tokens': int(os.environ.get('MAX_TOKENS', 1200)),
|
||||||
|
|||||||
Reference in New Issue
Block a user