Closed koszny closed 7 years ago
Sorry for the delay on this.
I tested successfully with the following:
const Clarifai = require('clarifai')
const app = new Clarifai.App({
apiKey: 'YOUR_API_KEY'
})
app.models.initModel('car-beer')
.then(model => {
return model.deleteConcepts({ id: 'beer' })
})
.then(res => console.log(res))
.catch(err => console.error(err))
Please let me know if you still have issues.
how is the removal example from here: https://developer.clarifai.com/guide/models#models supposed to work? shouldn't:
update(obj) { let url =
${this._config.apiEndpoint}${MODELS_PATH}
; let modelData = [obj]; let data = {models: modelData.map(formatModel)}; if (data.concepts) { data['action'] = obj.action || 'merge'; }in Model.js be changed to:
update(obj) { obj.id = this.id; let url =
${this._config.apiEndpoint}${MODELS_PATH}
; let modelData = [obj]; let data = {models: modelData.map(formatModel)}; if (data.models) { data['action'] = obj.action || 'merge'; } ?