mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
[PR #266] [MERGED] _stream in async client raises RuntimeError when processing HTTP errors #441
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/266
Author: @Oneirag
Created: 8/28/2024
Status: ✅ Merged
Merged: 8/29/2024
Merged by: @mxyng
Base:
main← Head:main📝 Commits (1)
1088e5a_stream in async client raises RuntimeError processing HTTP errors📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
ollama/_client.py(+1 -1)📄 Description
When response received in AsyncClient._stream has an HTTP error, the process raises a RuntimeError("Attempted to call a sync iterator on an async stream.") due to the use of e.response.read() instead of await e.response.aread()
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.