srt-ai icon indicating copy to clipboard operation
srt-ai copied to clipboard

updated to GPT 4o mini

Open GioPalusa opened this issue 5 months ago • 1 comments

I've updated to GPT 4o mini, which has more tokens and is way more cost efficient and faster than earlier models.

  • Added API for translating text into SRT files using OpenAI's GPT-4o-mini model.
  • Implemented token-based grouping for efficient API requests (groupSegmentsByTokenLength).
  • Added streaming response parsing with parseStreamedResponse to handle large translations.
  • Introduced retries and error handling for OpenAI API rate limits.
  • Updated logging for better debugging and chunk handling.
  • Updated dependencies, including tiktoken for token counting.

GioPalusa avatar Sep 16 '24 22:09 GioPalusa