cf.llm.prompt.token_count
cf.llm.prompt.token_countNumber请求中 LLM 提示词的估算令牌数。
该数量使用通用分词器计算,可能与您的 LLM 提供商报告的数量不完全一致。
需要 Cloudflare Enterprise 计划。您还必须启用 AI Security for Apps。
用法示例:
# Matches requests where the estimated token count exceeds 4,000:
(cf.llm.prompt.token_count gt 4000)类别:
- Request