MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    ChatLearning——让bot学会你的群聊

    插件发布
    147
    818
    260360
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Koreyoshi
      Koreyoshi last edited by

      2022.4.2更新
      新增

      • 在问题被过滤时,将显示发送者QQ和群号

      修复

      • 修复了在指定群查找词库时会导致程序崩溃的问题
      • 修复了图片/表情包/表情会被过滤的问题

      更新注意

      • Windows只需覆盖exe文件
      • Linux只需覆盖ChatLearning文件
      • 源码需要覆盖所有py文件
      1 Reply Last reply Reply Quote 0
      • 是
        是沫路的 last edited by

        2022-04-02 11:10:37
        Traceback (most recent call last):
        File "ChatClass.py", line 107, in run
        File "Chatmain.py", line 953, in getcommand_chat
        File "simuse.py", line 76, in Fetch_Message
        TypeError: 'int' object is not subscriptable
        qwq启动以后这样报错,请问大佬问题出在哪里了

        ↓,这里是api-http
        adapters:
        debug: false
        enableVerify: true
        verifyKey: INITKEYABUmjO2d
        singleMode: false
        cacheSize: 4096
        adapterSettings: {
        http:
        host: localhost
        port: 8080
        cors: ["*"]}

        ↓这里是chatleaning里data的设置
        {
        "Key": "INITKEYABUmjO2d",
        "host": "127.0.0.1:8080",
        "port": "8080",
        "qq": "1806492272",
        "session": "XXX"
        }

        是 1 Reply Last reply Reply Quote 0
        • 是
          是沫路的 @是沫路的 last edited by

          然后打开回复和学习以后,也报错,用的是mcl1.2.2

          Koreyoshi 1 Reply Last reply Reply Quote 0
          • Koreyoshi
            Koreyoshi @是沫路的 last edited by Koreyoshi

            @是沫路的 api http的配置文件不需要花括号的,adapterSettings下面的一对花括号删了

            1 Reply Last reply Reply Quote 0
            • Misaka
              Misaka 摸鱼 @Koreyoshi last edited by

              @Koreyoshi
              从2.6.0升级到2.7.1后出现以下错误

              ChatLearning ->learning
              <-开始记录
              抛出异常,已记录到日志(log.log文件)
              Traceback (most recent call last):
              File "ChatClass.py", line 107, in run
              File "ChatMerge.py", line 68, in main
              File "ChatMerge.py", line 56, in getfile
              File "ChatMerge.py", line 17, in Merge
              _pickle.UnpicklingError: invalid load key, '\xef'.

              但是去掉之前的“群号.cl”文件后就不再报错 请问是不能继承老词库吗

              Koreyoshi 1 Reply Last reply Reply Quote 0
              • Koreyoshi
                Koreyoshi @Misaka last edited by

                @Misaka 不是的,从2.7.0之前的版本升级的话,刚启动时会出现a9fa938a-f3b1-49f7-b58d-9b0249c82881-image.png 的字样,有可能是您第一次打开的时候,程序非正常退出了?

                Misaka 2 Replies Last reply Reply Quote 0
                • Misaka
                  Misaka 摸鱼 @Koreyoshi last edited by

                  @Koreyoshi 没有出现这个提示诶 更新只替换了exe 启动后就出现这个log了

                  Koreyoshi 1 Reply Last reply Reply Quote 0
                  • Misaka
                    Misaka 摸鱼 @Koreyoshi last edited by

                    @Koreyoshi 回退到2.6.0的exe后倒是没有错误出现 就和我之前使用的时候一切正常的 太怪了

                    1 Reply Last reply Reply Quote 0
                    • Koreyoshi
                      Koreyoshi @Misaka last edited by

                      @Misaka 3b0b3ab7-b203-4141-a77a-6f36699a2221-image.png 关闭程序,用记事本打开config.clc文件,然后看看有没有version这个字段,有的话把我图中选中的地方删除,再重新打开试试

                      Misaka 1 Reply Last reply Reply Quote 0
                      • Misaka
                        Misaka 摸鱼 @Koreyoshi last edited by

                        @Koreyoshi 感谢 已解决!

                        Koreyoshi 1 Reply Last reply Reply Quote 0
                        • Koreyoshi
                          Koreyoshi @Misaka last edited by

                          @Misaka 应该就是第一次没正确打开

                          1 Reply Last reply Reply Quote 0
                          • M
                            mythm last edited by mythm

                            添加回复和学习后
                            2022-04-04 20:51:55
                            Traceback (most recent call last):
                            File "ChatClass.py", line 107, in run
                            File "Chatmain.py", line 953, in getcommand_chat
                            File "simuse.py", line 76, in Fetch_Message
                            TypeError: 'int' object is not subscriptable

                            2022-04-04 20:59:08
                            Traceback (most recent call last):
                            File "ChatClass.py", line 107, in run
                            File "ChatReply.py", line 252, in main
                            File "ChatReply.py", line 227, in listening
                            File "simuse.py", line 76, in Fetch_Message
                            TypeError: 'int' object is not subscriptable

                            2022-04-04 20:59:18
                            Traceback (most recent call last):
                            File "ChatClass.py", line 107, in run
                            File "ChatLearning.py", line 196, in main
                            File "ChatLearning.py", line 157, in listening
                            File "ChatLearning.py", line 117, in extractmessage
                            File "simuse.py", line 76, in Fetch_Message
                            TypeError: 'int' object is not subscriptable

                            net.mamoe.mirai-api-http/setting.yml
                            adapters:

                            • http
                              debug: false
                              enableVerify: true
                              verifyKey: 123456789
                              singleMode: false
                              cacheSize: 4096
                              adapterSettings:
                              http:
                              host: localhost
                              port: 8080
                              cors: []
                              http:
                              host: localhost
                              port: 1234
                              cors: [
                              ]

                            ChatLearning/data.json:
                            {
                            "Key": "123456789",
                            "host": "127.0.0.1:1234",
                            "port": "1234",
                            "qq": "1545215360",
                            "session": "XXX"
                            }

                            1 Reply Last reply Reply Quote 0
                            • M
                              mythm last edited by

                              2022-04-04 20:51:55
                              Traceback (most recent call last):
                              File "ChatClass.py", line 107, in run
                              File "Chatmain.py", line 953, in getcommand_chat
                              File "simuse.py", line 76, in Fetch_Message
                              TypeError: 'int' object is not subscriptable

                              这是咋回事啊

                              Koreyoshi 1 Reply Last reply Reply Quote 0
                              • Koreyoshi
                                Koreyoshi @mythm last edited by

                                @mythm setting.yml文件没配置对,在api http的readme下可以直接复制模板,照着改就行

                                M 1 Reply Last reply Reply Quote 0
                                • C
                                  crt106 last edited by

                                  image.png
                                  mirai-http连接应该是正确的 收到群内第一条消息后报错 之后貌似就不响应消息了

                                  Koreyoshi 1 Reply Last reply Reply Quote 0
                                  • M
                                    mythm @Koreyoshi last edited by

                                    @Koreyoshi ok

                                    1 Reply Last reply Reply Quote 0
                                    • Koreyoshi
                                      Koreyoshi @crt106 last edited by

                                      @crt106 出现这个问题的时候mirai端有报错吗

                                      C 1 Reply Last reply Reply Quote 0
                                      • C
                                        crt106 @Koreyoshi last edited by

                                        @Koreyoshi 没有 miraiconsole内一切正常 也没有关于mira-http的日志 这个问题貌似单纯重启不行 在删掉cl文件 移除learning和reply列表重新添加后看起来ok了 在渐渐记录问题了 再观察下

                                        Koreyoshi 1 Reply Last reply Reply Quote 0
                                        • Koreyoshi
                                          Koreyoshi @crt106 last edited by

                                          @crt106 好的

                                          1 Reply Last reply Reply Quote 0
                                          • Koreyoshi
                                            Koreyoshi last edited by Koreyoshi

                                            2022.4.6更新
                                            新增

                                            • 现在可以单独为群设置回复/语音回复概率
                                            • add/remove tag指令,现在可以为群添加Tag了!
                                            • typefreq指令,为不同类型的消息设置回复阈值
                                            • 管理模式新添加自动清理功能
                                            • 以上功能的详细介绍,请阅读READMEQ&A

                                            修复

                                            • 修复了CL文件不为数字时,无法Merge的问题
                                            • 修复了Linux下无法后台运行的问题
                                            • 修复了Linux下后台运行控制台输出无法重定向到日志文件的问题

                                            优化

                                            • 现在被过滤的词汇不会作为答案发送
                                            • 词库文件会单独放置WordStock文件夹

                                            更新注意

                                            • Windows只需覆盖exe文件
                                            • Linux只需覆盖ChatLearning文件
                                            • 源码需要覆盖所有py文件
                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 14
                                            • 15
                                            • 16
                                            • 17
                                            • 18
                                            • 40
                                            • 41
                                            • 16 / 41
                                            • First post
                                              Last post
                                            Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact