-
Notifications
You must be signed in to change notification settings - Fork 107
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
In the followings lines of code:
prompty/runtime/prompty/prompty/parsers.py
Lines 38 to 40 in b18a21e
| image_path = self.path / image_item | |
| with open(image_path, "rb") as f: | |
| base64_image = base64.b64encode(f.read()).decode("utf-8") |
A text variable in prompty may contain references to image paths (e.g., during RAG). However, the parser does not account for cases where these image paths point to non-existent files. This could result in unexpected behavior when processing uncontrolled external input.
Proposed Fix:
- Add a validation step to check if the referenced image paths exist before attempting to parse them.
- Alternatively, introduce a configuration option that allows users to disable parsing of inline images if needed.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request