Python's json.dumps made my Russian prompt 3.6x more expensive with one default
DEV Community
Python's json.dumps made my Russian prompt 3.6x more expensive with one default
By default, json.dumps turns every non-ASCII character into a \u escape. Paste that JSON into a prompt and the model pays for the escapes. On 50 real Russian descriptions of AI models it's 10,014 tokens instead of 2,753, and one argument fixes it.
0 comments
No comments yet.