Skip to content

Commit ef59d93

Browse files
authored
feat: added new configuration env to tweak token limits for recap messages (#186)
Signed-off-by: Neko Ayaka <[email protected]>
1 parent 512c9ae commit ef59d93

File tree

5 files changed

+109
-74
lines changed

5 files changed

+109
-74
lines changed

.env.example

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@
5555
# # OpenAI Token 限制,用于在调用 Chat Completion API 之前计算文本的分割和截断,一般设置为模型的最大令牌限制,然后交由 insights-bot 决定如何处理,默认为 `4096`
5656
# OPENAI_API_TOKEN_LIMIT=4096
5757

58+
# # OpenAI chat histories recap token limit, token length of generated and response chat histories recap message, default is 2000, this will leave OPENAI_API_TOKEN_LIMIT - 2000 tokens for actual chat context
59+
# # OpenAI 聊天历史记录回顾令牌限制,生成的和响应的聊天历史记录回顾消息的令牌长度,默认值为 2000,这将会给实际的聊天上下文留下 OPENAI_API_TOKEN_LIMIT - 2000 个令牌
60+
# OPENAI_API_CHAT_HISTORIES_RECAP_TOKEN_LIMIT=2000
61+
5862
# # PostgreSQL database URL. Such as `postgres://postgres:postgres@localhost:5432/postgres`.
5963
# # You could also suffix with `?search_path=<schema name>` if you want to specify a schema
6064
# # PostgreSQL 数据库 URL。例如 `postgres://postgres:postgres@localhost:5432/postgres`。
@@ -94,3 +98,11 @@
9498
# Log level, default is `info`, available options are `debug`, `info`, `warn`, `error`
9599
# 日志级别,默认值为 `info`,可用选项为 `debug`、`info`、`warn`、`error`
96100
# LOG_LEVEL=info
101+
102+
# # Specify whether the management feature is enabled with this bot instance, default is `false`
103+
# # 指定是否启用此机器人实例的管理功能,默认值为 `false`
104+
# MANAGEMENT=false
105+
106+
# # Specify a Telegram user id to enable assign the user as a management admin of bot instance, default is `0`
107+
# # 指定一个 Telegram 用户 ID 以将该用户指定为机器人实例的管理管理员,默认值为 `0`
108+
# MANAGEMENT_ADMIN_USER_TELEGRAM_CHAT_ID=0

0 commit comments

Comments
 (0)