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

xfail openai image token count test #28828

Merged
merged 1 commit into from
Dec 19, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,12 @@ async def test_openai_response_headers_async() -> None:
assert "content-type" in headers


@pytest.mark.xfail(
reason=(
"As of 12.19.24 OpenAI API returns 1151 instead of 1118. Not clear yet if "
"this is an undocumented API change or a bug on their end."
)
)
def test_image_token_counting_jpeg() -> None:
model = ChatOpenAI(model="gpt-4o", temperature=0)
image_url = "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
Expand Down Expand Up @@ -738,6 +744,12 @@ def test_image_token_counting_jpeg() -> None:
assert expected == actual


@pytest.mark.xfail(
reason=(
"As of 12.19.24 OpenAI API returns 871 instead of 779. Not clear yet if "
"this is an undocumented API change or a bug on their end."
)
)
def test_image_token_counting_png() -> None:
model = ChatOpenAI(model="gpt-4o", temperature=0)
image_url = "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png"
Expand Down
Loading