modzyClient.getModelByName
Retrieve model details by name
modzyClient.getModel(name)
Search for a model that matches a provided name. If the search finds multiple models, it will return the closest match. The output includes all model details (modelId
, latestVersion
, author
, name
, versions
, and tags
).
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
name | string | A model name or a part of it | 'Sentiment Analysis' |
Returns
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$ref": "#/definitions/Model",
"definitions": {
"Model": {
"type": "object",
"additionalProperties": false,
"properties": {
"modelId": {
"type": "string"
},
"latestVersion": {
"type": "string"
},
"latestActiveVersion": {
"type": "string"
},
"versions": {
"type": "array",
"items": {
"type": "string"
}
},
"author": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"permalink": {
"type": "string"
},
"features": {
"type": "array",
"items": {
"$ref": "#/definitions/Feature"
}
},
"isActive": {
"type": "boolean"
},
"isRecommended": {
"type": "boolean"
},
"isCommercial": {
"type": "boolean"
},
"tags": {
"type": "array",
"items": {
"$ref": "#/definitions/Tag"
}
},
"images": {
"type": "array",
"items": {
"$ref": "#/definitions/Image"
}
},
"snapshotImages": {
"type": "array",
"items": {}
},
"lastActiveDateTime": {
"type": "string",
"format": "date-time"
},
"visibility": {
"$ref": "#/definitions/Visibility"
}
},
"required": [
"author",
"description",
"features",
"images",
"isActive",
"isCommercial",
"isRecommended",
"lastActiveDateTime",
"latestActiveVersion",
"latestVersion",
"modelId",
"name",
"permalink",
"snapshotImages",
"tags",
"versions",
"visibility"
]
},
"Feature": {
"type": "object",
"additionalProperties": false,
"properties": {
"identifier": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
}
},
"required": [
"description",
"identifier",
"name"
]
},
"Image": {
"type": "object",
"additionalProperties": false,
"properties": {
"url": {
"type": "string"
},
"caption": {
"type": "string"
},
"relationType": {
"type": "string"
}
},
"required": [
"caption",
"relationType",
"url"
]
},
"Tag": {
"type": "object",
"additionalProperties": false,
"properties": {
"identifier": {
"type": "string"
},
"name": {
"type": "string"
},
"dataType": {
"type": "string"
},
"isCategorical": {
"type": "boolean"
}
},
"required": [
"dataType",
"identifier",
"isCategorical",
"name"
]
},
"Visibility": {
"type": "object",
"additionalProperties": false,
"properties": {
"scope": {
"type": "string"
}
},
"required": [
"scope"
]
}
}
}
Examples
model = await modzyClient.getModelByName();
console.table(model);
Using promises
modzyClient.getModelByName()
.then(
(model)=>{
console.table(model);
}
)
.catch(
(error)=>{
console.error(error);
}
);
Updated about 2 years ago