PulseAugur
中
实时 12:56:28
English(EN) A 133 KB image pasted into my prompt as text cost 122,584 tokens

开发者被警告:提示中的图像数据会增加token数量和成本

将图像数据作为base64文本嵌入提示中会急剧增加token数量,导致意外的成本和潜在的上下文窗口问题。一个133KB的图像,当编码为base64并输入到像OpenAI的cl100k_base这样的分词器时,会消耗超过122,000个token。这意味着一个看似很小的图像可能比实际文本内容花费更多,请求成本可能增加95倍。开发者可以通过在将文本发送给LLM之前,剥离base64数据URI和其他大型二进制对象,并用占位符注释替换它们来缓解这个问题。 AI

影响 开发者在使用LLM时,必须了解图像数据是如何被分词的,以避免意外的成本和上下文窗口限制。

排序理由 文章讨论了使用LLM的技术问题和最佳实践,而不是新发布或重大的行业事件。

在 dev.to — LLM tag 阅读 →

AI 生成摘要 · Google Gemini · 来自 1 个来源。 我们如何撰写摘要 →

开发者被警告:提示中的图像数据会增加token数量和成本

本文如何被排名

Signal score
12 / 100
Composite score across the factors below. Higher = stronger signal that this story matters right now.
Newsworthiness bucket
Commentary
文章讨论了使用LLM的技术问题和最佳实践,而不是新发布或重大的行业事件。
Source corroboration
Single-source cluster
Only one publisher covered this so far. Single-source stories can still rank when the publisher is high-authority, but they lack cross-source corroboration.
Topics
infra
Editorial topic classification. Feeds into how the story surfaces on /topic/<slug> hub pages and into the per-entity coverage mix.
AI-industry relevance
High
Clearly on-topic for AI-industry coverage.
Story freshness
Breaking (< 6h)
Fresh story with cross-source coverage still developing. Ranking may shift as more sources report.

完整方法见我们的编辑标准。

报道来源 [1]

  1. dev.to — LLM tag TIER_1 English(EN) · Andrey Altrouter ·

    一张133KB的图片被粘贴到我的提示词中作为文本,消耗了122,584个token

    <p>Here's a mistake that doesn't look like one. You build a support bot that reads incoming emails and drafts replies. The emails are HTML, so you send the HTML. Most of them have the company logo in the signature, embedded right in the markup. Nothing breaks, the drafts are fine…