Copy model
Copies an existing model
Function CopyModel(Val URL, Val Model, Val Name, Val AdditionalHeaders = "") Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
URL | --url | String | ✔ | Ollama server URL |
Model | --model | String | ✔ | Name of existing model |
Name | --name | String | ✔ | The name of the new model |
AdditionalHeaders | --headers | Map Of KeyAndValue | ✖ | Additional request headers, if necessary |
Returns: Map Of KeyAndValue - Processing result
tip
Method at API documentation: Copy a Model
1C:Enterprise/OneScript code example
URL = "https://hut.openintegrations.dev/ollama";
Token = "12We34..."; // Authorization - not part API Ollama
Model = "mario";
Name = "mario2";
AdditionalHeaders = New Map;
AdditionalHeaders.Insert("Authorization", StrTemplate("Bearer %1", Token));
Result = OPI_Ollama.CopyModel(URL, Model, Name, AdditionalHeaders);
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint ollama CopyModel \
--url "https://hut.openintegrations.dev/ollama" \
--model "mario" \
--name "mario2" \
--headers "{'Authorization':'***'}"
:: JSON data can also be passed as a path to a .json file
oint ollama CopyModel ^
--url "https://hut.openintegrations.dev/ollama" ^
--model "mario" ^
--name "mario2" ^
--headers "{'Authorization':'***'}"
Result
{
"status_code": 200
}