foreword
At present, it is not possible to directly access it in China ChatGPT
, and it can only be accessed through scientific Internet access, and due to the stricter OpenAI inspection recently, the possibility of account closure is very high, so another way of thinking, ChatGPT can be used stably in China.
Tencent Cloud-Cloud Function
Through the cloud functions of Tencent Cloud, we can quickly build a proxy service and help us generate a domain name for direct domestic access. With this domain name, we can DIY programs by ourselves!
Note: New users only have enough free quota for 3 months~, pay attention to check your quota before using it, put down my quota and entrance here!
1. Find the cloud function entry
2. Create a new cloud function and select a web function
3. Select Start from scratch
4. Basic settings
- Function type: Be sure to select Web function
- Function name: you can customize it at will
- Region: I chose the United States
硅谷
, of course, you can also choose other countries that can be visited. - Operating environment: Nodejs 16.13 (or higher)
5. Upload NodeJs package
- github package download address: github.com/Ice-Hazymoo…
- csdn download address: download.csdn.net/download/u0…
6. Advanced configuration and configure triggers
- advanced configuration
- Memory: changed to 64MB
- Multiple concurrent requests: change to 2
- Trigger configuration (here you may want to create a new trigger):
- default trigger
- trigger alias/version: default traffic
- Request method: ANY
- Release environment: release
- Authentication method: authentication-free
After the configuration is selected, click 完成
the button to start creating.
7. Wait for the creation to complete step by step
8. Switch 函数代码
and get the cloud function domain name of Tencent Cloud
Note: The interface needs to remove the endrelease/
- For example: service-207cwq5u-1302846868.usw.apigw.tencentcs.com/release/
- After removal: service-207cwq5u-1302846868.usw.apigw.tencentcs.com
9. After getting the domain name, you can directly locate the OpenAI interface
For example, commonly used chat interfaces:https://service-207cwq5u-1302846868.usw.apigw.tencentcs.com/v1/chat/completions
video tutorial
Video address: www.ixigua.com/72121461110…