lanvent / plugin_summary

27 stars 10 forks source link

大大!目前好像只支持了openai?其他模型都不能使用 #3

Open moyess opened 3 months ago

moyess commented 3 months ago

image 这里我修改过后发现还是会报错: Worker return exception: 'AliQwenBot' object has no attribute 'args' Traceback (most recent call last): File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\AI-Project\chatgpt-on-wechat\channel\chat_channel.py", line 170, in _handle reply = self._generate_reply(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\AI-Project\chatgpt-on-wechat\channel\chat_channel.py", line 180, in _generate_reply e_context = PluginManager().emit_event( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\AI-Project\chatgpt-on-wechat\plugins\plugin_manager.py", line 189, in emit_event instance.handlers[e_context.event](e_context, args, **kwargs) File "E:\AI-Project\chatgpt-on-wechat\plugins\plugin_summary\main.py", line 284, in on_handle_context count, summarys = self._split_messages_to_summarys(records, max_tokens_persession) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\AI-Project\chatgpt-on-wechat\plugins\plugin_summary\main.py", line 176, in _split_messages_to_summarys self.bot.args["max_tokens"] = 400 ^^^^^^^^^^^^^ AttributeError: 'AliQwenBot' object has no attribute 'args'

mela93 commented 3 months ago

是的我用的智普AI的glm-4,发现不能用总结

whjstc commented 3 weeks ago

main.py 81 行修改成:

    if btype not in [const.OPEN_AI, const.CHATGPT, const.CHATGPTONAZURE, const.LINKAI, const.ZHIPU_AI]: