Code Monkey home page Code Monkey logo

chatgpt-wxapp's Introduction

由于ChatGPT内容属于小程序平台未开放的服务范围,已无法再用过本代码部署小程序

ChatGPT微信小程序源码

包含前后端代码,基于OpenAI GPT-3.5 Turbo API的 demo

后端部署

接口部署

  1. 首先需要有一台外区的服务器,服务器环境要求python3.7以上版本,安装flask框架,拷贝index.py到flask运行目录,填写好key
  2. 安装openai库到项目目录 pip3 install openai -t ./
  3. 运行项目 python3 index.py

目前openai加强了api key的违规检测,对于直接部署在云函数的接口,因为IP不固定等原因很容易封号,现有两个解决方案

  1. 有自己的备案域名,绑定到自己部署的服务器地址即可
  2. 无备案域名,使用阿里云云函数创建nginx进行反向代理到你在外区所部署的接口服务器,使用云函数分配的url为接口地址

前端部署

  1. 创建好小程序相关内容,打开小程序开发者工具
  2. 导入项目,修改index.js中的apiurl为你的接口地址即可运行

演示地址:

gh_01d6acdd49ae_344

交流群:(微信群满了,加微信号mr_zabsa拉群,备注加群)

微信图片_20230313125145

chatgpt-wxapp's People

Contributors

smallnew666 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.