Error message is not helpful when the input to a model exceeds the limit. #176

Open
opened 2026-02-15 16:28:30 -05:00 by yindo · 1 comment
Owner

Originally created by @gamer-mitsuha on GitHub (Dec 1, 2024).

Originally assigned to: @ParthSareen on GitHub.

Context: I tried to send chunked texts to an embedding model using Ollama and got the following error:

.venv/lib/python3.12/site-packages/ollama/_client.py", line 120, in _request_raw
    raise ResponseError(e.response.text, e.response.status_code) from None
ollama._types.ResponseError: {}

It was not clear what happened and I had to check the failed batch of examples and examine what happened. Eventually I was able to figure out the reason is that the chunk limit is higher than the allowed input size, and thus the server returns error for such long inputs.

I'm wondering if it's possible to produce more helpful error message in such cases?

Originally created by @gamer-mitsuha on GitHub (Dec 1, 2024). Originally assigned to: @ParthSareen on GitHub. Context: I tried to send chunked texts to an embedding model using Ollama and got the following error: ``` .venv/lib/python3.12/site-packages/ollama/_client.py", line 120, in _request_raw raise ResponseError(e.response.text, e.response.status_code) from None ollama._types.ResponseError: {} ``` It was not clear what happened and I had to check the failed batch of examples and examine what happened. Eventually I was able to figure out the reason is that the chunk limit is higher than the allowed input size, and thus the server returns error for such long inputs. I'm wondering if it's possible to produce more helpful error message in such cases?
Author
Owner

@ParthSareen commented on GitHub (Dec 1, 2024):

Hey @gamer-mitsuha - sorry about that. Seems like the Ollama server didn't give an output back or we should have captured that. Thanks for raising - will take a look!

@ParthSareen commented on GitHub (Dec 1, 2024): Hey @gamer-mitsuha - sorry about that. Seems like the Ollama server didn't give an output back or we should have captured that. Thanks for raising - will take a look!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#176