> For the complete documentation index, see [llms.txt](https://unsloth.ai/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unsloth.ai/docs/zh/ji-cheng/jiang-curl-he-http-lian-jie-dao-unsloth.md).

# 将 Curl 和 HTTP 连接到 Unsloth

指南：使用 curl（或任何 HTTP 客户端）访问 Unsloth 的 API，附带每个端点和功能都可直接复制粘贴的示例。

Unsloth 在其启动所用的端口上，通过同一个基础 URL 提供三种兼容 OpenAI/Anthropic 的线协议格式。它们都需要 `Authorization: Bearer sk-unsloth-…` 请求头，并根据是否设置了 `stream`.

本页按端点（`/v1/chat/completions`, `/v1/messages`, `/v1/responses`, `/v1/models`, `/v1/embeddings`, `/v1/systemone`）整理各类用法，并以介绍 Unsloth 内置 **服务端工具**的通用章节收尾。这些工具适用于所有聊天端点。

{% hint style="info" %}
如果不确定该使用哪个 URL、密钥或模型名称，请先阅读 API 概览。该指南将介绍如何启动 Unsloth、加载模型并创建 `sk-unsloth-…` 密钥。
{% endhint %}

### 🔑 身份验证

每个请求都需要一个 `Authorization` 请求头：

```
Authorization: Bearer sk-unsloth-xxxxxxxxxxxx
```

为避免密钥留在 shell 历史记录中，请导出一次密钥，然后通过环境变量引用：

```bash
export UNSLOTH_STUDIO_AUTH_TOKEN=sk-unsloth-xxxxxxxxxxxx
```

为便于说明，以下代码片段直接写入密钥 `sk-unsloth-xxxxxxxxxxxx` 。实际使用时，请替换为 `$UNSLOTH_STUDIO_AUTH_TOKEN`.

### 📋 列出已加载的模型

```bash
curl http://localhost:8888/v1/models \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx"
```

响应：

```json
{
  "object": "list",
  "data": [
    {"id": "unsloth/gemma-3-27b-it-GGUF", "object": "model", "owned_by": "local"}
  ]
}
```

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FgVC1VPkCkUQBVg0HScEc%2FScreenshot%202026-04-22%20at%203.06.57%E2%80%AFAM.png?alt=media&amp;token=6f77cc78-bd0e-4141-b555-b232df1036dc" alt=""><figcaption></figcaption></figure>

当请求需要 `id` 字段作为 `"model"` 的值时（或者像 opencode 这样的客户端要求提供 **模型 ID**).

### 💬 聊天补全（`/v1/chat/completions`)

OpenAI 聊天补全方言。兼容范围最广。可与 OpenAI SDK、opencode、Cursor、Continue、Cline、Open WebUI、SillyTavern 及大多数兼容 OpenAI 的工具配合使用。

#### 基本请求

```bash
curl http://localhost:8888/v1/chat/completions \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "default",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
```

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fvy9TyeJZljKrMJAath0L%2FScreenshot%202026-04-22%20at%203.40.35%E2%80%AFAM.png?alt=media&amp;token=98f8d622-83c0-4f55-aa37-d3571f0a38cd" alt=""><figcaption></figcaption></figure>

#### 流式传输

添加 `"stream": true` ，响应会切换为服务器发送事件（`text/event-stream`）。使用 `curl` 并加上 `--no-buffer` (`-N`):

```bash
curl -N http://localhost:8888/v1/chat/completions \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-local",
    "messages": [{"role": "user", "content": "Write a haiku about locally-run LLMs."}],
    "stream": true
  }'
```

响应的每一行都类似于 `data: {"choices":[{"delta":{"content":"..."}}]}`，并以 `data: [DONE]`.

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FsazSu4RpyiEa6HeamYbj%2FScreenshot%202026-04-22%20at%203.42.05%E2%80%AFAM.png?alt=media&amp;token=f62cf129-74cd-4e8e-986a-1755eeb0e048" alt=""><figcaption></figcaption></figure>

#### 图像（视觉）

在用户消息中添加图像作为 `image_url` 内容部分。URL 可以是 HTTPS 地址，也可以是 base64 `data:` URI：

```bash
# 将本地文件嵌入为 base64（为简洁起见，已省略部分内容）
IMG=$(base64 -w 0 test.jpg)

cat > /tmp/request.json <<EOF
{
  "model":"default",
  "messages":[{"role":"user","content":[
    {"type":"text","text":"Describe the image."},
    {"type":"image_url","image_url":{"url":"data:image/jpeg;base64,$IMG"}}
  ]}],
  "max_tokens":200,
  "stream":false
}
EOF

curl http://localhost:8888/v1/chat/completions \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d @/tmp/request.json
```

