Przeglądaj źródła

fix: remove unuse log and add plugin config in docker config

zhayujie 2 lat temu
rodzic
commit
6e0d2f9437
2 zmienionych plików z 7 dodań i 1 usunięć
  1. 1 1
      bot/linkai/link_ai_bot.py
  2. 6 0
      plugins/config.json.template

+ 1 - 1
bot/linkai/link_ai_bot.py

@@ -362,7 +362,7 @@ class LinkAISessionManager(SessionManager):
         try:
         try:
             max_tokens = conf().get("conversation_max_tokens", 2500)
             max_tokens = conf().get("conversation_max_tokens", 2500)
             tokens_cnt = session.discard_exceeding(max_tokens, total_tokens)
             tokens_cnt = session.discard_exceeding(max_tokens, total_tokens)
-            logger.info(f"[LinkAI] chat history discard, before tokens={total_tokens}, now tokens={tokens_cnt}")
+            logger.debug(f"[LinkAI] chat history, before tokens={total_tokens}, now tokens={tokens_cnt}")
         except Exception as e:
         except Exception as e:
             logger.warning("Exception when counting tokens precisely for session: {}".format(str(e)))
             logger.warning("Exception when counting tokens precisely for session: {}".format(str(e)))
         return session
         return session

+ 6 - 0
plugins/config.json.template

@@ -33,6 +33,12 @@
             "max_tasks": 3,
             "max_tasks": 3,
             "max_tasks_per_user": 1,
             "max_tasks_per_user": 1,
             "use_image_create_prefix": true
             "use_image_create_prefix": true
+        },
+        "summary": {
+            "enabled": true,
+            "group_enabled": true,
+            "max_file_size": 5000,
+            "type": ["FILE", "SHARING"]
         }
         }
     }
     }
 }
 }