The ChatGPT conversation assistant built on Streamlit is easy to use, not easy to disconnect, and supports the following functions:
- Multiple chat windows
- Preservation of historical conversations
- Default chat context
- Model parameter adjustment
- Export conversations as Markdown files
- ChatGPT voice communication (Edge browser on computer recommended)
- To directly use the deployed project, you can configure the Openai Key in the settings options of the web page. At this time, historical conversations will not be retained. It is only valid in the user's current session and will not be shared by others.
- Deploy the project by yourself. After configuring the Openai Key in Secrets, historical conversation records will be retained. At this time, it needs to be set as a private application to create a personal GPT assistant.
- Double-click the page to directly locate the input field
- Ctrl + Enter to quickly submit questions
It is easy and free to deploy and can be used without having to access the Internet. Please note that it is set as a private application. Please refer to the detailed steps provided by @Hannah11111.
Fork
this project to your personal Github repository.- Register a Streamlit Cloud account and connect to Github.
- Start deploying the application. For details, please refer to the official tutorial.
- Configure Openai Key in the Secrets of the application. Please refer to the figure below for the specific format:
-
Establish a virtual environment (recommended)
-
Clone the project (you can also manually download it locally)
git clone https://github.com/PierXuY/ChatGPT-Assistant.git
- Install dependencies
pip install -r requirements.txt
- Set API Key; set API Base (optional)
- Write
apikey = "Openai Key"
in the.streamlit/secrets.toml
file - Write the proxy interface in the
.streamlit/secrets.toml
file to achieve scientific use. The format isapibase = "agent interface address"
, and the description is as follows:- You can directly use the proxy interface established by the project openai-forward, that is,
apibase = "https://api.openai-forward.com/v1 "
. - You can refer to the openai-forward project to build the proxy interface and set it up yourself.
- You can directly use the proxy interface established by the project openai-forward, that is,
- Start the application
streamlit run app.py
- The user name and SVG format avatar can be customized in the custom.py file [(source)](https: //www.dicebear.com/playground?style=identicon).
- Edit set_context.py in the deployed project source code to add preset context options. Automatically syncs to the app.
- If possible, you can consider changing the file reading and writing logic in helper.py to cloud database operations to prevent History is lost.
- The earliest modification was based on the shan-mx/ChatGPT_Streamlit project, thank you.
- The default Context Function is referenced from [binary-husky/chatgpt_academic](https://github.com/binary -husky/chatgpt_academic) project and f/awesome-chatgpt-prompts project, thanks.
- The voice interaction function refers to the projects talk-to-chatgpt and [Voice Control for ChatGPT](https://chrome.google.com /webstore/detail/voice-control-for-chatgpt/eollffkcakegifhacjnlnegohfdlidhn) implementation, thanks.
- The local science-free Internet access function can use the project openai-forward, thank you.