jerrita 9 months ago
parent
commit
8ae445838f
1 changed files with 5 additions and 1 deletions
  1. 5 1
      plugins/anon/glm.py

+ 5 - 1
plugins/anon/glm.py

@@ -88,9 +88,12 @@ class GlmPlugin(Plugin):
             logger.info('GlmPlugin: load cache')
             logger.info('GlmPlugin: load cache')
             self._client.system = self.storage['system']
             self._client.system = self.storage['system']
             self._group_shared_cache = self.storage['group_shared_cache']
             self._group_shared_cache = self.storage['group_shared_cache']
-            logger.info(f'GlmPlugin: system prompt: {self._client.system}')
+            self._client.max_cut_length = self.storage['max_cut_length']
+            logger.info(f'system prompt: {self._client.system}')
+            logger.info(f'max_cut_length: {self._client.max_cut_length}')
         else:
         else:
             self.storage['group_shared_cache'] = False
             self.storage['group_shared_cache'] = False
+            self.storage['max_cut_length'] = self._client.max_cut_length
             self._group_shared_cache = False
             self._group_shared_cache = False
             self.storage['system'] = self._client.system
             self.storage['system'] = self._client.system
             logger.info('GlmPlugin: init cache')
             logger.info('GlmPlugin: init cache')
@@ -124,6 +127,7 @@ class GlmPlugin(Plugin):
                 )
                 )
             if cmd == 'cutlen':
             if cmd == 'cutlen':
                 self._client.max_cut_length = int(args[0])
                 self._client.max_cut_length = int(args[0])
+                self.storage['max_cut_length'] = self._client.max_cut_length
                 await event.reply(f'max_cut_length set to {args[0]}')
                 await event.reply(f'max_cut_length set to {args[0]}')
             if cmd == 's/sys':
             if cmd == 's/sys':
                 self._client.system = ' '.join(args)
                 self._client.system = ' '.join(args)