新增配置项,允许配置:超出最多携带对话数量 时,一次性丢弃多少条旧消息

This commit is contained in:
Raila23
2025-04-09 22:12:02 +08:00
parent 0b381e2570
commit 3d22772d4e
+6
View File
@@ -50,6 +50,7 @@ DEFAULT_CONFIG = {
"default_personality": "default",
"prompt_prefix": "",
"max_context_length": -1,
"dequeue_context_length": 1,
"streaming_response": False,
},
"provider_stt_settings": {
@@ -994,6 +995,11 @@ CONFIG_METADATA_2 = {
"type": "int",
"hint": "超出这个数量时将丢弃最旧的部分,用户和AI的一轮聊天记为 1 条。-1 表示不限制,默认为不限制。",
},
"dequeue_context_length": {
"description": "丢弃对话数量(条)",
"type": "int",
"hint": "超出 最多携带对话数量(条) 时,丢弃多少条记录,用户和AI的一轮聊天记为 1 条。",
},
"streaming_response": {
"description": "启用流式回复",
"type": "bool",