79516772

Date: 2025-03-18 08:30:07
Score: 0.5
Natty:
Report link

You can’t tell OpenAI’s API "only bill me for a subset of the response." You are billed for every token generated (including tokens you might not end up using). If you truly want only the function call/parsed data, without the extra “explanatory” text, you’ll need to have the model produce fewer tokens in the first place (e.g., by forcing a function call, or by instructing the model to respond with minimal or no text). Merely discarding extra text after the fact does not reduce token usage or cost.

You have two options:

Instruct model to return minimal output

Use function_call feature

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: soorajgupta