srt-ai
srt-ai copied to clipboard
updated to GPT 4o mini
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.