This is the Documentaion for the AI Tool Server. This API hosts AI Tools that can be used with API Calls. The Server requires a highly parallalized and strong performance resource to run on. This can either be in house by a GPU Server or using a cloud solution.
All Responses that come back from the API Calls follow this style:
json {
"data": {
"Content of the response in a JSON object"
},
"message": "Message Code: Description of what happened"
}
Definition
GET /ai_tool_templates
Response Examples
200 OK
-> if successfull204 No Content
json {
"context_search":{
"type": "nlu",
"tradeoff_attributes": {
"accuracy_speed_tradeoff":
{
“min”:
{
"text": "accuracy",
"description": "More Computationcosts and higher Accuracy",
“value”: “0”
},
"max":
{
“text”:"speed",
"description": "Less Computationcosts and faster Speed",
“value”: “1”
},
"default_value": "0.5"
},
"results_number_tradeoff":
{
“min”:
{
"text": "Top 1 Result",
"description": "The less results the lower the chance of having the right result appear",
“value”: “1”
},
"max":
{
“text”:"Top 20 Results",
"description": "Too many results make the AI Tool less confinient to use",
“value”: “20”
},
"default_value": "3"
}}
"additional_data_for_initiation":
{
"search_corpus":
{
"description":"The text body that will be searched through",
"type":"String",
"max_size":{
"value":"3",
"unit":"gb"}
}
}
},
...
}
Definition
GET /existing_ai_tools
Response Examples
200 OK
-> if successfull204 No Content
json {
"context_search":{
"id": "context_2823d789"
"type": "nlu",
"tradeoff_attributes":
{
"accuracy_speed_tradeoff":
{
"set_value": "0.5"
},
"results_number_tradeoff":
{
"set_value": "3"
}}},
...
}
Definition
GET /running_ai_tools
Response Examples
200 OK
-> if successfull204 No Content
json {
"sentiment_analysis":{
"id": "sentiment_8h44472h33"
"type": "nlu",
"tradeoff_attributes":
{
"accuracy_speed_tradeoff":
{
"set_value": "0.5"
}}},
...
}
To make an AI Tool available for use, it first needs to be Initiated. Sometimes its just about setting tradeoff values and sometimes data has to be supplied. To find out what is needed use '''GET /available_ai_tools'''
Definition
PUT /ai_tool/:ai_tool_name
Arguments
json {
"ai_tool_template": string, -> specifies the available AI Tool to be used
"tradeoff_attributes": {
"accuracy_speed_tradeoff": double,
"results_number_tradeoff": double,
... }, -> The values for the Tradeoff attributes. If not set then the default value will be used. Varies by AI tool
"additional_data": {
"search_corpus": string,
"finetune_data": {
"url": url,
"number_of_input_columns": int,
"label_column": int,
"first_input": int,
"second_input": int,
"input_format": string,
"label_format": string}`
}, ... -> Additional data input specified in the template. Varies by AI Tool.
}
Response
201 Initiation successfully started
400 Invalid Input
json {
"ai_tool_id": string,
"progress_url": string,
"error_message": string
}
Here you are able to improve an existing AI Tool with own data or change the tradeoff attributes
Definition
POST /ai_tool/:ai_tool_id
Arguments
json {
"tradeoff_attributes": {
"accuracy_speed_tradeoff": double,
"results_number_tradeoff": double,
... } -> The values for the Tradeoff attributes. If not set then the previous value will be used. Varies by AI tool
"additional_data": {
"search_corpus": string,
"finetune_data": {
"url": url,
"number_of_input_columns": int,
"label_column": int,
"first_input": int,
"second_input": int,
"input_format": string,
"label_format": string}`
}, ... -> Additional data input specified in the template. Varies by AI Tool.
}
Response
201 Improvement successfully started
403 Invalid AI Tool ID
-> AI Tool ID was not found400 Invalid Input
json {
"ai_tool_id": string,
"progress_url": string,
"error_message": string
}
Definition
LOAD /ai_tool/:ai_tool_id
Response
201 Successfully Loaded
422 Already Loaded
-> AI Tool with this ID is already loaded403 Invalid AI Tool ID
-> AI Tool ID was not foundjson { "error_message": string }
Definition
GET /ai_tool/:ai_tool_id
Arguments
json {
"input":
{
"data":data,
"data_type":string
}
}
Response
201 Successfully Processed
400 Invalid Input
-> Invalid input data403 Invalid AI Tool ID
-> AI Tool ID was not found in active AI Tools. To see all active AI Tools call GET active_ai_tools
json {
"output": {
"value": data,
"type": string,
"confidence": doulbe
}
"error_message": string
}
Definition
UNLOAD /ai_tool/:ai_tool_id
Response
201 Successfully Loaded
403 Invalid AI Tool ID
-> AI Tool ID was not found in active AI Tools. To see all active AI Tools call GET active_ai_tools
json { "error_message": string }
Definition
DELETE /ai_tool/:ai_tool_id
Response
204 successfully Deleted
-> AI Tool is succesfully deleted403 Invalid AI Tool ID
-> AI Tool ID was not found in active AI Tools. To see all initiated AI Tools call GET initiated_ai_tools
json {
"deleted_model_id": string
}