Use ChatGPT as free GPT API

Recently, OpenAI's ChatGPT-3.5 can be used without logging in, but it is still limited to the web version for conversational use, rather than the more powerful API. So some experts have developed a tool called Aurora (https://github.com/aurora-develop/aurora) for converting the web version of ChatGPT into an API for free use, allowing almost zero-cost exploration of many tasks that previously required paid APIs. Of course, the GPT-3.5 API is already quite inexpensive, so paying for it is indeed quite affordable.

In this article, I will provide a basic installation and deployment method, and then give instructions for usage in Raycast (https://www.raycast.com), Immersive Translate (https://immersivetranslate.com/en/), and ChatX (https://6x.studio/chatx/).

Deploy Aurora using Docker

The original repository provides many deployment methods, and the one I am most familiar with is deploying using Docker. If you already have Docker installed on Linux or have OrbStack installed on macOS, simply run the following code to deploy. It should be installed quickly.

docker run -d \
  --name aurora \
  -p 8080:8080 \
  ghcr.io/aurora-develop/aurora:latest        

If deployed locally, visit 127.0.0.1:8080 via a web browser. If you see {"message":"Hello, world!"}, it indicates successful deployment.

Additionally, I experimented with deployment on Raspberry Pi 4B and Oracle Cloud. The former worked fine, while the latter's IP was likely blocked by OpenAI, rendering it unusable.

Usage

The basic usage of the official API is quite straightforward.

curl --location 'https://server_ip:8080/v1/chat/completions' \
--header 'Content-Type: application/json' \
--data '{
     "model": "gpt-3.5-turbo",
     "messages": [{"role": "user", "content": "Say this is a test!"}],
     "stream": true
   }'        

Of course, we want to utilize the API in more interesting ways.

Using ChatGPT in Raycast:

Raycast is a highly efficient tool in macOS, serving as a replacement for Spotlight. Its AI features are only available with a Pro subscription. However, there's an extension in its store called ChatGPT, enabling direct AI conversation within Raycast. However, using this extension requires OpenAI's API.


Here, we essentially have our own API Endpoint, so the settings can be filled in as follows. Since I am deploying locally, the IP is 127.0.0.1. This needs to be adjusted according to individual setups.



Afterward, you can use keyboard shortcuts to ask questions, which is very convenient.

Using OpenAI translation service in Immersive Translate:

Immersive Translate is an excellent tool for reading foreign web pages. While free translation services like Bing and Google are already quite good, who can resist using ChatGPT for translation?

To set it up, In the settings, under General, choose OpenAI as the Translation Service.

Open more custom settings below, and fill in the custom API interface address. Note that it differs slightly from the previous settings.


Additionally, I slightly adjusted the prompt for better results.

Finally, click Verify service to confirm that the settings are successful.

Using ChatGPT API in ChatX:

ChatX is an independent AI chat program with rich features, also supporting API mode. The setup method is as follows:

Settings → AI server setting: Cost mode: API mode; API server config → OpenAPI → API server: custom server; send API key: no; API server: https://127.0.0.1:8080/. Note that this is different from the previous two setups ????♀?.

Finally, click Validate to confirm a successful connection.


要查看或添加评论,请登录

刘肖的更多文章

  • RF Impairments - Part 3

    RF Impairments - Part 3

    With the background above, let’s dive into a more interesting topic: RF fingerprinting. This post (and possibly the…

  • RF Impairments - Part 2

    RF Impairments - Part 2

    Carrier Frequency Offset Carrier frequency offset, or CFO is one of the most commonly seen RF impairments and needs to…

    1 条评论
  • RF Impairments - Part 1

    RF Impairments - Part 1

    Last year, I was asked about the common types of RF impairments, but unfortunately, I couldn’t have a comprehensive…

  • Pytorch DataLoader usage in Windows

    Pytorch DataLoader usage in Windows

    PyTorch is a deep learning framework for fast, flexible experimentation. Since v0.

社区洞察

其他会员也浏览了