-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix: Ensure Full Image Path Resolution for LLMs #3955
Conversation
…he directory for image files 🐛 (image.py): fix file_path assignment to include cache_dir path for image verification
This pull request is automatically being deployed by Amplify Hosting (learn more). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Cristhianzl
I don't think this is correct. We should try to understand why file_path
isn't correct any more.
…prove code readability 📝 (message.py): Add synchronous version of get_file_paths function to improve performance 📝 (service.py): Implement build_full_path method to construct full file path in the local storage
you are right. please check this PR #3980 |
📝 (image.py): import user_cache_dir from platformdirs to create a cache directory for image files
🐛 (image.py): fix file_path assignment to include cache_dir path for image verification
Problem
The LLMs were unable to process images due to issues locating the relative path. This caused the image to not be interpreted or processed correctly by the LLMs.
Solution
This PR introduces a finder that resolves the full path of the image, ensuring that the LLM can correctly locate and interpret the image. By converting the relative image path to an absolute path, we eliminate the path resolution issue and allow the LLM to process images as intended.