{% hint style="info" %}
加载的模型必须支持多模态。如果加载的是纯文本模型，请求在结构上仍会成功，但模型不会处理图像。
{% endhint %}

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F9yO7ersnyaIj3X8UkD5q%2FScreenshot%202026-04-22%20at%203.59.30%E2%80%AFAM.png?alt=media&amp;token=9e0af9e5-d565-4acd-8b4a-020c02d74cd8" alt=""><figcaption></figcaption></figure>

#### 函数调用（OpenAI 工具）

传入 OpenAI 风格的 `tools` 以及（可选的） `tool_choice`。客户端会执行每个工具调用，并在下一轮中返回结果。

```bash
curl http://localhost:8888/v1/chat/completions \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model":"default",
    "messages":[{"role":"user","content":"What is the weather in Paris?"}],
    "tools":[{
      "type":"function",
      "function":{
        "name":"get_weather",
        "description":"Get current weather for a city.",
        "parameters":{
          "type":"object",
          "properties":{"city":{"type":"string"}},
          "required":["city"]
        }
      }
    }],
    "tool_choice":"required"
  }' | jq '.choices[0].message, .usage'
```

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F39CDJk0Z1WhG5JyaJIfV%2Ftests_codex_pr_2.png?alt=media&amp;token=c3f01286-7dc9-47dd-b7f9-9ee8c2d3cb2f" alt=""><figcaption></figcaption></figure>

### 📨 Anthropic 消息（`/v1/messages`)

Unsloth 的 Anthropic 兼容方言，适用于 Claude Code、Anthropic SDK、OpenClaw，以及任何支持 Messages API 的客户端。

#### 基本请求

```bash
curl http://localhost:8888/v1/messages \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "default",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello"}]
  }'
```

{% hint style="warning" %}
`max_tokens` 是必需的，适用于 `/v1/messages` （在 `/v1/chat/completions`).
{% endhint %}

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FOz7xeC4dRnDjO5GDAsmC%2FScreenshot%202026-04-22%20at%204.01.52%E2%80%AFAM.png?alt=media&amp;token=b7025ce1-e3a8-46ad-91fa-e87b96a22d6b" alt=""><figcaption></figcaption></figure>

#### 流式传输

```bash
curl -N http://localhost:8888/v1/messages \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-local",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Explain LoRA in two sentences."}],
    "stream": true
  }'
```

事件遵循 Anthropic 的 SSE 格式： `message_start`, `content_block_start`, `content_block_delta`, `content_block_stop`, `message_delta`, `message_stop`，以及 Unsloth 自定义的 `tool_result` 事件，用于服务器端工具输出。

#### 图像（视觉）

Anthropic 风格的图像内容使用包含 base64 数据的 `source` 块：

```bash
IMG=$(base64 -w 0 test.jpg)

cat > /tmp/request.json <<EOF
{
  "messages":[{"role":"user","content":[
    {"type":"text","text":"Describe the image."},
    {"type":"image","source":{"type":"base64","media_type":"image/jpeg","data":"$IMG"}}
  ]}],
  "max_tokens":200,
  "stream":true
}
EOF

curl -s http://localhost/v1/messages \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d @/tmp/request.json
```

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FMkzYMtkw9dt0V7cbqduU%2FScreenshot%202026-04-22%20at%204.03.28%E2%80%AFAM.png?alt=media&amp;token=de854c5a-b399-4736-83bb-23ffe26981e2" alt=""><figcaption></figcaption></figure>

#### 工具调用（Anthropic 工具）

```bash
curl http://localhost:8888/v1/messages \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-local",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Whats the weather in Tokyo?"}],
    "tools": [
      {
        "name": "get_weather",
        "description": "Get the current weather for a city",
        "input_schema": {
          "type": "object",
          "properties": {
            "city": {"type": "string"}
          },
          "required": ["city"]
        }
      }
    ],
    "tool_choice": {"type": "auto"}
  }'
```

`tool_choice` 值映射到 OpenAI 方言的方式如下：Anthropic `auto` → OpenAI `auto`，Anthropic `any` → OpenAI `required`，Anthropic `{type: "tool", name: "x"}` → OpenAI `{type: "function", function: {name: "x"}}`，Anthropic `none` → OpenAI `none`.

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fqb37JN1ffgBFBKyd1uWD%2FScreenshot%202026-04-22%20at%204.07.43%E2%80%AFAM.png?alt=media&amp;token=1fb7ec5d-8326-4e9f-b752-2d5d7e830a39" alt=""><figcaption></figcaption></figure>

### 🧬 Responses（`/v1/responses`)

Unsloth 也支持较新的 **OpenAI Responses API**, Codex 和其他近期 OpenAI 客户端已转向使用的协议。

