> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hitheo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 意圖分類與模式

> Theo 如何為每個請求確定最佳執行模式。

當你發送 `mode: "auto"`（默認值）時，Theo 會對你的提示詞進行分類，以確定最優的執行模式。你也可以顯式設置模式，從而完全跳過分類過程。

## 可用模式

|| Mode | Description | Engine |
||------|-------------|--------|
|| `auto` | Theo 自動分類 | 依分類結果而定 |
|| `fast` | 快速響應，簡單任務 | `theo-1-flash` |
|| `think` | 深度推理，複雜分析 | `theo-1-reason` |
|| `code` | 代碼生成與工程實現 | `theo-1-code` |
|| `image` | 圖像生成 | `theo-1-create` |
|| `video` | 視頻生成（異步） | `theo-1-motion` |
|| `research` | 帶引用的網絡研究（異步） | `theo-1-research` |
|| `roast` | 幽默、不加過濾的回應 | `theo-1-edge` |
|| `genui` | 生成式 UI 組件 | `theo-1-genui` |

## 分類流程

### 分類如何工作

Theo 使用多層級的分類系統。明顯的信號會被即時捕獲：

* `"Draw me a logo"` → `image`
* `"Write a React component"` → `code`
* `"Research the latest AI news"` → `research`

含義模糊的提示詞會被更深入地分析。分類器會返回：

```json theme={null}
{ "mode": "think", "confidence": 0.92, "reasoning": "Complex analytical question requiring deep reasoning" }
```

### 顯式覆蓋

直接傳入 `mode` 即可跳過分類：

```typescript theme={null}
const res = await theo.complete({
  prompt: "Write a REST API for user management",
  mode: "code",  // Skips classification entirely
});
```

## 響應中的模式選擇

每個響應都會同時包含請求的模式和最終解析出的模式：

```json theme={null}
{
  "mode": "auto",
  "resolved_mode": "code",
  "model": { "id": "theo-1-reason", "label": "Theo Reason" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.