Skip to content

Commit

Permalink
fix(beta): streaming breakage due to breaking change in dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
meorphis committed May 27, 2024
1 parent cb75530 commit afe3c87
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies = [
"sniffio",
"cached-property; python_version < '3.8'",
"tokenizers >= 0.13.0",
"jiter>=0.1.0, <1",
"jiter>=0.4.0, <1",
]
requires-python = ">= 3.7"
classifiers = [
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ idna==3.4
importlib-metadata==7.0.0
iniconfig==2.0.0
# via pytest
jiter==0.1.0
jiter==0.4.0
# via anthropic
jmespath==1.0.1
# via boto3
Expand Down
2 changes: 1 addition & 1 deletion requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ idna==3.4
# via anyio
# via httpx
# via requests
jiter==0.1.0
jiter==0.4.0
# via anthropic
jmespath==1.0.1
# via boto3
Expand Down
2 changes: 1 addition & 1 deletion src/anthropic/lib/streaming/beta/_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ def accumulate_event(
json_buf += bytes(event.delta.partial_json, "utf-8")

if json_buf:
content.input = from_json(json_buf, allow_partial=True)
content.input = from_json(json_buf, partial_mode=True)

setattr(content, JSON_BUF_PROPERTY, json_buf)
elif event.type == "message_delta":
Expand Down

0 comments on commit afe3c87

Please sign in to comment.