The letter

One letter a week, starting soon.

The week's signal, what shipped, what is worth running tonight, and the editor's note. No tracking, no ads, nothing else.

We keep your address, your language and the date you joined, nothing else. Every letter has a one-click unsubscribe link that deletes the record.

← Accept All   Archive
Zenn (AI)Japan

OpenAIの12時間プロンプトキャッシュ:重なる書込みをPythonで二重計上しない

10.21

長い共通指示や参照資料を何時間かおきに使うアプリでは、キャッシュの有効時間が採用判断に関わります。ただし、長く保存する指定を足せば必ず安くなるわけではありません。複数の書込み境界を置く場合は、同じトークンを重複して数えたり、書込み倍率に通常入力分を再び加えたりしない計算が必要です。 本稿では、OpenAIの12時間プロンプトキャッシュを題材に、30分と12時間の書込み区間をPythonで分けます。

Languages & runtimes
Read at Zenn (AI) ↗

Related

More from Zenn (AI) on Accept All.