Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaranvpl committed Jan 21, 2025
1 parent a658d95 commit a0f9e97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion autogen/token_count_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@

import tiktoken

from .agentchat.contrib.img_utils import num_tokens_from_gpt_image
# from .agentchat.contrib.img_utils import num_tokens_from_gpt_image
from .import_utils import optional_import_block

# if PIL is not imported, we will redefine num_tokens_from_gpt_image to return 0 tokens for images
# Otherwise, it would raise an ImportError
with optional_import_block() as result:
import PIL # noqa: F401

from .agentchat.contrib.img_utils import num_tokens_from_gpt_image

pil_imported = result.is_successful
if not pil_imported:

Expand Down

0 comments on commit a0f9e97

Please sign in to comment.