mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
[PR #272] [CLOSED] Make _encode_image error message more helpful and shorten docstring #447
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ollama/ollama-python/pull/272
Author: @mags0ft
Created: 9/6/2024
Status: ❌ Closed
Base:
main← Head:patch-1📝 Commits (1)
e41a087made error message more helpful and shortened docstring📊 Changes
1 file changed (+3 additions, -3 deletions)
View changed files
📝
ollama/_client.py(+3 -3)📄 Description
Hello to you all,
the original docstring in
ollama/_client.pycontained two entire base64 versions of the LICENSE file, which made it extremely long and let the two lines spike out. This proposal shortens these by a good bit, so they don't occupy as much space and are better readable while still keeping the docstring perfectly understandable.As well, the error message in case of an incompatible type now returns more helpful info - the faulty type of the argument that was given - to make the possible origin of any errors in the future more clear.
Old error message:
RequestError: image must be bytes, path-like object, or file-like objectNew error message:
RequestError: image must be bytes, path-like object, or file-like object, not ArbitraryClassNameI hope I could help!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.