Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies = [
"openai==3.31.0",
"PyYAML==6.0.3",
"tiktoken==0.14.0",
"transformers==5.17.0",
"transformers==5.20.2",
]

[project.urls]
Expand Down
6 changes: 3 additions & 3 deletions tests/test_leaf.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,14 @@ def test_leaf_preserves_work_on_context_rejection(monkeypatch, caplog, message)


def test_leaf_recognizes_openai_context_rejection() -> None:
import httpx
import httpx2
from openai import BadRequestError

error = BadRequestError(
"context_length_exceeded",
response=httpx.Response(
response=httpx2.Response(
400,
request=httpx.Request("POST", "http://model.test/v1/chat/completions"),
request=httpx2.Request("POST", "http://model.test/v1/chat/completions"),
),
body={"code": "context_length_exceeded"},
)
Expand Down