Git Product home page Git Product logo

caavemaan / chatgpt-assistant Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pierxuy/chatgpt-assistant

0.0 0.0 0.0 1016 KB

基于Streamlit搭建的ChatGPT对话助手,无须科学上网即可使用,可免费云部署。支持多窗口、语音交流、对话留存、上下文预设以及参数调节等功能。

Home Page: https://pearxuy-gpt.streamlit.app

License: Apache License 2.0

JavaScript 33.51% Python 58.33% CSS 5.10% HTML 3.06%

chatgpt-assistant's Introduction

🤖 ChatGPT-Assistant

基于Streamlit搭建的ChatGPT对话助手,简单易用,不易断连,支持以下功能:

  • 多聊天窗口
  • 历史对话留存
  • 预设聊天上下文
  • 模型参数调节
  • 对话导出为Markdown文件
  • ChatGPT语音交流(推荐电脑端Edge浏览器)
  • 直接使用已部署项目,可在网页的设置选项中配置Openai Key,此时不会留存历史对话,仅在用户当前会话有效,他人不会共享。
  • 自行部署项目,在Secrets中配置Openai Key后,将留存历史对话记录,此时需设置为私人应用,打造为个人GPT助理。

使用技巧:

  • 双击页面可直接定位输入栏
  • Ctrl + Enter 可快捷提交问题

部署

Streamlit Cloud部署(推荐)

轻松免费部署,且无须科学上网即可使用,注意设置为私人应用。
可参考由@Hannah11111提供的详细步骤

  1. Fork本项目到个人Github仓库。
  2. 注册Streamlit Cloud账号,并连接到Github。
  3. 开始部署应用,具体可参考官方教程
  4. 在应用的Secrets中配置Openai Key,具体格式参考下图:
advanced-setting.png set-apikey.png
也可以在部署完成后再进行配置。

本地部署

本地部署需要科学上网。

  1. 建立虚拟环境(建议)

  2. 克隆项目(也可以手动下载到本地)

git clone https://github.com/PierXuY/ChatGPT-Assistant.git
  1. 安装依赖
pip install -r requirements.txt
  1. 设置API Key
  • .streamlit/secrets.toml文件中写入apikey = "Your Openai Key"
  1. 启动应用
streamlit run app.py

说明

  • custom.py文件中可自定义用户名和SVG格式头像(来源)
  • 在部署的项目源码中编辑set_context.py,即可增加预设定的上下文选项,会自动同步到应用中。
  • 有条件的可以考虑把helper.py中的文件读写逻辑改为云数据库操作,防止历史记录丢失。

致谢

chatgpt-assistant's People

Contributors

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