How much would it have cost if GPT-4 had written your code

# · ✸ 63 · 💬 86 · 11 months ago · pypi.org · yodon · 📷
How much would it have cost if GPT-4 had written your code? Master -cost-per-thousand-tokens The cost per thousand tokens according to the current OpenAI pricing. This will output the total number of tokens in the repository and the estimated cost to generate these tokens using GPT-4. Sample output Total tokens in the current state of the repo: 1334 Estimated cost for the current state of the repo: $0.08 Total tokens in all added lines: 1517 Estimated cost for all added lines: $0.09 How It Works The script starts by scanning the specified git repository. Only the added lines in each git commit are considered for this token count. The script finally estimates how much it would cost to generate the same amount of tokens using GPT-4, based on the current pricing. It reports two cost estimates: one for the current state of the repository, and one for the total added tokens over the entire history of the repository.
How much would it have cost if GPT-4 had written your code



Send Feedback | WebAssembly Version (beta)