Skip to content

Commit 5a9c67c

Browse files
Merge pull request #5456 from samuel100/samuel100/rest-download-patch
fix for download REST API
2 parents f90fa94 + 7cfcff2 commit 5a9c67c

File tree

1 file changed

+39
-10
lines changed

1 file changed

+39
-10
lines changed

articles/ai-foundry/foundry-local/reference/reference-rest.md

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ _---Standard OpenAI Properties---_
7878
The arguments to pass to the function.
7979
- `metadata` (object, optional)
8080
A dictionary of metadata key-value pairs.
81-
82-
_---Additional Foundry Local Properties---_
83-
8481
- `top_k` (number, optional)
8582
The number of highest probability vocabulary tokens to keep for top-k-filtering.
8683
- `random_seed` (integer, optional)
@@ -432,10 +429,32 @@ Sets the active GPU device.
432429

433430
Downloads a model to local storage.
434431

432+
> [!NOTE]
433+
> Model downloads can take significant time, especially for large models. We recommend setting a high timeout for this request to avoid premature termination.
434+
435435
**Request Body:**
436436

437-
- `model` (string)
438-
The model name to download.
437+
- `model` (`WorkspaceInferenceModel` object)
438+
- `Uri` (string)
439+
The model URI to download.
440+
- `Name` (string)
441+
The model name.
442+
- `ProviderType` (string, optional)
443+
The provider type (e.g., `"AzureFoundryLocal"`,`"HuggingFace"`).
444+
- `Path` (string, optional)
445+
The remote path where the model is located stored. For example, in a Hugging Face repository, this would be the path to the model files.
446+
- `PromptTemplate` (`Dictionary<string, string>`, optional)
447+
Contains:
448+
- `system` (string, optional)
449+
The template for the system message.
450+
- `user` (string, optional)
451+
The template for the user's message.
452+
- `assistant` (string, optional)
453+
The template for the assistant's response.
454+
- `prompt` (string, optional)
455+
The template for the user-assistant interaction.
456+
- `Publisher` (string, optional)
457+
The publisher of the model.
439458
- `token` (string, optional)
440459
Authentication token for protected models (GitHub or Hugging Face).
441460
- `progressToken` (object, optional)
@@ -467,12 +486,22 @@ During download, the server streams progress updates in the format:
467486

468487
- Request body
469488

470-
```json
471-
{
472-
"model": "Phi-4-mini-instruct-generic-cpu",
473-
"ignorePipeReport": true
489+
```json
490+
{
491+
"model":{
492+
"Uri": "azureml://registries/azureml/models/Phi-4-mini-instruct-generic-cpu/versions/4",
493+
"ProviderType": "AzureFoundryLocal",
494+
"Name": "Phi-4-mini-instruct-generic-cpu",
495+
"Publisher": "",
496+
"promptTemplate" : {
497+
"system": "<|system|>{Content}<|end|>",
498+
"user": "<|user|>{Content}<|end|>",
499+
"assistant": "<|assistant|>{Content}<|end|>",
500+
"prompt": "<|user|>{Content}<|end|><|assistant|>"
501+
}
474502
}
475-
```
503+
}
504+
```
476505

477506
- Response stream
478507

0 commit comments

Comments
 (0)