At the beginning of this month, ChatGPT came out at an alarming rate, causing widespread discussion in the technology circle. Recently, a number of ChatGPT-related open source projects have been born on GitHub. The number is staggering. ChatGPT even dominates most of GitHub Trending. So, what kind of charm does it have that makes many developers so excited? Let’s explore it together.
Registration
Currently, ChatGPT cannot be registered directly in China. Access needs to be through an agent, and you need to use a mobile phone number in other countries to register. For the specific registration method, you can read this article [1 ]
Function Experience
ChatGPT can realize tasks such as intelligent chatting, poetry, writing, programming, bug correction, writing weekly reports, Zhihu Q&A, etc.
For example, I can use it to write
1. Front-end component
Use React hooks to write an echarts component
The above code implements basic components, but no sample code is given. We can continue to ask
give an example of options for a line chart
2. Optimization Weekly report
Optimize last week’s weekly report to make it richer
In the weekly report, not only did they help me optimize the content, but they also helped me arrange my work for next week. , what do you think of the organization of ChatGPT?
The author believes that although it is not perfect, the answers given within the given keywords are already very unexpected.
For more experience, you can explore it by yourself. Let’s take a look at the ChatGPT project on GitHub.
Node.js API interface
Front-end engineers are familiar with Nodejs, and the official website has a nodejs interface
openai
First install openai through npm
npm install openai
Then you can use the following code in any interface
const { Configuration, OpenAIApi } = require("openai"); const configuration = new Configuration({ apiKey: process.env.OPENAI_API_KEY, }); const openai = new OpenAIApi(configuration); const response = await openai.createCompletion({ model: "text-davinci-003", prompt: "你好", max_tokens: 255, temperature: 0.5, }); // 打印 API 返回的结果 console.log(response.data.choices[0].text);
- createCompletion means automatic completion, which is consistent with the official website's reply method;
- max_tokens The largest tokens The quantity can be understood as the number of characters returned. Most content is within 2048. Of course, max_tokens returns the interface slower.
- temperature: Between 0-1, the temperature parameter represents the degree of randomness or unpredictability in the generated text. Higher temperature values will produce more creative and varied output, while lower temperature values will produce more predictable and repetitive text.
- OPENAI_API_KEY can be generated through the View API keys page.
chatgpt
The other is a personal development project, which re-encapsulates the API of ChatGPT, making customized development easy. More convenient.
Install chatgpt via npm.
npm install chatgpt
import { ChatGPTAPI } from 'chatgpt' async function example() { // sessionToken is required; see below for details const api = new ChatGPTAPI({ sessionToken: process.env.SESSION_TOKEN }) // ensure the API is properly authenticated await api.ensureAuth() // send a message and wait for the response const response = await api.sendMessage( 'Write a python version of bubble sort.' ) // response is a markdown-formatted string console.log(response) }
SESSION_TOKEN value needs to be copied through the chome console after logging in to the account.
GitHub: https://github.com/transitive-bullshit/chatgpt-api
- chatgpt simulates the ChatGPT web version, which requires Using node server (generally overseas) and stream, the current attempt cannot be deployed to vercel
- openai is an officially provided package and can be deployed to the vercel environment, but the return is subject to time limits and word count Limitation, you need to set the max_tokens value smaller, which will lead to incomplete replies.
WeChat Chat Assistant
WeChat GPT
This project is based on wechaty, allowing you to quickly initiate a conversation with ChatGPT through the WeChat chat window.
Before using it, you need to configure OpenAI’s Session Token information and the corresponding “keyword” trigger.
Function and Features
Access to the public account
GitHub: https://github. com/fuergaosi233/wechat-chatgpt
WeChat Bot
A WeChat bot based on chatgpt wechaty, which can be used to help you automatically reply to WeChat messages, or manage WeChat groups/friends. It is simple, easy to use, and can be played in 2 minutes.
Execute npm install after git cloning the project, modify the env related configuration,
Then modify the relevant logical files according to your needs
Modify the configuration
You can scan the QR code to log in
Scan the QR code to log in
This is the actual effect:
WeChat access demonstration
GitHub: https://github.com/wangrongding/wechat-bot
Browser plug-in
ChatGPT for Google
This plug-in supports Chrome / Edge / Firefox and other browsers.
After installation, in addition to the normal display of Google search content in the browser, ChatGPT feedback results will also be displayed on the right side, which can further improve search efficiency.
Search Demo
GitHub: https://github.com/wong2/chat-gpt-google-extension
ChatGPT Chrome Extension
This is a ChatGPT plug-in specially developed for Chrome users.
After installation, right-click in the text box on any page to pop up the "Ask ChatGPT" option.
ChatGPT will search based on the content in the current text box. This extension also includes a plugin system that provides greater control over the behavior of ChatGPT and the ability to interact with third-party APIs.
Plugin Demo
GitHub: https://github.com/gragland/chatgpt-chrome-extension
Grease Monkey Script
Will Baoge from Taiwan can turn ChatGPT into your voice assistant, realizing voice input and automatic reading functions. Let us say goodbye to typing mode through the Web Speech API that comes with the browser.
He has a video explanation at Station B [2], you can watch it, it is very interesting.
GitHub: https://github.com/doggy8088/TampermonkeyUserscripts
Reverse Engineering
Any project that makes engineers full of curiosity , cannot escape reversal, and ChatGPT is no exception in this regard.
Antonio Cheong, a developer from Malaysia on GitHub, reversed ChatGPT not long after its release and successfully extracted the API.
With these APIs, we can develop a fun chatbot, AI intelligent assistant, code assistance tool and other applications by ourselves.
GitHub: https://github.com/acheong08/ChatGPT
Mac software
is customized for Mac users A small tool: ChatGPT for desktop, supports M1 and Mac Intel. After installation, you can quickly launch ChatGPT in the system menu bar through the Cmd Shift G shortcut key.
GitHub: https://github.com/vincelwt/chatgpt-mac
Finally
For front-end engineers, we You can use the API to integrate ChatGPT into your own application, so it is necessary to understand nodejs and docker related knowledge.
Its advantage is that its language organization ability is very strong and it can be combined with context. But the answers it gives are not necessarily correct, and sometimes they are even wrong
As the official website says, it cannot be searched through the Internet.
Limited knowledge of world and events after 2021
There is limited knowledge about what will be gained after 2021. We can use it to strengthen our search capabilities. It is up to us to decide whether to adopt the answer.
The above is the entire content of this article. If it is helpful to you, you can give it a like. This is really important to me. I hope this article will be helpful to everyone. You can also refer to my previous articles. Or share your thoughts and experiences in the comment area. Welcome to explore the front end together.
[1]OpenAI launches the super powerful ChatGPT registration guide: https://juejin.cn/post/7173447848292253704
[2]ChatGPT Voice Monkey Script: https://www .bilibili.com/video/BV12P411K7gc/?vd_source=93efb77f3c9b0f1580f0a8d631b74ce2
The above is the detailed content of ChatGPT and related open source project experience. For more information, please follow other related articles on the PHP Chinese website!

Since 2008, I've championed the shared-ride van—initially dubbed the "robotjitney," later the "vansit"—as the future of urban transportation. I foresee these vehicles as the 21st century's next-generation transit solution, surpas

Revolutionizing the Checkout Experience Sam's Club's innovative "Just Go" system builds on its existing AI-powered "Scan & Go" technology, allowing members to scan purchases via the Sam's Club app during their shopping trip.

Nvidia's Enhanced Predictability and New Product Lineup at GTC 2025 Nvidia, a key player in AI infrastructure, is focusing on increased predictability for its clients. This involves consistent product delivery, meeting performance expectations, and

Google's Gemma 2: A Powerful, Efficient Language Model Google's Gemma family of language models, celebrated for efficiency and performance, has expanded with the arrival of Gemma 2. This latest release comprises two models: a 27-billion parameter ver

This Leading with Data episode features Dr. Kirk Borne, a leading data scientist, astrophysicist, and TEDx speaker. A renowned expert in big data, AI, and machine learning, Dr. Borne offers invaluable insights into the current state and future traje

There were some very insightful perspectives in this speech—background information about engineering that showed us why artificial intelligence is so good at supporting people’s physical exercise. I will outline a core idea from each contributor’s perspective to demonstrate three design aspects that are an important part of our exploration of the application of artificial intelligence in sports. Edge devices and raw personal data This idea about artificial intelligence actually contains two components—one related to where we place large language models and the other is related to the differences between our human language and the language that our vital signs “express” when measured in real time. Alexander Amini knows a lot about running and tennis, but he still

Caterpillar's Chief Information Officer and Senior Vice President of IT, Jamie Engstrom, leads a global team of over 2,200 IT professionals across 28 countries. With 26 years at Caterpillar, including four and a half years in her current role, Engst

Google Photos' New Ultra HDR Tool: A Quick Guide Enhance your photos with Google Photos' new Ultra HDR tool, transforming standard images into vibrant, high-dynamic-range masterpieces. Ideal for social media, this tool boosts the impact of any photo,


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

WebStorm Mac version
Useful JavaScript development tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Notepad++7.3.1
Easy-to-use and free code editor