Git Product home page Git Product logo

sdsds222 / html-chatgpt-3.js Goto Github PK

View Code? Open in Web Editor NEW
22.0 2.0 10.0 1.36 MB

一个用原生JavaScript和编写的ChatGPT聊天界面,基于openai的GPT-3 API接口实现, 并增加记忆对话上下文的功能,使AI对话更加自然,通过特殊手段防止其“接话”,可实现与官网ChatGPT类似的持续性对话效果。

Home Page: http://sdsds222.gitee.io/chat-gpt.js/

License: MIT License

HTML 100.00%
chatgpt javascript css html

html-chatgpt-3.js's Introduction

ChatGPT.js

ChatGPT-3.5.js聊天界面项目更新,使用官方最新版 GPT-3.5 turbo api 实现对话功能和记忆功能,速度更快,价格更低,功能更强大。

优化用户界面和功能。

前往 ChatGPT-3.5.js 仓库地址:https://github.com/sdsds222/ChatGPT-3.5.js

ChatGPT-3.5.js 静态网页:http://sdsds222.gitee.io/chat-gpt-3.5.js

介绍

一个用原生JavaScript和编写的ChatGPT聊天界面,基于openai的GPT-3 API接口实现,

并增加记忆对话上下文的功能,使AI对话更加自然,通过特殊手段防止其“接话”,可实现与官网ChatGPT类似的持续性对话效果。

静态网页:http://sdsds222.gitee.io/chat-gpt.js/

输入图片说明 输入图片说明

软件架构

软件架构说明 Javascript HTML CSS

安装教程

  1. 将完整项目克隆到电脑
  2. 双击index.html文件
  3. 启动浏览器运行

使用说明

  1. 要使用该页面需要提前自备openai的apikey,否则将无法正常使用所有功能。
  2. 基于原生Javascript,可直接部署到静态网页托管平台运行。
  3. 在输入框输入“/help”即可查看支持的指令,可通过这些指令来更改发送请求的参数以调整AI的行为: /help (用于查看帮助信息) /apikey (为每次发送的文本添加前置上下文) /prompt (为每次发送的文本添加前置上下文) /maxtoken (用于控制ChatGPT每次能生成的词数.) /tpr (可以用来控制chatbot生成的话的多样性) /top (可以用来控制chatbot生成的话的质量) /fp (可以用来控制chatbot生成的话的“新颖程度”) /pp (用于控制bot产生的句子的长度) /info (用于显示当前各项参数的值) /mode (用于设置是否启用持续对话模式)

输入/info后,将显示所有参数的值:

输入图片说明

由于本项目能够持续对话的原理是将之前的历史对话内容作为上下文语境也一并发送给GPT-3的接口,这会导致账户额度的浪费,可以在控制台输入“/mode”并在输入框输入“false”来关闭持续对话模式。

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

特技

合理利用prampt参数来设置每句话的前置上下文,可以使AI的语气和性格长期保持一致,也可以使关键信息不被AI忘记。

本项目中有一部分代码由ChatGPT生成。

html-chatgpt-3.js's People

Contributors

sdsds222 avatar

Stargazers

戴敏 avatar  avatar Obliviate avatar  avatar Ethan avatar Vince Chen avatar Zhuoshen Tan avatar Fernanda Developer avatar  avatar  avatar  avatar  avatar 繁星_逐梦 avatar ChicKPort avatar  avatar Jonathan Chourio avatar  avatar  avatar  avatar Schwarzer avatar Jun avatar  avatar

Watchers

 avatar Kostas Georgiou avatar

html-chatgpt-3.js's Issues

合作开发

我们在开发关于基于chat gpt内核的应用,如果有兴趣,你可以先开一个合适的价格。电话:13615899736 季先生 或 Email:[email protected]

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.