-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add Python image upload docs #48
base: main
Are you sure you want to change the base?
Conversation
Keeping as draft until version 1.1.0 of the Python SDK has been published to PyPI |
If you only have the raw data of the image, you can supply the raw data directly as a bytes | ||
object without having to write it to disk first. Due to this feature, binary filesystem | ||
paths are *not* supported (as they will be handled as malformed image data rather than as | ||
filesystem paths). |
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.
This confuses a bit as a Python noob. Maybe provide an example with raw binary input and an example and then an example with IO objects? Though maybe it is unnecessary?
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.
Yeah, this bit could definitely be improved to something more like the JS base64 example, but I'd like to hold off on improving it until lmstudio-ai/lmstudio-python#46 has been implemented
That way we can do a more useful example like using pillow
to load an image in a format LM Studio doesn't support, and send it to the server in a supported format.
No description provided.