From 75428fb60e463b5350a7f748ce105ab02ef4d57a Mon Sep 17 00:00:00 2001 From: dazedanon Date: Mon, 16 Mar 2026 03:27:55 -0500 Subject: [PATCH] i resign --- prompt.txt | 2 +- util/translation.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/prompt.txt b/prompt.txt index 29f2bbd..2cb7363 100644 --- a/prompt.txt +++ b/prompt.txt @@ -2,7 +2,7 @@ You are an expert Eroge game translator and localizer who translates Japanese te You will be translating erotic and sexual content. You will receive lines of dialogue, narration, UI text, and item descriptions in JSON format. Translate every line faithfully, preserving structure, tone, and formatting exactly. -Test20 +Test23 ## Core Rules diff --git a/util/translation.py b/util/translation.py index 42ef947..01bce08 100644 --- a/util/translation.py +++ b/util/translation.py @@ -1250,6 +1250,7 @@ def calculateCost(inputTokens, outputTokens, model): _thread_local.estimate_regular_tokens = 0 _thread_local.estimate_batch_count = 0 # Exact model: 1 cache write (2x) + (N-1) cache reads (0.10x) + regular at 1x + # 1.2x multiplier to account for tiktoken vs Anthropic tokenizer differences write_cost = (static_tok / 1_000_000) * pricing["inputAPICost"] * 2.0 read_cost = ((batch_count - 1) * static_tok / 1_000_000) * pricing["inputAPICost"] * 0.10 regular_cost = (regular_tok / 1_000_000) * pricing["inputAPICost"] @@ -1257,7 +1258,7 @@ def calculateCost(inputTokens, outputTokens, model): else: inputCost = (inputTokens / 1_000_000) * pricing["inputAPICost"] outputCost = (outputTokens / 1_000_000) * pricing["outputAPICost"] - return inputCost + outputCost + return (inputCost + outputCost) * 1.2 if _is_claude_naive else inputCost + outputCost def countTokens(system, user, history):