Skip to content

Conversation

@jemelyah
Copy link

What this does

Adds support for the words field in OpenAI transcription verbose JSON responses when using timestamp_granularities.

Changes

  • Added words attribute to Transcription class with reader and initializer assignment (additive change only)
  • Modified OpenAI transcription provider to conditionally include words field when present in API response
  • Added tests for words field with and without timestamp_granularities

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Performance improvement

Scope check

  • I read the Contributing Guide
  • This aligns with RubyLLM's focus on LLM communication
  • This isn't application-specific logic that belongs in user code
  • This benefits most users, not just my specific use case

Quality check

  • I ran overcommit --install and all hooks pass
  • I tested my changes thoroughly
    • For provider changes: Re-recorded VCR cassettes with bundle exec rake vcr:record[provider_name]
    • All tests pass: bundle exec rspec
  • I updated documentation if needed
  • I didn't modify auto-generated files manually (models.json, aliases.json)

API changes

  • Breaking change
  • New public methods/classes
  • Changed method signatures
  • No API changes

Related issues

Fixes #518

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.

[BUG] OpenAI Transcription response for verbose JSON disregards words timestamp granularity

1 participant