# AI:embeddings:backfill - 处理 OpenAI 的 400 错误，因 Embeddings 中 Token 超限

**URL:** <https://meta.discourse.org/t/aibackfill-handling-openais-400-error-for-excessive-tokens-in-embeddings/292401>\
**Category:** Bug\
**Tags:** ai\
**Created:** [2024 年1 月 21 日 02:37 UTC](https://meta.discourse.org/t/aibackfill-handling-openais-400-error-for-excessive-tokens-in-embeddings/292401 "2024-01-21T02:37:55Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

作者： ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
发布日期： [2024 年1 月 29 日 05:32 UTC](https://meta.discourse.org/t/aibackfill-handling-openais-400-error-for-excessive-tokens-in-embeddings/292401/9 "2024-01-29T05:32:02Z")

</div>

这可能真的是官方分词器的一个 bug！

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/f/8/2f81de391408124d3241ec95d31ae4ecc0624a56.png)

我们的计数完全一致！

另外……看看分词计数，Zalgo 文本对 AI 来说是一种非常可怕的攻击，因为它只用很少的价值就极大地增加了分词计数。

@piffy 你有没有可能把你的确切文本粘贴到 [https://platform.openai.com/tokenizer](https://platform.openai.com/tokenizer) 上，看看分词计数是否与 API 所说的相符，这可能是 OpenAI 的一个复现点。

---

_[View the full topic](https://meta.discourse.org/t/aibackfill-handling-openais-400-error-for-excessive-tokens-in-embeddings/292401)._
