[Latest] 0 code to complete ChatGPT local deployment/free web page access/call open AI's API/GPT3/GPT3.5/GPT4 model [attached can not access https://api.openai.com solution]

foreword

About ChatGPT

ChatGPT is a chatbot based on the GPT model, which can be used to interact with users naturally, such as answering questions, providing suggestions, solving problems, etc. This article will introduce how to deploy ChatGPT locally, and how to use the free webpage to access and call OpenAI's API. You will also learn how to choose the most suitable model to use among GPT3, GPT3.5 and GPT4 models. Finally, this article will provide a solution to the inability to access https://api.openai.com, so that users can use OpenAI's API smoothly.

Preparation

  1. You need a Github account so that you can log in to the platform for deployment
  2. You need a ChatGPT APIkey, if you don’t have an APIkey, there are 100 free keys at the end of the article, which can be obtained through the link

Tips: If you can’t access it because of the wall problem after the build is successful, please refer to the solution that Vercel cannot be accessed after being walled in China
, or copy it to a browser to visit: https://leidison.com/vercel-openwall

1. ChatGPT local deployment

Visit the GitHub project: https://github.com/Yidadaa/ChatGPT-Next-Web, click Deploy:
insert image description here

After clicking, the system will prompt you to create a Git, the purpose is to ensure that you can easily update it after deploying the project, you must create a Git repository, and every push to the Git repository will be automatically deployed.
insert image description here

After clicking the button, a repository will be created by default, you can customize the name, and then click the Create button.
insert image description here

After the creation is complete, the system will automatically prompt you to enter your OPENAI KEY, which is the string starting with sk-, and then click the Deploy button (if there is no Key, there are 100 free keys at the end of the article).
insert image description here

It will take about 1-2 minutes for the system to start automatic deployment, just pour a glass of water and wait patiently.
insert image description here

After the deployment is complete, you will see the following page, you can click the button to enter the dashboard to view the specific content of the project.
insert image description here

The system will automatically create a network-accessible temporary domain name for your project. If you are not interested in this domain name and you have your own domain name, you can also add a custom domain name for this project.
insert image description here

Click the Setting button at the top of the page, click Domain on the left after entering the page, and add your custom domain name in the opened page. The premise is that you need to use cname or domain name forwarding to configure it in the domain name control panel before it can be used.
insert image description here

Finally, the good show comes on stage, through the domain name provided by the system or a custom domain name. For example, the link of the website I deployed is: https://chat-gpt-next-web-myself.vercel.app/, open the website, you can see a website with a UI score of 99, the focus is on a magic-free Visit the ChatGPT website, the access and return speed is really fast.
insert image description here

After the deployment is complete, if you want to switch the GPT3/GPT3.5/GPT4 model, click on the lower left corner to set it.
insert image description here

2. Call the API service

The project in the above process is to obtain services by calling the openAI interface. If you have professional skills, it is recommended that you deploy your own ChatGPT service (or private chat to obtain deployment documents).

API document address : https://platform.openai.com/
API interface address : https://api.openai.com/v1/chat/completions

Deployment effect:
insert image description here
After the deployment is completed, it can be accessed by PC, mobile phone, tablet, etc., as long as you can connect to the Internet.
insert image description here

But it should be noted that the native interface is no longer accessible due to network problems.
insert image description here
The blogger himself set up a site for free by forwarding, and can forward requests.
insert image description here
If you encounter this problem in the process of requesting the official website API, you can private message me to get the solution.

3. GPT3/GPT3.5/GPT4 model, free 100 Keys

GPT3/GPT3.5/GPT4 model calling methods, exclusive GPT service deployment, technical services, and private chat with bloggers. Click the link
to get the latest 100 OpenAI free and valid ChatGPT Keys (effective for personal testing).

Or copy the following page to your browser to visit:
https://dr.onlines.asia/resources/key.html

4. Thanks

Thanks to the solution provided by @quanzhicaiji, which can solve the access problem after the deployment is completed . For details, please refer to: The solution to the inaccessibility of Vercel in China after being blocked by the wall .

Guess you like

Origin blog.csdn.net/qq_44491709/article/details/129909137