Skip to content

client: drop RequestError from generate/chat docstrings - #790

Open
suhailult777 wants to merge 1 commit into
ollama:mainfrom
suhailult777:fix-783
Open

suhailult777 wants to merge 1 commit into
ollama:mainfrom
suhailult777:fix-783

Conversation

@suhailult777

Copy link
Copy Markdown

Fixes #783

The generate and chat docstrings (sync and async) said a missing model raises RequestError, but nothing in the package raises it. An empty model is sent to the server, which returns 400, and the client raises ResponseError, which is already documented.

This removes the incorrect line from the four docstrings. No behavior change. (If you prefer making RequestError real instead, I can switch to that with a test.)

Tests: pytest tests 117 passed; ruff clean.

I used AI assistance and reviewed and tested every line.

The four generate/chat docstrings (sync and async) said a missing model
raises RequestError, but nothing in the package raises it. An empty
model is sent to the server, which answers 400, and the client raises
ResponseError, which the docstrings already document.

Fixes ollama#783

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RequestError is documented in four methods but never raised

1 participant