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

[BUG]Incorrect description of the images parameter in MultiStepAgent.run #1005

Closed
iejzh opened this issue Mar 17, 2025 · 3 comments · Fixed by #1018
Closed

[BUG]Incorrect description of the images parameter in MultiStepAgent.run #1005

iejzh opened this issue Mar 17, 2025 · 3 comments · Fixed by #1018
Labels
bug Something isn't working

Comments

@iejzh
Copy link

iejzh commented Mar 17, 2025

Description:

The documentation for the images parameter in MultiStepAgent.run is inaccurate. The current docstring states that images accepts paths to images (list[str]), but in reality, the implementation does not support image file paths or URLs. Instead, it seems to require a different type of image input, such as preloaded image objects (e.g., PIL images, NumPy arrays, or Base64-encoded images).

Current Docstring:

images (`list[str]`, *optional*): Paths to image(s).

Issue:

  • The method does not handle image file paths or URLs.
  • If passed a file path, an error occurs because there is no internal loading mechanism.
  • Users may be misled into thinking they can provide image paths, causing unexpected failures.
@iejzh iejzh added the bug Something isn't working label Mar 17, 2025
@keetrap
Copy link
Contributor

keetrap commented Mar 17, 2025

@aymeric-roucher should we change the code and docstring like

images: Optional[List[Any]] = None,
"""
images (`list[Any]`, *optional*): List of image to process.
"""

or we need to change code to handle image paths.

@albertvillanova
Copy link
Member

albertvillanova commented Mar 18, 2025

Thanks for reporting, @keetrap.

I think current implementation only supports PIL.Image.Image objects.

@keetrap
Copy link
Contributor

keetrap commented Mar 18, 2025

@albertvillanova Should I raise a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants