Skip to content

Conversation

michaldudek
Copy link

@michaldudek michaldudek commented Sep 12, 2025

I've tweaked the OpenAI service to be a little bit more flexible and functional. Also updated the readme about it.

  • Allow choosing which OpenAI model to use by passing it as 3rd option to --config.
  • Switched to gpt-5 by default.
  • Allow passing system prompt from file (easier to write out and maintain) by passing a file path as 2nd option to --config
  • Don't call OpenAI API separately for every string, but instead batch them together (e.g. my app has 602 strings to translate, so instead of 602 requests (and hitting rate limit), the service makes 25 requests)
  • A little bit more verbose logging as the service is a bit slow and would be hanging for a bit (those 602 strings take ~20 min)
  • Updated README.md with docs about openai service.

Example usage:

source .env.local && npx json-autotranslate --service openai --config ${OPENAI_API_KEY},./json-autotranslate.prompt.md,gpt-5-mini

Example log output:

Screenshot 2025-09-12 at 15 10 06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant