Model API
All URIs are relative to http://localhost:1000
Method | HTTP request | Description |
---|---|---|
modelSpecificModelDownload | POST /model/{model}/download | /model/{model}/download [POST] |
modelSpecificModelDownloadCancel | POST /model/{model}/download/cancel | /model/{model}/download/cancel [POST] |
modelSpecificModelDownloadProgress | GET /model/{model}/download/progress | /model/{model}/download/progress [WS] |
modelSpecificModelLoad | POST /model/{model}/load | /model/{model}/load [POST] |
modelSpecificModelUnload | POST /model/{model}/unload | /model/{model}/unload [POST] |
modelUpdate | POST /model/update | /model/update [POST] |
modelsSpecificModelSnapshot | GET /model/{model} | /model/{model} [GET] |
modelSpecificModelDownload
Model modelSpecificModelDownload(model)
/model/{model}/download [POST]
Downloads a specific model to your local machine.
Example
// Import classes:
//import app.pieces.pieces-os-client.infrastructure.*
//import app.pieces.pieces-os-client.models.*
val apiInstance = ModelApi()
val model : kotlin.String = model_example // kotlin.String | model id
try {
val result : Model = apiInstance.modelSpecificModelDownload(model)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelApi#modelSpecificModelDownload")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelApi#modelSpecificModelDownload")
e.printStackTrace()
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
model | kotlin.String | model id |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
modelSpecificModelDownloadCancel
Model modelSpecificModelDownloadCancel(model)
/model/{model}/download/cancel [POST]
Cancels a specific model download that is currently in progress.
Example
// Import classes:
//import app.pieces.pieces-os-client.infrastructure.*
//import app.pieces.pieces-os-client.models.*
val apiInstance = ModelApi()
val model : kotlin.String = model_example // kotlin.String | model id
try {
val result : Model = apiInstance.modelSpecificModelDownloadCancel(model)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelApi#modelSpecificModelDownloadCancel")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelApi#modelSpecificModelDownloadCancel")
e.printStackTrace()
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
model | kotlin.String | model id |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
modelSpecificModelDownloadProgress
ModelDownloadProgress modelSpecificModelDownloadProgress(model)
/model/{model}/download/progress [WS]
This is a WebSocket connection that provides real-time updates on the download progress of a specific model.
Example
// Import classes:
//import app.pieces.pieces-os-client.infrastructure.*
//import app.pieces.pieces-os-client.models.*
val apiInstance = ModelApi()
val model : kotlin.String = model_example // kotlin.String | model id
try {
val result : ModelDownloadProgress = apiInstance.modelSpecificModelDownloadProgress(model)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelApi#modelSpecificModelDownloadProgress")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelApi#modelSpecificModelDownloadProgress")
e.printStackTrace()
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
model | kotlin.String | model id |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
modelSpecificModelLoad
Model modelSpecificModelLoad(model)
/model/{model}/load [POST]
Loads a previously downloaded model into memory. It differs from downloading, as downloading involves transferring the entire model to your machine, while loading simply loads the model into memory.
Example
// Import classes:
//import app.pieces.pieces-os-client.infrastructure.*
//import app.pieces.pieces-os-client.models.*
val apiInstance = ModelApi()
val model : kotlin.String = model_example // kotlin.String | model id
try {
val result : Model = apiInstance.modelSpecificModelLoad(model)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelApi#modelSpecificModelLoad")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelApi#modelSpecificModelLoad")
e.printStackTrace()
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
model | kotlin.String | model id |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
modelSpecificModelUnload
Model modelSpecificModelUnload(model)
/model/{model}/unload [POST]
Unloads a previously loaded model from memory and effectively frees up the RAM consumed by the model.
Example
// Import classes:
//import app.pieces.pieces-os-client.infrastructure.*
//import app.pieces.pieces-os-client.models.*
val apiInstance = ModelApi()
val model : kotlin.String = model_example // kotlin.String | model id
try {
val result : Model = apiInstance.modelSpecificModelUnload(model)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelApi#modelSpecificModelUnload")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelApi#modelSpecificModelUnload")
e.printStackTrace()
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
model | kotlin.String | model id |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
modelUpdate
Model modelUpdate(model)
/model/update [POST]
Updates a machine learning model. This functionality is exclusively available for models with the 'custom:true' setting.
Example
// Import classes:
//import app.pieces.pieces-os-client.infrastructure.*
//import app.pieces.pieces-os-client.models.*
val apiInstance = ModelApi()
val model : Model = // Model |
try {
val result : Model = apiInstance.modelUpdate(model)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelApi#modelUpdate")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelApi#modelUpdate")
e.printStackTrace()
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
model | Model | [optional] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
modelsSpecificModelSnapshot
Model modelsSpecificModelSnapshot(model)
/model/{model} [GET]
Retrieves a specific ML model.
Example
// Import classes:
//import app.pieces.pieces-os-client.infrastructure.*
//import app.pieces.pieces-os-client.models.*
val apiInstance = ModelApi()
val model : kotlin.String = model_example // kotlin.String | model id
try {
val result : Model = apiInstance.modelsSpecificModelSnapshot(model)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelApi#modelsSpecificModelSnapshot")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelApi#modelsSpecificModelSnapshot")
e.printStackTrace()
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
model | kotlin.String | model id |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json