Closed feloy closed 3 weeks ago
Seems to me that we are always working in streaming mode ?
You mean that all responses of the /api/pull
are JSON streams in this implementation?
It also seems to be the case for ollama implementation, for example:
$ curl -X POST localhost:10343/api/pull -d '{"model": "unknown"}'
{"status":"pulling manifest"}
{"error":"pull model manifest: file does not exist"}
Seems to me that we are always working in streaming mode ?
You mean that all responses of the
/api/pull
are JSON streams in this implementation?It also seems to be the case for ollama implementation, for example:
$ curl -X POST localhost:10343/api/pull -d '{"model": "unknown"}' {"status":"pulling manifest"} {"error":"pull model manifest: file does not exist"}
Yes but look at the documentation if the stream parameter is false then a single json object is returned:
curl -X POST localhost:11434/api/pull -d '{"model": "unknown", "stream": false}'
{"error":"pull model manifest: file does not exist"}
https://github.com/ollama/ollama/blob/main/docs/api.md#pull-a-model
Seems to me that we are always working in streaming mode ?
You mean that all responses of the
/api/pull
are JSON streams in this implementation? It also seems to be the case for ollama implementation, for example:$ curl -X POST localhost:10343/api/pull -d '{"model": "unknown"}' {"status":"pulling manifest"} {"error":"pull model manifest: file does not exist"}
Yes but look at the documentation if the stream parameter is false then a single json object is returned:
curl -X POST localhost:11434/api/pull -d '{"model": "unknown", "stream": false}' {"error":"pull model manifest: file does not exist"}
https://github.com/ollama/ollama/blob/main/docs/api.md#pull-a-model
Effectively, I added it to the swagger spec, but forgot in the meantime. I'll implement it
LGTM
Only remark is that I found it strange that 200 is returned in case of error in non streaming mode
Where? I can only see 500 codes when returning errors, in non-streaming mode
LGTM Only remark is that I found it strange that 200 is returned in case of error in non streaming mode
Where? I can only see 500 codes when returning errors, in non-streaming mode
Sorry that was in streaming mode
What does this PR do?
Adds a
/api/pull
endpoint to the API to download modelsScreenshot / video of UI
https://github.com/user-attachments/assets/bcc8fb65-cec6-4c79-b85d-6b55875d9f83
What issues does this PR fix or reference?
Fixes #1583
How to test this PR?
Start AI Lab extension