Skip to content

Latest commit

 

History

History
67 lines (54 loc) · 4.43 KB

README.md

File metadata and controls

67 lines (54 loc) · 4.43 KB

🤖 ChatGPT-Assistant

A ChatGPT dialogue assistant built with Streamlit, easy to use, stable, supporting the following features:

  • Multiple chat windows
  • History of conversations retained
  • Pre-set chat context
  • Model parameter adjustment
  • Export conversations as Markdown files
  • ChatGPT voice interaction (Edge browser on PC recommended)
  • Directly use the deployed project, you can configure the Openai Key in the web page's settings option. In this case, the history of conversations will not be retained and is only valid during the user's current session, not shared with others.
  • If deploying the project yourself, after configuring the Openai Key in Secrets, the history of conversations will be retained. In this case, it needs to be set as a private application to build a personal GPT assistant.

Usage Tips:

  • Double-click the page to directly locate the input bar
  • Ctrl + Enter to quickly submit questions

Deployment

Streamlit Cloud Deployment (Recommended)

Easy and free deployment, usable without the need for bypassing geo-restrictions, note to set as a private application. Refer to the detailed steps provided by @Hannah11111.

  1. Fork this project to your personal Github repository.
  2. Register for a Streamlit Cloud account, and connect to Github.
  3. Start deploying the application, refer to the official tutorial.
  4. Configure the Openai Key in the application's Secrets, see the following figure for the format:
advanced-setting.png set-apikey.png
Configuration can also be done after deployment is complete.

Local Deployment

  1. Create a virtual environment (recommended)

  2. Clone the project (or manually download it to local)

git clone https://github.com/PierXuY/ChatGPT-Assistant.git
  1. Install dependencies
pip install -r requirements.txt
  1. Set API Key; Set API Base (optional)
  • Write apikey = "Openai Key" in .streamlit/secrets.toml` file.
  • Science-free use can be achieved by writing the proxy interface in the .streamlit/secrets.toml file in the format apibase = "Proxy Interface Address", as described below:
    1. You can directly use the proxy interface already built by the project openai-forward, i.e. `apibase = "https://api.openai-forward.com/ v1".
    2. You can refer to the openai-forward project to build the proxy interface and set it up by yourself.
  1. Start the application
streamlit run app.py

Description

  • Customizable username and SVG-formatted avatar in custom.py file [(source)](https://www.dicebear. com/playground?style=identicon).
  • Edit set_context.py in the deployed project's source code to add the predefined context options, which will be automatically synchronized to the application.
  • If you are in a position to do so, you can consider changing the file read/write logic in helper.py to a cloud database operation to prevent history loss.

Acknowledgments