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(integrations): Add partial json support to streams #3674

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

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.93%. Comparing base (fe4b88b) to head (13d4b72).

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.98%   79.93%   -0.05%     
==========================================
  Files         139      139              
  Lines       15445    15447       +2     
  Branches     2624     2625       +1     
==========================================
- Hits        12353    12347       -6     
- Misses       2219     2232      +13     
+ Partials      873      868       -5     
Files with missing lines Coverage Δ
sentry_sdk/integrations/anthropic.py 82.28% <50.00%> (-0.38%) ⬇️

... and 5 files with indirect coverage changes

@@ -21,8 +21,7 @@
raise DidNotEnable("Anthropic not installed")

if TYPE_CHECKING:
from typing import Any, AsyncIterator, Iterator
from sentry_sdk.tracing import Span
pass
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll review this PR again, my linter removed these.

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants