Teach you how to register and use ChatGPT

Start the Nuggets Growth Journey! This is the 12th day of my participation in the "Nuggets Daily New Project·February Update Challenge", click to view the details of the event .

This article gives a detailed registration and usage tutorial of ChatGPT, which can be called a rich graphic tutorial at the nanny level.

1. What is ChatGPT

ChatGPT is a dialogue system based on the GPT-3.5/GPT-4 model, which is mainly used to process natural language dialogue. By training models to simulate human language behavior, ChatGPT can interact with users through text communication. It can be used in various scenarios, including chatbots, intelligent customer service systems, etc. Dialogue systems based on the GPT-3 model usually have good language generation capabilities and can simulate human language behavior.

Although ChatGPT has only been released for a few days, it has already become popular all over the Internet. As of 2022-12-8, some developers have developed client-side chatbots, Google Chrome plug-ins, vscode plug-ins, and WeChat based on the ChatGPT conversation API interface. Derivatives such as group chat question answering robots.

image-20221208211954780

image-20221208212629979

2. ChatGPT registration steps

2.1, preparation conditions

  • First of all, you must be able to surf the Internet scientifically (please find the information yourself for how to operate).

  • Finally, it is best to have a foreign mobile phone number, if not, please refer to the following steps to register a virtual number on the sms-activate.org website.

Notice! Even if you use scientific Internet access, ipthe address may be displayed in China, the following is the solution:

  1. It must be linked to the global mode + OpenAIsupported countries (currently China, Russia and other countries do not support it, and North America, Japan and other countries are recommended);
  2. If the above steps still fail, clear the browser cache and restart the browser or computer; or directly open a new window in incognito mode .

2.2, register a virtual phone number

1,在 sms-activate.org 网站注册一个账号并登录,默认是使用邮箱注册的。

2,点击网站右上角的充值按钮,进入充值页面,选择支付宝,因为我们只需接受验证码服务,所以充值 0.2 美元即可。(但随着使用的人增加,现在需要的最低充值金额也增加了)

3,回到网站首页,在左侧搜索栏直接搜索 openai 虚拟手机号注册服务,可以随便选择一个国家号码,这里我选择印度 India,然后点击购物车会直接购买成功,然后就会进入你购买的虚拟手机号页面,复制去掉区号 91 的手机号码去 openai 官网注册服务即可。

image-20221208213417137

image-20221208214035545

image-20221208215135904

2.3,注册 OpenAI 账号

前面的步骤完成后,我们就有一个虚拟的国外手机号码了,可以用来注册 openai 账号时完成接收验证码的服务。

OpenAI 网站注册必须要国外手机号码。

最后,注册 OpenAI 账号,可以按照以下步骤进行:

  1. 点击官网链接,首次进入会要求你注册或登录账户。
  2. 使用谷歌、微软或者其他邮箱进行注册登录。
  3. 如果 ip 在国外,则能成功注册,然后就会看到填写用户名的页面,如果 ip 在国内就会提示你 OpenAI's services are not available in your country
  4. 电话验证。这个时候输入前面购买的虚拟手机号用来接收验证码即可。
  5. 通过电话验证之后,就能成功注册好 OpenAI 账号了,然后就去愉快的使用 ChatGPT 吧!
Register openai account 1

三,使用 ChatGPT 官网服务

注意:经常官网服务经常会拥挤,并出现如下提示,刷新重新进入即可。 "We're experiencing exceptionally high demand. Please hang tight as we work on scaling our systems."

  1. 访问 OpenAI 官网,点击网页左边底部的 “Chat GPT”,进入 ChatGPT 页面
  2. 点击 “TRY CHATGPT”,进入 ChatGPT 服务页面。
  3. 在“Input”中输入你要和Chat GPT聊天的信息,然后点击“Send”。
  4. Chat GPT会根据你的输入回复一条信息,你可以根据回复的信息继续聊天。

chatgpt_network

四,使用 ChatGPT App

github 有个 stars 数目比较多的开源项目ChatGPT,实现了将 ChatGPT 服务封装成 App 的功能,并支持 Mac, Windows 和 Linux 平台。

这里以 Mac 系统的安装使用为例,其他平台类似,都很简单。

  1. 通过下载 ChatGPT dmg安装包方式直接双击安装。
  2. 通过 Homebrew 服务下载安装。
brew tap lencx/chatgpt https://github.com/lencx/ChatGPT.git
brew install --cask chatgpt --no-quarantine
复制代码

下载安装 chatgpt app 后,打开软件会要求你先输入 openai 账户邮箱和密码,然后就可以直接使用了,App 界面如下所示。

chatgpt_app

五,使用 ChatGPT Python API

在前面的步骤完成注册 OpenAI 账户并申请 API Key 后,我们就可以愉快的玩耍 ChatGPT 了,这里通过 Python API 的形式调用 ChatGPT 服务。可以通过 OpenAI 账户 找到自己 API keys,具体如下图所示。

api_key1 api_key2

Then create the following Python code and run it.

import openai

# Set the API key
openai.api_key = "YOUR_API_KEY"

# Define the model and prompt
model_engine = "text-davinci-003"
prompt = "What is the capital of France?"

# Generate a response
completion = openai.Completion.create(
    engine=model_engine,
    prompt=prompt,
    max_tokens=1024,
    n=1,
    stop=None,
    temperature=0.5,
)

# Get the response text
message = completion.choices[0].text

print(message)
复制代码

In the above code, you need to YOUR_API_KEYreplace with yours API Key, then you can run the code and check the generated output. You can generate different responses (answers) by changing the prompt text and other parameters.

result

Guess you like

Origin juejin.im/post/7199657558834692157