MiraiForum

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

    基于YiriMirai的ChatGPT

    其他项目发布
    6
    45
    1308
    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.
    • Anstiya
      Anstiya 摸鱼 last edited by Anstiya

      ChatGPT调用

      此项目基于acheong08的revChatGPT修改,此外也可以使用官方api。
      支持将对话记录储存在本地和使用现有的prompt。
      项目地址
      使用教程
      需要先安装并正确配置mirai-api-http,这里是一个配置示例
      1.1--->此项目推荐获取token(这个教程看到把token复制出来的部分就行了),
      1.2--->此外你需要获取cf_clearance,方法和获取token一样.QQ图片20221212095839.png
      1.3--->最后是获取user_agent,可以参考
      2--->你也可以使用官方的api,你可以在这里找到申请的教程。
      2.1如果你使用官方api,将你的apikey填入chatGPT.py中并运行main.py即可
      注册需要开代理,当遇到地区不可用问题请删除cookie或换个浏览器。运行时不需要代理。

      命令

      开始聊天前可选择seed,开始聊天使用revChatgpt,chat使用官方api

      seed#1

      开始聊天/chat

      stop

      clear

      记录模式

      停止记录

      问题

      如果你遇到了下面的问题,重新获取cf_clearance可解决

                  Debugging enabled.
                  
                  Logging in...
                  
                  Debugger enabled on OpenAIAuth
                  
                  juh5N23zsUtMKI1COcwk6v78PhKGsHQbNdYCIbI9IZw-1670805745-0-160
                  
                  Something went wrong! Please run with --debug to see the error.
                  
                  EOF occurred in violation of protocol (_ssl.c:1129)
      

      QQ图片20221211192756.jpg QQ图片20221211192803.jpg

      Anstiya 1 Reply Last reply Reply Quote 0
      • Anstiya
        Anstiya 摸鱼 last edited by Anstiya

        更新支持群内连续聊天,需要先在官网获取token。获取token可以参考这里,把token填入config.json。
        开始聊天 此指令用于发起聊天
        stop 此指令用于停止聊天(保留聊天数据)
        clear清除聊天数据(发送命令用户的)

        1 Reply Last reply Reply Quote 1
        • Anstiya
          Anstiya 摸鱼 last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • Anstiya
            Anstiya 摸鱼 last edited by

            增加长文本分段

            1 Reply Last reply Reply Quote 0
            • imi-123
              imi-123 last edited by

              这个影响使用吗大佬
              image.png

              Anstiya 1 Reply Last reply Reply Quote 0
              • Anstiya
                Anstiya 摸鱼 @imi-123 last edited by

                @imi-123 不影响的,发送 开始聊天 试试,正常进入对话就说明成功了。

                imi-123 1 Reply Last reply Reply Quote 0
                • imi-123
                  imi-123 @Anstiya last edited by

                  @Anstiya 不知道为什么刚开始能用,就是多聊几句之后程序窗口就没了。现在是打开之后问第一个问题窗口就直接关闭了

                  Anstiya 2 Replies Last reply Reply Quote 0
                  • Anstiya
                    Anstiya 摸鱼 @imi-123 last edited by Anstiya

                    @imi-123 是使用的官方的apikey还是获取的token。
                    可以打开cmd,拖进去看看有没有报错。
                    chatGPT的回复是有十几秒到几十秒延迟的。
                    或者尝试在任务管理器调整程序优先级。

                    1 Reply Last reply Reply Quote 0
                    • Anstiya
                      Anstiya 摸鱼 @imi-123 last edited by

                      @imi-123 不用尝试了。这个项目是由另一个大佬的项目改编对接到mirai的,那个项目似乎需要更新了。我待会更新一下仓库

                      imi-123 1 Reply Last reply Reply Quote 0
                      • imi-123
                        imi-123 @Anstiya last edited by

                        @Anstiya 好的,那我待会更新试一下

                        Anstiya 1 Reply Last reply Reply Quote 0
                        • Anstiya
                          Anstiya 摸鱼 @imi-123 last edited by Anstiya

                          @imi-123 修改了,更新即可。新的config另外需要两个值,已经在帖子更新了获取方法。

                          imi-123 1 Reply Last reply Reply Quote 0
                          • Anstiya
                            Anstiya 摸鱼 @Anstiya last edited by Anstiya

                            @Anstiya 增加seed,发送seed#1 可以读取猫娘存档。以此类推,会话内容保存在本地,适合调教

                            1 Reply Last reply Reply Quote 0
                            • imi-123
                              imi-123 @Anstiya last edited by imi-123

                              @Anstiya 更新之后还是会出现这样的问题,问一个问题之后就会出错。

                              Debugging enabled.
                              Logging in...
                              Debugger enabled on OpenAIAuth
                              juh5N23zsUtMKI1COcwk6v78PhKGsHQbNdYCIbI9IZw-1670805745-0-160
                              Something went wrong! Please run with --debug to see the error.
                              EOF occurred in violation of protocol (_ssl.c:1129)
                              
                              Anstiya 2 Replies Last reply Reply Quote 0
                              • Anstiya
                                Anstiya 摸鱼 @imi-123 last edited by Anstiya

                                @imi-123 全部更新,只更新config不行。

                                imi-123 1 Reply Last reply Reply Quote 0
                                • imi-123
                                  imi-123 @Anstiya last edited by

                                  @Anstiya 是全部都更新了

                                  1 Reply Last reply Reply Quote 0
                                  • Anstiya
                                    Anstiya 摸鱼 @imi-123 last edited by Anstiya

                                    @imi-123 重新获取cf_clearance可解决。我也是刚才还能用这会就也用不了了,这个更新验证好麻烦。

                                    imi-123 2 Replies Last reply Reply Quote 0
                                    • imi-123
                                      imi-123 @Anstiya last edited by

                                      @Anstiya 在 基于YiriMirai的ChatGPT 中说:

                                      重新获取cf_clearance

                                      重新获取cf_clearance之后能正常用了,谢谢大佬

                                      1 Reply Last reply Reply Quote 0
                                      • imi-123
                                        imi-123 @Anstiya last edited by

                                        @Anstiya clear那个指令发了之后没反应,之前的记录也没有清除

                                        Anstiya 1 Reply Last reply Reply Quote 0
                                        • Anstiya
                                          Anstiya 摸鱼 @imi-123 last edited by

                                          @imi-123 clear需要在聊天状态下发送才会执行。下午我改一下

                                          imi-123 1 Reply Last reply Reply Quote 0
                                          • imi-123
                                            imi-123 @Anstiya last edited by

                                            @Anstiya 好的,刚刚在聊天状态下发了好像也没有清除

                                            Anstiya 2 Replies Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 1 / 3
                                            • First post
                                              Last post
                                            Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact