feat(openai): capture audio transcript deltas in streaming chat completions - #1831
Open
arnab812 wants to merge 2 commits into
Open
feat(openai): capture audio transcript deltas in streaming chat completions#1831arnab812 wants to merge 2 commits into
arnab812 wants to merge 2 commits into
Conversation
…etions - Update _extract_streamed_openai_response to inspect delta.audio for streaming chunks - Extract and concatenate transcript tokens into completion["content"] - Ensure text output is captured in Langfuse dashboard traces when using audio modalities
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #
Type of change
Verification
List the main commands you ran: pytest tests/unit/test_openai.py
Checklist
code_review.md..env.templateif needed.Greptile Summary
Adds support for collecting transcript fragments from streaming OpenAI audio deltas so Langfuse observations retain the spoken response text.
delta.audio.transcriptfrom dictionary and object-backed audio deltas.Confidence Score: 4/5
The PR appears safe to merge, with the non-blocking concern that the new streamed audio-transcript path lacks regression coverage.
The extraction change is narrowly scoped and no concrete runtime defect was established, but dictionary/object handling and multi-chunk transcript accumulation are not exercised by existing tests.
Files Needing Attention: langfuse/openai.py
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "feat(openai): capture audio transcript d..." | Re-trigger Greptile
Context used: