mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
Second request never completes #62
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?
Originally created by @machinewrapped on GitHub (Apr 1, 2024).
I tried integrating Ollama into GPT-Subtrans this weekend.
It launches ollama in a subprocess and makes a series of requests to translate subtitles in batches. The first request works, but it hangs on the second request.
DEBUG - send_request_headers.started request=<Request [b'POST']>
DEBUG - send_request_headers.complete
DEBUG - send_request_body.started request=<Request [b'POST']>
DEBUG - send_request_body.complete
DEBUG - receive_response_headers.started request=<Request [b'POST']>
... hangs here, never receives response
I put together a test script which shows the same behaviour:
https://github.com/machinewrapped/Bugs/blob/master/OllamaTest/ollama_test.py
Is there something I need to do between requests to prepare the server? It doesn't seem to matter whether I use generate or chat, the result is the same.