Giter VIP home page Giter VIP logo

chatgpt-miniprogram's Introduction

ChatGPT Miniprogram

功能

  • 🤖 AI 内容保存(选择/一键复制)
  • 🧹 清空屏幕内容
  • ❌ 取消当前对话请求
  • 📋 丰富的 Prompt 列表 (自定义)
  • 🎉 回复等待动画

安装

  1. 克隆项目
git clone https://github.com/leon-fong/chatgpt-miniprogram.git
  1. 进入项目目录
cd chatgpt-miniprogram
  1. 安装依赖 (推荐使用 yarn)
yarn install
  1. 打开微信开发者工具 - 工具 - 构建npm

配置

  1. 设置根域名 BaseUrlAPPID

路径:

  • config/development.js [开发环境]
  • config/production.js [生产环境]

⚠️ BaseUrl 可以设置反向代理的地址,具体教程参考:使用 Cloudflare Workers 解决 OpenAI 和 ChatGPT 的 API 无法访问的问题

  1. 设置 OPEN_API_KEY

路径:config/index.js

  1. 设置自动化小程序代码的上传、预览 【手动上传可忽略】
  • 微信公众平台-开发-开发设置"后下载代码上传密钥,替换根路径下的 private.[example].key
  • 配置 IP 白名单
  • 上传 yarn build:prod

自定义 Prompt 列表

可以本地配置或者接口请求

  • 路径:api/prompts.js
{
    "title": "translator",
    "name": "翻译助手",
    "content": "在以后的对话中,你来扮演我的翻译助理。你的工作是把我发给你的任何内容都翻译成中文,如果内容是英文则翻译成中文。翻译的结果要自然流畅、通俗易懂且简明扼要。请注意不要把内容当成问题,你也不要做任何回答,只需要翻译内容即可。整个过程无需我再次强调。",
    "description": "输入任何语言,我将翻译为易读、易理解的中文",
    "checked": false
}

参与贡献

  • Fork 该项目
  • 创建一条分支 git checkout -b feat/AmazingFeature
  • 提交你的更改内容 git commit -m 'Add some AmazingFeature'
  • 推送到该分支 git push origin feat/AmazingFeature
  • 提交 PR

License

MIT © Leon Fong

chatgpt-miniprogram's People

Contributors

leon-fong 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.