From a38a31a40750ee3cbd782ea6d962001f265b3370 Mon Sep 17 00:00:00 2001 From: Dream Hunter Date: Sun, 11 Jan 2026 20:13:56 +0800 Subject: [PATCH] docs: add AI extract content length limit (4000 chars) (#809) Co-authored-by: Claude Opus 4.5 --- vitepress-docs/docs/en/guide/feature/ai-extract.md | 4 ++++ vitepress-docs/docs/zh/guide/feature/ai-extract.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/vitepress-docs/docs/en/guide/feature/ai-extract.md b/vitepress-docs/docs/en/guide/feature/ai-extract.md index f8f97d0d..0b79bf65 100644 --- a/vitepress-docs/docs/en/guide/feature/ai-extract.md +++ b/vitepress-docs/docs/en/guide/feature/ai-extract.md @@ -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`: diff --git a/vitepress-docs/docs/zh/guide/feature/ai-extract.md b/vitepress-docs/docs/zh/guide/feature/ai-extract.md index cca18c35..af173643 100644 --- a/vitepress-docs/docs/zh/guide/feature/ai-extract.md +++ b/vitepress-docs/docs/zh/guide/feature/ai-extract.md @@ -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 绑定: