docs: add AI extract content length limit (4000 chars) (#809)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Dream Hunter
2026-01-11 20:13:56 +08:00
committed by GitHub
parent 276093f113
commit a38a31a407
2 changed files with 8 additions and 0 deletions

View File

@@ -24,6 +24,10 @@ Extraction results are automatically saved to the `metadata` field in the databa
| `ENABLE_AI_EMAIL_EXTRACT` | Text/JSON | Whether to enable AI email recognition feature | `true` |
| `AI_EXTRACT_MODEL` | Text | AI model name, choose from [models supporting JSON mode](https://developers.cloudflare.com/workers-ai/features/json-mode/#supported-models) | `@cf/meta/llama-3.1-8b-instruct` |
## Content Length Limit
To avoid AI model token limits, the maximum email content length for processing is **4000 characters**. Email content exceeding this limit will be truncated before AI analysis.
## Workers AI Binding
Configure Workers AI binding in `wrangler.toml`:

View File

@@ -24,6 +24,10 @@ AI 邮件识别功能使用 Cloudflare Workers AI 自动分析收到的邮件内
| `ENABLE_AI_EMAIL_EXTRACT` | 文本/JSON | 是否启用 AI 邮件识别功能 | `true` |
| `AI_EXTRACT_MODEL` | 文本 | AI 模型名称,从[支持 JSON 模式的模型](https://developers.cloudflare.com/workers-ai/features/json-mode/#supported-models)中选择 | `@cf/meta/llama-3.1-8b-instruct` |
## 内容长度限制
为避免 AI 模型 token 限制,邮件内容最大处理长度为 **4000 字符**。超过此长度的邮件内容将被截断后再进行 AI 分析。
## Workers AI 绑定
需要在 `wrangler.toml` 中配置 Workers AI 绑定: