Introduction to ChatGPT-Web Project
The ChatGPT-Web project is a fascinating open-source initiative designed to facilitate user interaction with OpenAI's language and image generation models. Hosted on platforms like Vercel and Netlify, this project is easy for developers to deploy and offers a flexible choice between two branches: Next and Astro. Each branch has its own unique framework and features that cater to different user preferences.
Branch Choices
-
Next Branch: This version offers a seamless experience with faster initial loading times. Users can try the Vercel and Netlify deployments to explore its capabilities.
-
Astro Branch: Although it has a slightly longer white screen time during the first load, it still provides a solid user experience. The Astro version is available here.
Features
The ChatGPT-Web project provides a powerful set of features that make it stand out:
- OpenAI API Integration: Supports conversation via OpenAI's
/v1/chat/completions
and image generation through/v1/images/generations
. - Custom Prompts: Users can set prompts using a wide range of templates.
- Mobile-Friendly Design: The interface is optimized for mobile devices.
- Security and Privacy: Offers access passwords and browser-local caching for prompt storage.
- Multi-Session and Continuous Conversations: Users can engage in multiple sessions and maintain ongoing conversations with token usage tracking.
- Customization: Allows for model configuration and chat aesthetics, including night mode.
- Convenience Features: Facilitates copying of conversation content and code snippets.
- Advanced Search and i18n Support: Use of
/
to search prompts and internationalization features. - Voice Recognition and Synthesis: Utilizes browser APIs for ASR and TTS functionalities.
How to Use
- API Keys: Be aware that the OPENAI KEY is stored in clear text in local storage, and API keys are transmitted in clear text during requests.
- Navigation Tips: Pressing the up arrow key with an empty input box will autofill the last message.
Prompt Tips
- Keep questions out of prompts to avoid repeated querying.
- System prompts highlight the settings button.
- Prompts can be copied by clicking the "PROMPT" label at the bottom of messages.
- Retry buttons allow for prompt restoration and update local storage values.
- Messages can be sent without content; the list will display the system prompt in such cases.
Continuous Dialogue
- Activation highlights the button; messages incorporate a conversionId.
- Dialogue references messages by conversionId.
- Icons distinguish continuous messages.
- Historical messages are maintained by conversionId, respecting a 1000-token limit for replies.
- Latest relevant messages are prioritized, informed by GPT-4 token count.
Environment Variables
The supported variables, crucial for the backend functionality, include:
OPENAI_API_KEY
OPENAI_API_HOST
OPENAI_API_MODEL
ACCESS_CODE
for restricted access
Acknowledgments
The project appreciates contributions from several open-source projects including chatgpt-demo
, ChatGPT-Shortcut
, and awesome-chatgpt-prompts-zh
. It relies on various libraries such as nextjs
, react
, chakra-ui
, and more to deliver its robust functionalities.
Through its extensive features and user-friendly design, ChatGPT-Web presents a comprehensive solution for leveraging OpenAI's APIs, making it an intriguing option for developers and users eager to experience the capabilities of modern AI technologies.