```bash
curl http://localhost:8888/v1/responses \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-local",
    "input": "Write a one-sentence greeting."
  }'
```

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FhmyMSCTgdD1NYiLUdYNZ%2Fopenai_responses.png?alt=media&amp;token=dd56bd52-71db-46f3-8f6c-1499df8e443c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FZ3MEH4vV2RjxhLe0DsWJ%2Fresponses_function_calling.png?alt=media&amp;token=a8637d5a-51d2-47f5-9658-add9cdb757e3" alt=""><figcaption></figcaption></figure>

要启用流式传输，请添加 `"stream": true` 并使用 `curl -N`。Responses 流使用命名事件，例如 `response.output_text.delta`，而不是 Chat Completions 数据块。

每次请求都在 `input` 中发送完整的对话历史记录。Unsloth 不支持 `previous_response_id` 或 `conversation` 来管理服务器端的历史记录。

#### 嵌入（`/v1/embeddings`)

使用已加载的嵌入 GGUF 或 Unsloth 配置的嵌入模型，从文本生成嵌入向量。

使用 `"model": "default"`时，如果有常驻的嵌入 GGUF，Unsloth 会使用它；否则使用其配置的嵌入模型。

```bash
curl http://localhost:8888/v1/embeddings \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "default",
    "input": [
      "Unsloth runs local models.",
      "Generate a vector for each text."
    ],
    "encoding_format": "float"
  }'
```

响应包含一个 `data` 数组，其中每项包含一个 `embedding` 向量以及对应的 `index` 。为确保兼容性，请使用文本输入；是否支持令牌数组输入取决于嵌入后端。

#### 决策 API（`/v1/systemone`)

启用 **决策 API** 在 **设置 → API** 并先选择一个决策模型。禁用 Decision API 时，端点会返回 `404` 。

请求包含 `state` 以及命名为 `questions`的字段。支持的问题类型：

* `noul`：是/否决策。
* `choice`：在 `criteria`.
* `score`：根据 `criteria`.

使用 `"model": "default"` 来选择已配置的决策模型。

```bash
curl http://localhost:8888/v1/systemone \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "default",
    "state": "The customer says their order arrived damaged and requests a refund.",
    "questions": {
      "refund_requested": {
        "type": "noul",
        "instructions": "Does the customer request a refund?"
      }
    }
  }'
```

要查看可用的决策模型：

```bash
curl "http://localhost:8888/v1/models?output_modalities=decisions" \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx"
```

将 `8888` 替换为你的 Unsloth 端口，并将示例 API 密钥替换为你自己的密钥。

### 🧰 Unsloth 服务端工具（简写方式）

除了客户端函数调用外，Unsloth 还可以在服务端执行 **Python**, **终端** （Shell 命令）和 **网页搜索** ，并将结果作为自定义的 `tool_result` 事件流式传回。这项功能让 Unsloth 开箱即用就像一个“真正的”智能体，无需通过客户端来回传递工具调用。

传入以下额外字段即可启用此功能，适用于 **以下任一端点：** `/v1/chat/completions` 或 `/v1/messages`:

| 字段                | 类型              | 说明                                                |
| ----------------- | --------------- | ------------------------------------------------- |
| `enable_thinking` | `boolean`       | `false` 可禁用思考。 `true` 默认值                         |
| `enable_tools`    | `boolean`       | `true` 以启用服务端工具执行。                                |
| `enabled_tools`   | `array<string>` | 模型可以调用哪些工具。支持 `python`, `terminal`, `web_search`. |
| `session_id`      | `string`        | 可选。在多次调用之间保留工具状态（例如 Python 内核）。                   |

#### 思考模式

默认启用思考模式。&#x20;

```bash
curl http://localhost:8888/v1/chat/completions \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "default",
    "messages": [{"role": "user", "content": "summarize quantum tunneling in one sentence"}],
    "stream": false
  }'
```

模型会先思考，然后给出回答。

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F4XHr9KJhzpFEibCGEuHF%2FScreenshot%202026-04-22%20at%2012.22.46%E2%80%AFPM.png?alt=media&amp;token=15fa68ae-0ca5-464f-af16-25cfabc84c33" alt=""><figcaption></figcaption></figure>

要禁用思考，请在请求中传入  `enable_thinking: false` 。模型将直接给出回答，而不会先进行思考。

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FKQR2nh8sb5G1zUc7YSs9%2FScreenshot%202026-04-22%20at%2012.25.47%E2%80%AFPM.png?alt=media&amp;token=4646a17e-2217-4f00-9e39-5362f989126f" alt=""><figcaption></figcaption></figure>

#### 执行 Python 代码

