Skip to content

Commit

Permalink
fix: restore autodetect_images parameter name for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
devin-ai-integration[bot] and jxnl committed Dec 15, 2024
1 parent 87a3876 commit ea8b186
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions instructor/multimodal.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ def convert_contents(
str, Image, dict[str, Any], list[Union[str, Image, dict[str, Any]]]
],
mode: Mode,
*, # Make autodetect_images keyword-only since it's unused
_autodetect_images: bool = True, # Prefix with _ to indicate intentionally unused
*, # Make autodetect_images keyword-only
autodetect_images: bool = True,
) -> Union[str, list[dict[str, Any]]]:
"""Convert contents to the appropriate format for the given mode."""
# Handle single string case
Expand Down Expand Up @@ -377,8 +377,8 @@ def convert_contents(
def convert_messages(
messages: list[dict[str, Any]],
mode: Mode,
*, # Make autodetect_images keyword-only since it's unused
_autodetect_images: bool = True, # Prefix with _ to indicate intentionally unused
*, # Make autodetect_images keyword-only
autodetect_images: bool = True,
) -> list[dict[str, Any]]:
"""Convert messages to the appropriate format for the given mode.
Expand Down

0 comments on commit ea8b186

Please sign in to comment.