The following APIs allow you to run inference on trained models.
const result = await axios.get(
`https://dibby.ai/api/models`,
);
{
"items": [
{
"id": "some string",
"name": "some string",
"type": "TEXT_EMBEDDER",
"desc": "some string",
"owner": {
"name": "some string"
},
"bestVersion": "some string",
"config": "unknown",
"versions": [
{
"name": "some string",
"config": "unknown"
}
]
}
],
"totalPages": 0,
"currentPage": 0
}
const owner = 'some string';
const model = 'some string';
const result = await axios.post(
`https://dibby.ai/api/models/image_classifiers/${owner}/${model}/infer`,
{
"version": "some string",
"image": "https://dibby.ai/image.jpg"
}
);
{
"class": "some string",
"probabilities": {
"some string": 0
},
"confidence": 0
}
const owner = 'some string';
const model = 'some string';
const result = await axios.post(
`https://dibby.ai/api/models/image_scorers/${owner}/${model}/infer`,
{
"version": "some string",
"image": "https://dibby.ai/image.jpg"
}
);
{
"score": 0
}
const owner = 'some string';
const model = 'some string';
const result = await axios.post(
`https://dibby.ai/api/models/image_embedders/${owner}/${model}/infer`,
{
"version": "some string",
"image": "https://dibby.ai/image.jpg"
}
);
{
"embedding": {
"type": "GTE",
"value": [
0
]
}
}
const owner = 'some string';
const model = 'some string';
const result = await axios.post(
`https://dibby.ai/api/models/text_classifiers/${owner}/${model}/infer`,
{"version":"some string","text":"some string"}
);
{
"class": "some string",
"probabilities": {
"some string": 0
},
"confidence": 0
}
const owner = 'some string';
const model = 'some string';
const result = await axios.post(
`https://dibby.ai/api/models/text_embedders/${owner}/${model}/infer`,
{"version":"some string","text":"some string"}
);
{
"embedding": {
"type": "GTE",
"value": [
0
]
}
}
const owner = 'some string';
const model = 'some string';
const result = await axios.post(
`https://dibby.ai/api/models/document_extractors/${owner}/${model}/infer`,
{
"version": "some string",
"document": "https://dibby.ai/example.pdf"
}
);
{
"data": {
"some string": "unknown"
}
}