```bash
curl http://localhost:8888/v1/chat/completions \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-local",
    "messages": [{"role": "user", "content": "What is 123 * 456? Use code to compute it."}],
    "stream": false,
    "enable_tools": true,
    "enabled_tools": ["python"],
    "session_id": "my-session"
  }'
```

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FVGbYtwBfSoqgZov5ivMA%2FScreenshot%202026-04-22%20at%204.16.13%E2%80%AFAM.png?alt=media&amp;token=28b83469-24fb-412d-9489-a0c6b92dd8b5" alt=""><figcaption></figcaption></figure>

#### 网页搜索 + Python（流式传输）

```bash
curl http://localhost:8888/v1/chat/completions \
  -H "Authorization: Bearer sk-unsloth-xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-local",
    "messages": [{"role": "user", "content": "Search for Python 3.13 features"}],
    "stream": true,
    "enable_tools": true,
    "enabled_tools": ["web_search", "python"],
    "session_id": "my-session"
  }'
```

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FzSFyzwXtJ0Hgvqq7gZcV%2FScreenshot%202026-04-22%20at%204.25.13%E2%80%AFAM.png?alt=media&amp;token=a8fc5908-cb11-4ec9-85c6-77a6b5c2e205" alt=""><figcaption></figcaption></figure>

#### 在  `/v1/messages`

&#x20;上也可以使用相同的简写，调用 Anthropic Messages 端点：

```bash
curl http://localhost:8888/v1/messages \
  -H "Authorization: Bearer sk-unsloth-xxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-local",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Search for Python 3.13 features"}],
    "stream": true,
    "enable_tools": true,
    "enabled_tools": ["web_search", "python"],
    "session_id": "my-session"
  }'
```

<figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FPpJxE60f2J59T5o85tQ1%2FScreenshot%202026-04-22%20at%204.28.43%E2%80%AFAM.png?alt=media&amp;token=870d74cb-dd8e-42c1-adeb-287807b22e16" alt=""><figcaption></figcaption></figure>

除了标准的 Anthropic / OpenAI 事件类型外，Unsloth 还会流式传输自己的  `tool_result`  SSE 事件。模型会在下一轮看到每个工具的输出。

### ❔ 故障排除

**`401 Unauthorized`** **-** 请求的  `Authorization`  请求头缺失或密钥错误。请仔细检查： `Authorization: Bearer sk-unsloth-…`.

**`curl`  在流式请求时挂起 -** 添加  `-N` （与 `--no-buffer`）相同。若不使用它， `curl` SSE 流会被缓冲，直到结束时你才会看到内容。

**不同操作系统上的 Base64 编码有所不同** **-** Linux 的 `base64` 默认会换行，而 macOS / BSD 不会。在 Linux 上使用 `base64 -w 0` ，在 macOS 上使用 `base64` ，或者将输出通过管道传给 `tr -d '\n'`.

**Shell 中的 JSON 转义** **-** 复杂的请求正文使用 Here-doc（`-d @file.json`）比内联字符串更简洁。示例： `curl ... -d @body.json`.

**`max_tokens` 在 `/v1/messages`** **-** 上会报错 `Anthropic 方言要求提供此参数。添加` "max\_tokens": 1024

（或你想要的其他限制值）。

### 有关端点级问题（模型未加载、连接断开、端口错误），请参阅 API 概览页面。

可选：调整服务器默认设置 `启动服务器时，你可以通过`.

```bash
自定义默认设置
启动服务器并自定义默认设置
  unsloth run \
  --model unsloth/Qwen3-1.7B-GGUF \
  --reasoning off \
  --temp 0.6 \
```

-p 8888 `使用` --reasoning off `关闭思考功能；对于支持推理的模型，使用` --reasoning on

```bash
可启用该功能。
启动服务器并自定义默认设置
  unsloth run \
  在本地网络上公开 API
  --temp 0.6 \
```

-H 0.0.0.0 \ `0.0.0.0:8888`这会在

#### 上启动服务器，让本地网络中的其他设备也能连接。

按请求覆盖设置

```bash
curl http://localhost:8888/v1/chat/completions \
  你也可以在每个 API 请求中直接覆盖生成设置。
  -H "Content-Type: application/json" \
  -d '{
    "model": "default",
    -H "Authorization: Bearer $UNSLOTH_STUDIO_AUTH_TOKEN" \
      {
        "messages": [
        "role": "user",
      }
    ],
    "content": "写一首关于本地 AI 的短诗。"
    "temperature": 0.8,
    "max_tokens": 512
  }'
```

请求级参数（例如 `temperature`, `top_p`, `max_tokens`和 `stream` ）会覆盖该请求的服务器默认值。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://unsloth.ai/docs/zh/ji-cheng/jiang-curl-he-http-lian-jie-dao-unsloth.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
