[ChatGPT] 使用Python对接OpenAi APi 实现智能QQ机器人(一)
代码中使用到的revChatGPT依赖源码库: https://github.com/acheong08/ChatGPT 下面代码的目的是与ChatGPT官方接口进行交互,注意安装一下里面用到的依赖 chat-gpt-qbot.py: import flask, json from flask import request from revChatGPT.revChatGPT import Chatbot config = { "session_token": "换成你自己的token" } # 创建一个服务,把当前这个python文件当做一个服务