fix: accumulate realtime transcripts into single messages#327
fix: accumulate realtime transcripts into single messages#327
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
✨ Finishing touches🧪 Generate unit tests (beta)
Tip 🧪 Unit Test Generation v2 is now available!We have significantly improved our unit test generation capabilities. To enable: Add this to your reviews:
finishing_touches:
unit_tests:
enabled: trueTry it out by using the Have feedback? Share your thoughts on our Discord thread! Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Realtime LLMs (Gemini, OpenAI) emit transcripts word-by-word, which was causing each word to appear as a separate message in chat. This fix: - Tracks message IDs per user turn to reuse the same message - Accumulates transcript text intelligently (handles both delta and pre-accumulated formats from different providers) - Uses completed=False during streaming to allow message updates - Finalizes messages with completed=True when turns change Adds comprehensive tests for transcript accumulation behavior.
f3a0e9d to
8ab55cb
Compare
Realtime LLMs (Gemini, OpenAI) emit transcripts word-by-word, which was causing each word to appear as a separate message in chat. This fix: