-
Notifications
You must be signed in to change notification settings - Fork 430
fix(llmobs): fix parsing errors for bedrock converse stream #13238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Bootstrap import analysisComparison of import times between this PR and base. SummaryThe average import time from this PR is: 236 ± 4 ms. The average import time from base is: 244 ± 5 ms. The import time difference between this PR and base is: -7.4 ± 0.2 ms. Import time breakdownThe following import paths have shrunk:
|
BenchmarksBenchmark execution time: 2025-04-22 12:36:51 Comparing candidate commit 21d3ed8 in PR branch Found 0 performance improvements and 2 performance regressions! Performance is the same for 498 metrics, 8 unstable metrics. scenario:iast_aspects-ospathsplit_aspect
scenario:iast_aspects-ospathsplitext_aspect
|
@@ -186,18 +186,18 @@ def _extract_output_message_for_converse_stream( | |||
|
|||
if "messageStart" in chunk: | |||
message_data = chunk["messageStart"] | |||
current_message = {"role": message_data.get("role", "assistant"), "context_block_indices": []} | |||
current_message = {"role": message_data.get("role", "assistant"), "content_block_indicies": []} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename context -> content to be consistent with what we are actually parsing from bedrock
Fixing a noop test discovered a couple bugs for parsing out the response from converse stream
[{"role": "assistant"}]
message that didn't contain any content blocks to be parsed out - the fix is to only try to extract a message if it contains associated content block indicestoolName
->name
Checklist
Reviewer Checklist