Giter VIP home page Giter VIP logo

chatgpt's Introduction

ChatGPT 微信聊天机器人

更新日志

部署 AI 接口

  • 首先你需要注册一个 ChatGPT 的账号;
  • 然后获取一个 API key
  • 接着将 API key 填入 interface.cjs 文件中第 8 行的 apiKey 即可;
  • 最后开启服务,可以自己测试接口是否正常等等。

部署步骤

  • 首先在项目根目录运行 npm i 按照 node_modules 文件;
  • 其次将 config.js 文件按照注释内容填写完整;
  • 接着在当前项目的根目录下的终端中输入 export OPENAI_API_KEY=你的API key
  • 然后将 interface.cjs 文件部署到服务器上,可进行接口测试一下,看看是否能正常获取内容;
  • 最后在服务器上运行 index.js 文件,然后扫码登录后就能拥有一个聊天机器人🤖️啦。

因为官方提供的接口可能比在网页上聊天会少很多服务,所以可能看着没有网页版的智能,但是因为官方加了一层验证后,原本的第三方库目前无法使用(作者尝试过按照 issue 里的解决,但是失败了),所以只能放弃转而使用官方的提供的 API 接口,官方的示例文档可以点击这里查看。

写在最后

开源协议

MIT

chatgpt's People

Contributors

ox4f5da2 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.