# 使用 ChatGPT 分析錯誤

截稿前，ChatGPT 免費版可以使用 ChatGPT 4o mini 模型，已足以應對大部分日常使用。\
首先前往 [chatgpt.com](https://chatgpt.com) 網站。免註冊即可使用，但如果想要保存紀錄，也可以免費註冊帳號。

你可以在網頁下方看到輸入匡，你可以在這裡發送訊息。

<figure><img src="/files/kMpP2RfAqQtqvGQ2bhpO" alt=""><figcaption></figcaption></figure>

然後開頭先可以與 AI 定義，接下來對話都使用繁體中文。\
那就輸入 「接下來的對話都使用繁體中文」 到網頁裡。

<figure><img src="/files/CMoyhM3lK452oQ2HfS8v" alt=""><figcaption></figcaption></figure>

接著就可以開始分析錯誤訊息了。你可以將崩潰日誌或伺服器日誌輸入到 ChatGPT 裡，ChatGPT 就會開始分析原因。通常來說，我都會寫上我的目的，像是 「分析 Minecraft 伺服器錯誤」 等。\
像是輸入：

```
分析 Minecraft 伺服器錯誤：
container@pterodactyl~ 伺服器已標示為 offline...
[CheapServer]: 正在檢查伺服器儲存空間，可能需要一點時間，請稍後...
[CheapServer]: 正在更新運行配置檔案...
[CheapServer]: 正在確認檔案權限，可能需要一點時間請稍後...
container@pterodactyl~ 伺服器已標示為 starting...
[CheapServer]: 正在取得 Docker 容器檔案，可能需要幾分鐘才會完成...
[CheapServer]: 已取得 Docker 容器檔案。
container@pterodactyl~ java -version
openjdk version "21.0.3" 2024-04-16 LTS
OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode, sharing)
container@pterodactyl~ java -Xms128M -Xmx8192M -jar server.jar
Error: Unable to access jarfile server.jar
container@pterodactyl~ 伺服器已標示為 offline...
[CheapServer]: ---------- CheapServer 檢測到伺服器崩潰! ----------
[CheapServer]: 退出狀態碼: 1
[CheapServer]: 超出記憶體: false
[CheapServer]: 因 60 秒前已經崩潰過一次，所以將不會自動重啟。
```

ChatGPT 就會分析錯誤原因，並提出總結。

<figure><img src="/files/bpluc3VXkYUi9n3gzQuU" alt=""><figcaption></figcaption></figure>

接下來你就可以根據 ChatGPT 所提出的結果，來修復你的伺服器錯誤。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cheapserver.tw/debug/chat-gpt.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
