@@ -248,7 +278,7 @@ Download a model from the ollama library. Cancelled pulls are resumed from where
-`name`: name of the model to pull
-`insecure`: (optional) allow insecure connections to the library. Only use this if you are pulling from your own library during development.
-`stream`: (optional) if `false` the response will be be returned as a single response object, rather than a stream of objects
-`stream`: (optional) if `false` the response will be returned as a single response object, rather than a stream of objects
### Request
...
...
@@ -260,11 +290,49 @@ curl -X POST http://localhost:11434/api/pull -d '{
### Response
If `stream` is not specified, or set to `true`, a stream of JSON objects is returned:
The first object is the manifest:
```json
{
"status":"pulling manifest"
}
```
Then there is a series of downloading responses. Until any of the download is completed, the `completed` key may not be included. The number of files to be downloaded depends on the number of layers specified in the manifest.
```json
{
"status":"downloading digestname",
"digest":"digestname",
"total":2142590208
"total":2142590208,
"completed":241970
}
```
After all the files are downloaded, the final responses are:
```json
{
"status":"verifying sha256 digest"
}
{
"status":"writing manifest"
}
{
"status":"removing any unused layers"
}
{
"status":"success"
}
```
if `stream` is set to false, then the response is a single JSON object:
```json
{
"status":"success"
}
```
...
...
@@ -280,7 +348,7 @@ Upload a model to a model library. Requires registering for ollama.ai and adding
-`name`: name of the model to push in the form of `<namespace>/<model>:<tag>`
-`insecure`: (optional) allow insecure connections to the library. Only use this if you are pushing to your library during development.
-`stream`: (optional) if `false` the response will be be returned as a single response object, rather than a stream of objects
-`stream`: (optional) if `false` the response will be returned as a single response object, rather than a stream of objects
### Request
...
...
@@ -292,7 +360,7 @@ curl -X POST http://localhost:11434/api/push -d '{
### Response
Streaming response that starts with:
If `stream` is not specified, or set to `true`, a stream of JSON objects is returned:
```json
{"status":"retrieving manifest"}
...
...
@@ -325,6 +393,12 @@ Finally, when the upload is complete:
{"status":"success"}
```
If `stream` is set to `false`, then the response is a single JSON object: