Skip to content
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

fix(anthropic): Add partial json support to streams #3674

Merged
merged 13 commits into from
Feb 20, 2025

Conversation

kwnath
Copy link
Contributor

@kwnath kwnath commented Oct 18, 2024

Description

I actually forgotten to add the most crucial in PR where we wanted to add support for partial_json in tool calling when streaming. This PR fixes that.

cc @antonpirker apologies for this!

Adds partial json to the content block when streaming.
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 79.55%. Comparing base (2423299) to head (018cb05).
Report is 1 commits behind head on master.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
sentry_sdk/integrations/anthropic.py 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3674      +/-   ##
==========================================
- Coverage   79.55%   79.55%   -0.01%     
==========================================
  Files         140      140              
  Lines       15515    15517       +2     
  Branches     2629     2630       +1     
==========================================
+ Hits        12343    12344       +1     
  Misses       2338     2338              
- Partials      834      835       +1     
Files with missing lines Coverage Δ
sentry_sdk/integrations/anthropic.py 84.30% <50.00%> (-0.41%) ⬇️

antonpirker
antonpirker previously approved these changes Nov 21, 2024
Copy link
Member

@antonpirker antonpirker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for that!

@antonpirker antonpirker dismissed their stale review November 21, 2024 11:42

First we need to fix the tests

@antonpirker
Copy link
Member

@kwnath could you fix the failing tests please? Thanks!

@getsantry
Copy link

getsantry bot commented Jan 10, 2025

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@kwnath kwnath reopened this Jan 12, 2025
@getsantry
Copy link

getsantry bot commented Feb 3, 2025

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@antonpirker antonpirker changed the title fix(integrations): Add partial json support to streams fix(anthropic): Add partial json support to streams Feb 20, 2025
@antonpirker antonpirker added the Trigger: tests using secrets PR code is safe; run CI label Feb 20, 2025
@github-actions github-actions bot removed the Trigger: tests using secrets PR code is safe; run CI label Feb 20, 2025
@antonpirker antonpirker added Trigger: tests using secrets PR code is safe; run CI and removed Stale labels Feb 20, 2025
Copy link
Member

@antonpirker antonpirker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After fixing some tests, this is now ready to be merged! Thanks again @kwnath for the fix!

@antonpirker antonpirker merged commit 48ebd73 into getsentry:master Feb 20, 2025
142 of 145 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Trigger: tests using secrets PR code is safe; run CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants