import Morphik from 'morphik';
const client = new Morphik({
apiKey: 'My API Key',
});
const customModel = await client.modelConfig.customModels.create({
config: { foo: 'bar' },
model_name: 'model_name',
name: 'name',
provider: 'provider',
});
console.log(customModel.id);
{
"id": "<string>",
"name": "<string>",
"provider": "<string>",
"model_name": "<string>",
"config": {}
}
Create a new custom model.
import Morphik from 'morphik';
const client = new Morphik({
apiKey: 'My API Key',
});
const customModel = await client.modelConfig.customModels.create({
config: { foo: 'bar' },
model_name: 'model_name',
name: 'name',
provider: 'provider',
});
console.log(customModel.id);
{
"id": "<string>",
"name": "<string>",
"provider": "<string>",
"model_name": "<string>",
"config": {}
}
Request model for creating a custom model.
Successful Response
Custom model definition.
Was this page helpful?