Response samples
- 200
- 422
{- "name": "HAL9000",
- "description": "Heuristically programmed Algorithmic computer",
- "skill_type": "abstractive",
- "skill_settings": {
- "requires_context": false,
- "requires_multiple_choices": 0
}, - "default_skill_args": { },
- "user_id": "Dave",
- "published": false,
- "skill_input_examples": [
- {
- "query": "What arms did Moonwatchers band carry?",
- "context": "At the water's edge, Moonwatcher and his band stop. They carry their bone clubs and bone knives. Led by One-ear, the Others half-heartly resume the battle-chant. But they are suddenly confrunted with a vision that cuts the sound from their throats, and strikes terror into their hearts."
}
], - "data_sets": [
- "HotpotQA",
- "SQuAD"
]
}
Update Skill
Updates a skill with the provided data.
Authorizations:
path Parameters
id required | string (Id) |
Request Body schema: application/json
Responses
Request samples
- Payload
{ }
Response samples
- 200
- 422
{- "name": "HAL9000",
- "description": "Heuristically programmed Algorithmic computer",
- "skill_type": "abstractive",
- "skill_settings": {
- "requires_context": false,
- "requires_multiple_choices": 0
}, - "default_skill_args": { },
- "user_id": "Dave",
- "published": false,
- "skill_input_examples": [
- {
- "query": "What arms did Moonwatchers band carry?",
- "context": "At the water's edge, Moonwatcher and his band stop. They carry their bone clubs and bone knives. Led by One-ear, the Others half-heartly resume the battle-chant. But they are suddenly confrunted with a vision that cuts the sound from their throats, and strikes terror into their hearts."
}
], - "data_sets": [
- "HotpotQA",
- "SQuAD"
]
}
Get Skills
Returns all skills that a user has access to. A user has access to all public skills, and private skill created by them.
Responses
Response samples
- 200
[- {
- "name": "HAL9000",
- "description": "Heuristically programmed Algorithmic computer",
- "skill_type": "abstractive",
- "skill_settings": {
- "requires_context": false,
- "requires_multiple_choices": 0
}, - "default_skill_args": { },
- "user_id": "Dave",
- "published": false,
- "skill_input_examples": [
- {
- "query": "What arms did Moonwatchers band carry?",
- "context": "At the water's edge, Moonwatcher and his band stop. They carry their bone clubs and bone knives. Led by One-ear, the Others half-heartly resume the battle-chant. But they are suddenly confrunted with a vision that cuts the sound from their throats, and strikes terror into their hearts."
}
], - "data_sets": [
- "HotpotQA",
- "SQuAD"
]
}
]
Create Skill
Creates a new skill and saves it.
Authorizations:
Request Body schema: application/json
id | string (Id) Identifier generated by mongoDB |
name required | string (Name) The name of the skill. |
url required | string (Url) The url where the skill is running. |
skill_type required | string (SkillType) Enum: "abstractive" "span-extraction" "multiple-choice" "categorical" "information-retrieval" Enum for different skill types. |
required | object (SkillSettings) Input Settings for the Skill. |
user_id required | string (User Id) Username of the skill author. |
created_at | string <date-time> (Created At) Timestamp of skill creation. |
Array of objects (Skill Input Examples) | |
object (Models) Default: {} Map of model identifiers that are used by the skill. This is used for model management. | |
description | string (Description) A description of the skill, for example describing its pipeline. |
default_skill_args | object (Default Skill Args) Default: {} A dictionary holding key-value pairs that should always be sent to the skill as input. This allows to use the same skill implementataion in different ways. |
published | boolean (Published) Default: false If |
meta_skill | boolean (Meta Skill) Default: false If |
client_id | string (Client Id) The clientId of the skill stored in Keycloak. |
client_secret | string (Client Secret) The cleint secret of the skill stored in Keycloak. |
data_sets | Array of strings (Data Sets) Default: [] This list contains all datasets with which the skill was trained |
Responses
Request samples
- Payload
{- "name": "HAL9000",
- "description": "Heuristically programmed Algorithmic computer",
- "skill_type": "abstractive",
- "skill_settings": {
- "requires_context": false,
- "requires_multiple_choices": 0
}, - "default_skill_args": { },
- "user_id": "Dave",
- "published": false,
- "skill_input_examples": [
- {
- "query": "What arms did Moonwatchers band carry?",
- "context": "At the water's edge, Moonwatcher and his band stop. They carry their bone clubs and bone knives. Led by One-ear, the Others half-heartly resume the battle-chant. But they are suddenly confrunted with a vision that cuts the sound from their throats, and strikes terror into their hearts."
}
], - "data_sets": [
- "HotpotQA",
- "SQuAD"
]
}
Response samples
- 201
- 422
{- "name": "HAL9000",
- "description": "Heuristically programmed Algorithmic computer",
- "skill_type": "abstractive",
- "skill_settings": {
- "requires_context": false,
- "requires_multiple_choices": 0
}, - "default_skill_args": { },
- "user_id": "Dave",
- "published": false,
- "skill_input_examples": [
- {
- "query": "What arms did Moonwatchers band carry?",
- "context": "At the water's edge, Moonwatcher and his band stop. They carry their bone clubs and bone knives. Led by One-ear, the Others half-heartly resume the battle-chant. But they are suddenly confrunted with a vision that cuts the sound from their throats, and strikes terror into their hearts."
}
], - "data_sets": [
- "HotpotQA",
- "SQuAD"
]
}
Publish Skill
Makes a skill publicly available.
Authorizations:
path Parameters
id required | string (Id) |
Responses
Response samples
- 201
- 422
{- "name": "HAL9000",
- "description": "Heuristically programmed Algorithmic computer",
- "skill_type": "abstractive",
- "skill_settings": {
- "requires_context": false,
- "requires_multiple_choices": 0
}, - "default_skill_args": { },
- "user_id": "Dave",
- "published": false,
- "skill_input_examples": [
- {
- "query": "What arms did Moonwatchers band carry?",
- "context": "At the water's edge, Moonwatcher and his band stop. They carry their bone clubs and bone knives. Led by One-ear, the Others half-heartly resume the battle-chant. But they are suddenly confrunted with a vision that cuts the sound from their throats, and strikes terror into their hearts."
}
], - "data_sets": [
- "HotpotQA",
- "SQuAD"
]
}
Unpublish Skill
Makes a skill private.
Authorizations:
path Parameters
id required | string (Id) |
Responses
Response samples
- 201
- 422
{- "name": "HAL9000",
- "description": "Heuristically programmed Algorithmic computer",
- "skill_type": "abstractive",
- "skill_settings": {
- "requires_context": false,
- "requires_multiple_choices": 0
}, - "default_skill_args": { },
- "user_id": "Dave",
- "published": false,
- "skill_input_examples": [
- {
- "query": "What arms did Moonwatchers band carry?",
- "context": "At the water's edge, Moonwatcher and his band stop. They carry their bone clubs and bone knives. Led by One-ear, the Others half-heartly resume the battle-chant. But they are suddenly confrunted with a vision that cuts the sound from their throats, and strikes terror into their hearts."
}
], - "data_sets": [
- "HotpotQA",
- "SQuAD"
]
}
Query Skill
Sends a query to the respective skill and returns its prediction.
path Parameters
id required | string (Id) |
Request Body schema: application/json
query required | string (Query) The input to the model that is entered by the user |
skill_args | object (Skill Args) Default: {} Optional values for specific parameters of the skill |
skill | object (Skill) Default: {} Skill information. See Skill-Manager for details. |
user_id | string (User Id) Default: "" |
explain_kwargs | object (Explain Kwargs) Default: {} Optional values for obtaining explainability outputs. |
attack_kwargs | object (Attack Kwargs) Default: {} Optional values for obtaining adversarial outputs. |
model_kwargs | object (Model Kwargs) Default: {} Optional values for the model forward pass. |
task_kwargs | object (Task Kwargs) Default: {} Optional values for the task. |
preprocessing_kwargs | object (Preprocessing Kwargs) Default: {} Optional values for preprocessing. |
Responses
Request samples
- Payload
{- "query": "string",
- "skill_args": { },
- "skill": { },
- "user_id": "",
- "explain_kwargs": { },
- "attack_kwargs": { },
- "model_kwargs": { },
- "task_kwargs": { },
- "preprocessing_kwargs": { }
}
Response samples
- 200
- 422
{- "predictions": [
- {
- "question": "string",
- "prediction_score": 0,
- "prediction_output": {
- "output": "string",
- "output_score": 0
}, - "prediction_documents": [ ],
- "prediction_graph": {
- "lm_subgraph": {
- "nodes": {
- "property1": {
- "id": 0,
- "name": "string",
- "q_node": true,
- "ans_node": true,
- "weight": 0
}, - "property2": {
- "id": 0,
- "name": "string",
- "q_node": true,
- "ans_node": true,
- "weight": 0
}
}, - "edges": {
- "property1": {
- "source": 0,
- "target": 0,
- "weight": 0,
- "label": "string"
}, - "property2": {
- "source": 0,
- "target": 0,
- "weight": 0,
- "label": "string"
}
}
}, - "attn_subgraph": {
- "nodes": {
- "property1": {
- "id": 0,
- "name": "string",
- "q_node": true,
- "ans_node": true,
- "weight": 0
}, - "property2": {
- "id": 0,
- "name": "string",
- "q_node": true,
- "ans_node": true,
- "weight": 0
}
}, - "edges": {
- "property1": {
- "source": 0,
- "target": 0,
- "weight": 0,
- "label": "string"
}, - "property2": {
- "source": 0,
- "target": 0,
- "weight": 0,
- "label": "string"
}
}
}
}, - "attributions": {
- "topk_question_idx": [
- 0
], - "topk_context_idx": [
- 0
], - "question_tokens": [
- [
- null
]
], - "context_tokens": [
- [
- null
]
]
}, - "bertviz": "string",
- "skill_id": "string"
}
], - "adversarial": {
- "indices": [
- 0
]
}
}
Get Skills By Dataset
Returns all the skills that were trained on the given dataset.
path Parameters
dataset required | string (Dataset) |
query Parameters
hf_name | string (Hf Name) |
Responses
Response samples
- 200
- 422
[- {
- "name": "HAL9000",
- "description": "Heuristically programmed Algorithmic computer",
- "skill_type": "abstractive",
- "skill_settings": {
- "requires_context": false,
- "requires_multiple_choices": 0
}, - "default_skill_args": { },
- "user_id": "Dave",
- "published": false,
- "skill_input_examples": [
- {
- "query": "What arms did Moonwatchers band carry?",
- "context": "At the water's edge, Moonwatcher and his band stop. They carry their bone clubs and bone knives. Led by One-ear, the Others half-heartly resume the battle-chant. But they are suddenly confrunted with a vision that cuts the sound from their throats, and strikes terror into their hearts."
}
], - "data_sets": [
- "HotpotQA",
- "SQuAD"
]
}
]
Get Skills By Dataset
Returns all the skills that were trained on the given dataset.
path Parameters
hf_name required | string (Hf Name) |
dataset required | string (Dataset) |
Responses
Response samples
- 200
- 422
[- {
- "name": "HAL9000",
- "description": "Heuristically programmed Algorithmic computer",
- "skill_type": "abstractive",
- "skill_settings": {
- "requires_context": false,
- "requires_multiple_choices": 0
}, - "default_skill_args": { },
- "user_id": "Dave",
- "published": false,
- "skill_input_examples": [
- {
- "query": "What arms did Moonwatchers band carry?",
- "context": "At the water's edge, Moonwatcher and his band stop. They carry their bone clubs and bone knives. Led by One-ear, the Others half-heartly resume the battle-chant. But they are suddenly confrunted with a vision that cuts the sound from their throats, and strikes terror into their hearts."
}
], - "data_sets": [
- "HotpotQA",
- "SQuAD"
]
}
]