Nuclia Understanding API (v1)
API reference for the Nuclia Understanding API.
Pull
Pull internal message on a partition
query Parameters
Timeout (integer) or Timeout (null) (Timeout) Default: 5 | |
Partition (integer) or Partition (null) (Partition) Default: 1 | |
From Cursor (integer) or From Cursor (null) (From Cursor) | |
limit | integer (Limit) Default: 5 |
Responses
Response samples
- 200
- 422
{- "status": "ok",
- "payload": "string",
- "payloads": [ ],
- "msgid": "string",
- "cursor": 0
}
Send Data To Process
Push data to process
Request Body schema: application/jsonrequired
Kbid (string) or Kbid (null) (Kbid) | |
Uuid (string) or Uuid (null) (Uuid) | |
Title (string) or Title (null) (Title) | |
labels | Array of strings (Labels) Default: [] |
Slug (string) or Slug (null) (Slug) | |
Source (integer) or null | |
Userid (string) or Userid (null) (Userid) | |
object (Genericfield) Default: {} | |
object (Filefield) Default: {} | |
object (Linkfield) Default: {} | |
object (Textfield) Default: {} | |
object (Layoutfield) Default: {} | |
object (Conversationfield) Default: {} | |
PushProcessingOptions (object) or null | |
LearningConfig (object) or null | |
WebhookConfig (object) or null |
Responses
Request samples
- Payload
{- "kbid": "string",
- "uuid": "string",
- "title": "string",
- "labels": [ ],
- "slug": "string",
- "source": 0,
- "userid": "string",
- "genericfield": { },
- "filefield": { },
- "linkfield": { },
- "textfield": { },
- "layoutfield": { },
- "conversationfield": { },
- "processing_options": {
- "ml_text": true
}, - "learning_config": {
- "semantic_models": [
- "string"
], - "generative_model": "string",
- "ner_model": "string",
- "anonymization_model": "string",
- "visual_labeling": "string"
}, - "webhook_config": {
- "uri": "string",
- "headers": { }
}
}
Response samples
- 200
- 422
{- "seqid": 0,
- "account_seq": 0,
- "queue": "shared",
- "uuid": "string",
- "processing_id": "string"
}
Get Processed Data
Retreive status of processed and unprocessed payloads from a zone
query Parameters
Cursor (string) or Cursor (null) (Cursor) | |
limit | integer (Limit) Default: 20 |
Scheduled (boolean) or Scheduled (null) (Scheduled) | |
Kbid (string) or Kbid (null) (Kbid) | |
sort_on | string (SortFields) Enum: "timestamp" "scheduled_at" "completed_at" |
sort_order | string (SortOrder) Enum: "asc" "desc" |
Responses
Response samples
- 200
- 422
{- "results": [
- {
- "processing_id": "string",
- "resource_id": "string",
- "kbid": "string",
- "title": "string",
- "labels": [
- "string"
], - "completed": true,
- "scheduled": true,
- "timestamp": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "scheduled_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "schedule_eta": 0,
- "schedule_order": 0,
- "request": "string",
- "response": "string"
}
], - "cursor": "string"
}
Get Processed Data
Retreive status of processed and unprocessed payloads from a zone
path Parameters
processing_id required | string (Processing Id) |
Responses
Response samples
- 200
- 422
{- "processing_id": "string",
- "resource_id": "string",
- "kbid": "string",
- "title": "string",
- "labels": [
- "string"
], - "completed": true,
- "scheduled": true,
- "timestamp": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "scheduled_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "schedule_eta": 0,
- "schedule_order": 0,
- "request": "string",
- "response": "string"
}
Upload Binary File
Upload a file using a multipart request
header Parameters
X-Filename (string) or X-Filename (null) (X-Filename) Default: | |
X-Password (string) or X-Password (null) (X-Password) | |
X-Language (string) or X-Language (null) (X-Language) | |
X-Md5 (string) or X-Md5 (null) (X-Md5) |
Responses
Response samples
- 201
- 422
null
Tus Server Information
Gather information about the Server’s current configuration such as enabled extensions, version...
path Parameters
required | Upload Id (string) or Upload Id (null) (Upload Id) |
Responses
Response samples
- 422
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
]
}
Start Dataset Training Task
Start a train task on a dataset
path Parameters
dataset_id required | string (Dataset Id) |
account_id required | string (Account Id) |
Request Body schema: application/jsonrequired
name required | string (TaskName) Enum: "dummy" "env" "demo-dataset" "labeler" "llm-graph" "synthetic-questions" "ask" "llm-align" "semantic-model-migrator" |
required | DataAugmentation (object) or SemanticModelMigrationParams (object) or Parameters (null) (Parameters) Parameters to be passed to the task. These must match the |
Responses
Request samples
- Payload
{- "name": "dummy",
- "parameters": {
- "name": "",
- "on": 0,
- "filter": {
- "contains": [
- "string"
], - "resource_type": [
- "string"
], - "field_types": [
- "string"
], - "not_field_types": [
- "string"
], - "rids": [
- "string"
], - "fields": [
- "string"
], - "splits": [
- "string"
]
}, - "operations": [
- {
- "graph": {
- "entity_defs": [
- {
- "label": "string",
- "description": ""
}
], - "entity_examples": [
- {
- "name": "string",
- "label": "string",
- "example": ""
}
], - "relation_examples": [
- {
- "source": "string",
- "target": "string",
- "label": "string",
- "example": ""
}
], - "ident": ""
}, - "label": {
- "labels": [
- {
- "label": "",
- "description": "",
- "examples": [
- "string"
]
}
], - "ident": "",
- "description": "",
- "multiple": false
}, - "ask": {
- "question": "",
- "destination": "",
- "json": false
}, - "qa": {
- "question_generator_prompt": "",
- "system_question_generator_prompt": "",
- "summary_prompt": "",
- "generate_answers_prompt": ""
}, - "extract": {
- "model": 0
}, - "prompt_guard": false,
- "llama_guard": false
}
], - "llm": {
- "model": "",
- "provider": "",
- "keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}
}, - "prompts": {
- "openai": {
- "system": "",
- "prompt": ""
}, - "azure_openai": {
- "system": "",
- "prompt": ""
}, - "palm": {
- "prompt": ""
}, - "anthropic": {
- "prompt": ""
}, - "text_generation": {
- "prompt": ""
}, - "mistral": {
- "prompt": ""
}, - "azure_mistral": {
- "prompt": ""
}, - "claude3": {
- "system": "",
- "prompt": ""
}
}
}
}
}
Response samples
- 200
- 422
{- "name": "dummy",
- "status": "not_running",
- "id": "string"
}
Inspect Dataset Training Task
Get the status of a train task on a dataset
path Parameters
dataset_id required | string (Dataset Id) |
account_id required | string (Account Id) |
task_id required | string (Task Id) |
Responses
Response samples
- 200
- 422
{- "task": {
- "name": "string",
- "image_repository": "europe-west4-docker.pkg.dev/nuclia-internal/nuclia",
- "image_name": "string",
- "image_version": "latest",
- "entrypoint": [
- "string"
], - "sentry_id": "string",
- "memory": "1Gi",
- "cpu": "1000m",
- "imagePullPolicy": "Always",
- "use_gpu": false,
- "trainset_type": 0,
- "command": [
- "string"
], - "disallowed_account_types": [ ],
- "validation": { },
- "model_type": null,
- "listing": true,
- "data_augmentation": false,
- "description": "string",
- "feedback": false,
- "available_on": [ ],
- "conflict": null
}, - "source": "nucliadb",
- "kbid": "string",
- "dataset_id": "string",
- "dataset_path": "string",
- "account_id": "string",
- "account_type": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "parameters": { },
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "scheduled": false,
- "completed": false,
- "stopped": false,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "stopped_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "token": "string",
- "key_id": "string",
- "ndb_token": "string",
- "log": "string"
}
Download Account Predictive Model File
Download the trained model or any other generated file as a result of a training task on a Knowledge Box
path Parameters
kbid required | string (Kbid) |
model_id required | string (Model Id) |
filename required | string (Filename) |
query Parameters
account_id required | string (Account Id) |
Responses
Response samples
- 200
- 422
null
Add A Model To A Kb
Add a model to a KB to be used
path Parameters
account_id required | string (Account Id) |
kbid required | string (Kbid) |
Request Body schema: application/jsonrequired
id required | string (Id) |
Responses
Request samples
- Payload
{- "id": "string"
}
Response samples
- 200
- 422
null
Learning Configuration Schema
Get schema for creating a KB
path Parameters
account_id required | string (Account Id) |
Responses
Response samples
- 200
- 422
{- "semantic_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "semantic_models": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "default_semantic_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "anonymization_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "visual_labeling": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "generative_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "ner_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "relation_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "summary_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "summary": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "user_keys": {
- "schemas": { },
- "create": false,
- "update": false
}, - "user_prompts": {
- "schemas": { },
- "create": false,
- "update": false
}, - "summary_prompt": {
- "schemas": { },
- "create": false,
- "update": false
}, - "prefer_markdown_generative_response": {
- "schemas": { },
- "create": false,
- "update": false
}
}
Knowledgebox Models Configuration
Current configuration of models assigned to a knowledgebox
path Parameters
kbid required | string (Kbid) |
Responses
Response samples
- 200
- 422
{- "resource_labelers_models": [
- "string"
], - "paragraph_labelers_models": [
- "string"
], - "intent_models": [
- "string"
], - "visual_labeling": "disabled",
- "ner_model": "multilingual",
- "relation_model": "base",
- "anonymization_model": "disabled",
- "semantic_model": "string",
- "semantic_models": [
- "string"
], - "default_semantic_model": "string",
- "semantic_vector_similarity": "DOT",
- "semantic_vector_size": 1024,
- "semantic_matryoshka_dims": [ ],
- "semantic_threshold": 0.4,
- "generative_model": "chatgpt-azure-4o",
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}
}, - "user_prompts": {
- "openai": {
- "system": "",
- "prompt": ""
}, - "azure_openai": {
- "system": "",
- "prompt": ""
}, - "palm": {
- "prompt": ""
}, - "anthropic": {
- "prompt": ""
}, - "text_generation": {
- "prompt": ""
}, - "mistral": {
- "prompt": ""
}, - "azure_mistral": {
- "prompt": ""
}, - "claude3": {
- "system": "",
- "prompt": ""
}
}, - "summary": "extended",
- "summary_model": "claude-3-fast",
- "summary_prompt": {
- "prompt": "Make a bullet point summary of the following content: {text}"
}, - "prefer_markdown_generative_response": false,
- "semantic_model_configs": { }
}
Knowledgebox Models Add Configuration
Current configuration of models assigned to a knowledgebox
path Parameters
kbid required | string (Kbid) |
Request Body schema: application/jsonrequired
AnonymizationModel (string) or Anonymization Model (string) (Anonymization Model) Default: "disabled" | |
VisualLabeling (string) or Visual Labeling (string) (Visual Labeling) Default: "disabled" | |
generative_model | string (Generative Model) Default: "chatgpt-azure-4o" |
NERModel"multilingual" (string) or Ner Model (string) (Ner Model) Default: "multilingual" | |
RelationModel"base" (string) or Relation Model (string) (Relation Model) Default: "base" | |
UserLearningKeys (object) or null | |
UserPrompts (object) or null | |
Summary (string) or null Default: "simple" | |
summary_model | string (Summary Model) Default: "claude-3-fast" |
SummaryPrompt (object) or null | |
prefer_markdown_generative_response | boolean (Prefer Markdown Generative Response) Default: false |
SemanticModel (string) or null The default vector set / semantic model to use. Must be one of the models defined in the | |
SemanticModel (string) or null Deprecated | |
Array of Semantic Models (strings) or Semantic Models (null) (Semantic Models) |
Responses
Request samples
- Payload
{- "anonymization_model": "disabled",
- "visual_labeling": "disabled",
- "generative_model": "chatgpt-azure-4o",
- "ner_model": "multilingual",
- "relation_model": "base",
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}
}, - "user_prompts": {
- "openai": {
- "system": "",
- "prompt": ""
}, - "azure_openai": {
- "system": "",
- "prompt": ""
}, - "palm": {
- "prompt": ""
}, - "anthropic": {
- "prompt": ""
}, - "text_generation": {
- "prompt": ""
}, - "mistral": {
- "prompt": ""
}, - "azure_mistral": {
- "prompt": ""
}, - "claude3": {
- "system": "",
- "prompt": ""
}
}, - "summary": "simple",
- "summary_model": "claude-3-fast",
- "summary_prompt": {
- "prompt": "Make a bullet point summary of the following content: {text}"
}, - "prefer_markdown_generative_response": false,
- "default_semantic_model": "en-2024-04-24",
- "semantic_model": "en-2024-04-24",
- "semantic_models": [
- "en-2024-04-24"
]
}
Response samples
- 200
- 422
{- "resource_labelers_models": [
- "string"
], - "paragraph_labelers_models": [
- "string"
], - "intent_models": [
- "string"
], - "visual_labeling": "disabled",
- "ner_model": "multilingual",
- "relation_model": "base",
- "anonymization_model": "disabled",
- "semantic_model": "string",
- "semantic_models": [
- "string"
], - "default_semantic_model": "string",
- "semantic_vector_similarity": "DOT",
- "semantic_vector_size": 1024,
- "semantic_matryoshka_dims": [ ],
- "semantic_threshold": 0.4,
- "generative_model": "chatgpt-azure-4o",
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}
}, - "user_prompts": {
- "openai": {
- "system": "",
- "prompt": ""
}, - "azure_openai": {
- "system": "",
- "prompt": ""
}, - "palm": {
- "prompt": ""
}, - "anthropic": {
- "prompt": ""
}, - "text_generation": {
- "prompt": ""
}, - "mistral": {
- "prompt": ""
}, - "azure_mistral": {
- "prompt": ""
}, - "claude3": {
- "system": "",
- "prompt": ""
}
}, - "summary": "extended",
- "summary_model": "claude-3-fast",
- "summary_prompt": {
- "prompt": "Make a bullet point summary of the following content: {text}"
}, - "prefer_markdown_generative_response": false,
- "semantic_model_configs": { }
}
Knowledgebox Models Update Configuration
Current configuration of models assigned to a knowledgebox
path Parameters
kbid required | string (Kbid) |
Request Body schema: application/jsonrequired
AnonymizationModel (string) or Anonymization Model (string) (Anonymization Model) Default: "disabled" | |
VisualLabeling (string) or Visual Labeling (string) (Visual Labeling) Default: "disabled" | |
generative_model | string (Generative Model) Default: "chatgpt-azure-4o" |
NERModel"multilingual" (string) or Ner Model (string) (Ner Model) Default: "multilingual" | |
RelationModel"base" (string) or Relation Model (string) (Relation Model) Default: "base" | |
UserLearningKeys (object) or null | |
UserPrompts (object) or null | |
Summary (string) or null Default: "simple" | |
summary_model | string (Summary Model) Default: "claude-3-fast" |
SummaryPrompt (object) or null | |
prefer_markdown_generative_response | boolean (Prefer Markdown Generative Response) Default: false |
SemanticModel (string) or null The default vector set / semantic model to use. Must be one of the models defined in the |
Responses
Request samples
- Payload
{- "anonymization_model": "disabled",
- "visual_labeling": "disabled",
- "generative_model": "chatgpt-azure-4o",
- "ner_model": "multilingual",
- "relation_model": "base",
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}
}, - "user_prompts": {
- "openai": {
- "system": "",
- "prompt": ""
}, - "azure_openai": {
- "system": "",
- "prompt": ""
}, - "palm": {
- "prompt": ""
}, - "anthropic": {
- "prompt": ""
}, - "text_generation": {
- "prompt": ""
}, - "mistral": {
- "prompt": ""
}, - "azure_mistral": {
- "prompt": ""
}, - "claude3": {
- "system": "",
- "prompt": ""
}
}, - "summary": "simple",
- "summary_model": "claude-3-fast",
- "summary_prompt": {
- "prompt": "Make a bullet point summary of the following content: {text}"
}, - "prefer_markdown_generative_response": false,
- "default_semantic_model": "en-2024-04-24"
}
Response samples
- 200
- 422
{- "resource_labelers_models": [
- "string"
], - "paragraph_labelers_models": [
- "string"
], - "intent_models": [
- "string"
], - "visual_labeling": "disabled",
- "ner_model": "multilingual",
- "relation_model": "base",
- "anonymization_model": "disabled",
- "semantic_model": "string",
- "semantic_models": [
- "string"
], - "default_semantic_model": "string",
- "semantic_vector_similarity": "DOT",
- "semantic_vector_size": 1024,
- "semantic_matryoshka_dims": [ ],
- "semantic_threshold": 0.4,
- "generative_model": "chatgpt-azure-4o",
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}
}, - "user_prompts": {
- "openai": {
- "system": "",
- "prompt": ""
}, - "azure_openai": {
- "system": "",
- "prompt": ""
}, - "palm": {
- "prompt": ""
}, - "anthropic": {
- "prompt": ""
}, - "text_generation": {
- "prompt": ""
}, - "mistral": {
- "prompt": ""
}, - "azure_mistral": {
- "prompt": ""
}, - "claude3": {
- "system": "",
- "prompt": ""
}
}, - "summary": "extended",
- "summary_model": "claude-3-fast",
- "summary_prompt": {
- "prompt": "Make a bullet point summary of the following content: {text}"
}, - "prefer_markdown_generative_response": false,
- "semantic_model_configs": { }
}
Learning Configuration Schema
Get jsonschema definition for learning_configuration
field of knowledgebox creation payload
Responses
Response samples
- 200
- 422
{- "semantic_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "semantic_models": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "default_semantic_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "anonymization_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "visual_labeling": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "generative_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "ner_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "relation_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "summary_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "summary": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "user_keys": {
- "schemas": { },
- "create": false,
- "update": false
}, - "user_prompts": {
- "schemas": { },
- "create": false,
- "update": false
}, - "summary_prompt": {
- "schemas": { },
- "create": false,
- "update": false
}, - "prefer_markdown_generative_response": {
- "schemas": { },
- "create": false,
- "update": false
}
}
Learning Configuration Schema
Get jsonschema definition for learning_configuration
field of knowledgebox creation payload
Responses
Response samples
- 200
- 422
{- "semantic_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "semantic_models": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "default_semantic_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "anonymization_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "visual_labeling": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "generative_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "ner_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "relation_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "summary_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "summary": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "user_keys": {
- "schemas": { },
- "create": false,
- "update": false
}, - "user_prompts": {
- "schemas": { },
- "create": false,
- "update": false
}, - "summary_prompt": {
- "schemas": { },
- "create": false,
- "update": false
}, - "prefer_markdown_generative_response": {
- "schemas": { },
- "create": false,
- "update": false
}
}
Learning Configuration Schema
Get jsonschema definition for learning_configuration
field of knowledgebox update payload
path Parameters
kbid required | string (Kbid) |
Responses
Response samples
- 200
- 422
{- "semantic_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "semantic_models": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "default_semantic_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "anonymization_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "visual_labeling": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "generative_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "ner_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "relation_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "summary_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "summary": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "user_keys": {
- "schemas": { },
- "create": false,
- "update": false
}, - "user_prompts": {
- "schemas": { },
- "create": false,
- "update": false
}, - "summary_prompt": {
- "schemas": { },
- "create": false,
- "update": false
}, - "prefer_markdown_generative_response": {
- "schemas": { },
- "create": false,
- "update": false
}
}
Predict Chat
Chat interface for your NucliaDB
query Parameters
model | string (Model) Default: "chatgpt-azure-4o" |
Request Body schema: application/jsonrequired
question required | string (Question) |
retrieval | boolean (Retrieval) Default: true |
user_id required | string (User Id) |
System (string) or System (null) (System) | |
Array of objects (Chat History) Default: [] | |
Array of objects (Context) Default: [] | |
Array of Query Context (strings) or Query Context (object) (Query Context) Default: {} | |
object (Query Context Order) Default: {} | |
Truncate (boolean) or Truncate (null) (Truncate) Default: false | |
UserPrompt (object) or null | |
Citations (boolean) or Citations (null) (Citations) Default: false | |
Citation Threshold (number) or Citation Threshold (null) (Citation Threshold) If citations is set to True, this will be the similarity threshold. Value between 0 and 1, lower values will produce more citations. If not set, it will be set to the optimized threshold found by Nuclia. | |
Generative Model (string) or Generative Model (null) (Generative Model) | |
Max Tokens (integer) or Max Tokens (null) (Max Tokens) | |
Array of Query Context Images (objects) or Query Context Images (object) (Query Context Images) Default: {} | |
Prefer Markdown (boolean) or Prefer Markdown (null) (Prefer Markdown) | |
Json Schema (object) or Json Schema (null) (Json Schema) | |
format_prompt | boolean (Format Prompt) Default: true |
rerank_context | boolean (Rerank Context) Default: false Whether to reorder the query context based on a reranker. This option will also make it so the first response will contain the scores given for each context piece. |
Responses
Request samples
- Payload
{- "question": "string",
- "retrieval": true,
- "user_id": "string",
- "system": "string",
- "chat_history": [ ],
- "context": [ ],
- "query_context": { },
- "query_context_order": { },
- "truncate": false,
- "user_prompt": {
- "prompt": "string"
}, - "citations": false,
- "citation_threshold": 1,
- "generative_model": "string",
- "max_tokens": 0,
- "query_context_images": { },
- "prefer_markdown": true,
- "json_schema": { },
- "format_prompt": true,
- "rerank_context": false
}
Response samples
- 200
- 422
null
Predict Chat Kbid
Chat interface for your NucliaDB
path Parameters
kbid required | string (Kbid) |
Request Body schema: application/jsonrequired
question required | string (Question) |
retrieval | boolean (Retrieval) Default: true |
user_id required | string (User Id) |
System (string) or System (null) (System) | |
Array of objects (Chat History) Default: [] | |
Array of objects (Context) Default: [] | |
Array of Query Context (strings) or Query Context (object) (Query Context) Default: {} | |
object (Query Context Order) Default: {} | |
Truncate (boolean) or Truncate (null) (Truncate) Default: false | |
UserPrompt (object) or null | |
Citations (boolean) or Citations (null) (Citations) Default: false | |
Citation Threshold (number) or Citation Threshold (null) (Citation Threshold) If citations is set to True, this will be the similarity threshold. Value between 0 and 1, lower values will produce more citations. If not set, it will be set to the optimized threshold found by Nuclia. | |
Generative Model (string) or Generative Model (null) (Generative Model) | |
Max Tokens (integer) or Max Tokens (null) (Max Tokens) | |
Array of Query Context Images (objects) or Query Context Images (object) (Query Context Images) Default: {} | |
Prefer Markdown (boolean) or Prefer Markdown (null) (Prefer Markdown) | |
Json Schema (object) or Json Schema (null) (Json Schema) | |
format_prompt | boolean (Format Prompt) Default: true |
rerank_context | boolean (Rerank Context) Default: false Whether to reorder the query context based on a reranker. This option will also make it so the first response will contain the scores given for each context piece. |
Responses
Request samples
- Payload
{- "question": "string",
- "retrieval": true,
- "user_id": "string",
- "system": "string",
- "chat_history": [ ],
- "context": [ ],
- "query_context": { },
- "query_context_order": { },
- "truncate": false,
- "user_prompt": {
- "prompt": "string"
}, - "citations": false,
- "citation_threshold": 1,
- "generative_model": "string",
- "max_tokens": 0,
- "query_context_images": { },
- "prefer_markdown": true,
- "json_schema": { },
- "format_prompt": true,
- "rerank_context": false
}
Response samples
- 200
- 422
null
Predict Query
Get the vector of a sentence
query Parameters
Text (string) or Text (null) (Text) Text to process | |
semantic_model | string (Semantic Model) Default: "multilingual-2024-05-06" |
token_model | string (Token Model) Default: "multilingual" |
generative_model | string (Generative Model) Default: "chatgpt-azure-4o" |
rephrase | boolean (Rephrase) Default: false |
Rephrase Prompt (string) or Rephrase Prompt (null) (Rephrase Prompt) Examples: rephrase_prompt=Rephrase this question so its better for retrieval, and keep the rephrased question in the same language as the original.
QUESTION: {question}
Please return ONLY the question without any explanation. Just the rephrased question. rephrase_prompt=Rephrase this question so its better for retrieval, identify any part numbers and append them to the end of the question separated by a commas.
QUESTION: {question}
Please return ONLY the question without any explanation. Prompt to rephrase the sentence, if not provided, the default prompt will be used. It must include the {question} placeholder. The placeholder will be replaced with the original question. |
Responses
Response samples
- 200
- 422
{- "language": "string",
- "stop_words": [
- "string"
], - "semantic_threshold": 0,
- "semantic_thresholds": {
- "property1": 0,
- "property2": 0
}, - "visual_llm": true,
- "max_context": 0,
- "entities": {
- "tokens": [ ],
- "time": 0,
- "input_tokens": 0
}, - "sentence": {
- "data": [
- 0
], - "vectors": {
- "property1": [
- 0
], - "property2": [
- 0
]
}, - "time": 0,
- "timings": {
- "property1": 0,
- "property2": 0
}
}, - "query": "string"
}
Predict Query Kbid
Get the vector of a sentence
path Parameters
kbid required | string (Kbid) |
query Parameters
Text (string) or Text (null) (Text) Text to process | |
Array of Semantic Models (strings) or Semantic Models (null) (Semantic Models) Semantic models to compute the sentence vector for, if not provided, it will only compute the sentence vector for default semantic model in the Knowledge box's configuration. | |
generative_model | string (Generative Model) Default: "chatgpt-azure-4o-mini" |
rephrase | boolean (Rephrase) Default: false |
Rephrase Prompt (string) or Rephrase Prompt (null) (Rephrase Prompt) Examples: rephrase_prompt=Rephrase this question so its better for retrieval, and keep the rephrased question in the same language as the original.
QUESTION: {question}
Please return ONLY the question without any explanation. Just the rephrased question. rephrase_prompt=Rephrase this question so its better for retrieval, identify any part numbers and append them to the end of the question separated by a commas.
QUESTION: {question}
Please return ONLY the question without any explanation. Prompt to rephrase the sentence, if not provided, the default prompt will be used. It must include the {question} placeholder. The placeholder will be replaced with the original question. |
Responses
Response samples
- 200
- 422
{- "language": "string",
- "stop_words": [
- "string"
], - "semantic_threshold": 0,
- "semantic_thresholds": {
- "property1": 0,
- "property2": 0
}, - "visual_llm": true,
- "max_context": 0,
- "entities": {
- "tokens": [ ],
- "time": 0,
- "input_tokens": 0
}, - "sentence": {
- "data": [
- 0
], - "vectors": {
- "property1": [
- 0
], - "property2": [
- 0
]
}, - "time": 0,
- "timings": {
- "property1": 0,
- "property2": 0
}
}, - "query": "string"
}
Predict Rephrase
Rephrase interface for your NucliaDB
query Parameters
model | string (Model) Default: "chatgpt-azure-4o" |
Request Body schema: application/jsonrequired
question required | string (Question) |
Array of objects (Chat History) | |
Array of objects (Context) | |
Array of User Context (strings) or User Context (null) (User Context) | |
user_id required | string (User Id) |
Generative Model (string) or Generative Model (null) (Generative Model) | |
Prompt (string) or Prompt (null) (Prompt) Prompt to send the model to rephrase the sentence, if not provided, the default prompt will be used. It must include the {question} placeholder. The placeholder will be replaced with the original question. It will only be used if no user_context is provided. |
Responses
Request samples
- Payload
{- "question": "string",
- "chat_history": [
- {
- "author": "NUCLIA",
- "text": "string"
}
], - "context": [
- {
- "author": "NUCLIA",
- "text": "string"
}
], - "user_context": [
- "string"
], - "user_id": "string",
- "generative_model": "string",
- "prompt": "Rephrase this question so its better for retrieval, and keep the rephrased question in the same language as the original.\nQUESTION: {question}\nPlease return ONLY the question without any explanation. Just the rephrased question."
}
Response samples
- 200
- 422
"string"
Predict Rephrase Kbid
Rephrase interface for your NucliaDB with Container
path Parameters
kbid required | string (Kbid) |
Request Body schema: application/jsonrequired
question required | string (Question) |
Array of objects (Chat History) | |
Array of objects (Context) | |
Array of User Context (strings) or User Context (null) (User Context) | |
user_id required | string (User Id) |
Generative Model (string) or Generative Model (null) (Generative Model) | |
Prompt (string) or Prompt (null) (Prompt) Prompt to send the model to rephrase the sentence, if not provided, the default prompt will be used. It must include the {question} placeholder. The placeholder will be replaced with the original question. It will only be used if no user_context is provided. |
Responses
Request samples
- Payload
{- "question": "string",
- "chat_history": [
- {
- "author": "NUCLIA",
- "text": "string"
}
], - "context": [
- {
- "author": "NUCLIA",
- "text": "string"
}
], - "user_context": [
- "string"
], - "user_id": "string",
- "generative_model": "string",
- "prompt": "Rephrase this question so its better for retrieval, and keep the rephrased question in the same language as the original.\nQUESTION: {question}\nPlease return ONLY the question without any explanation. Just the rephrased question."
}
Response samples
- 200
- 422
null
Predict Sentence
Get the vector of a sentence
query Parameters
text required | string (Text) |
model | string (Model) Default: "multilingual-2024-05-06" |
Responses
Response samples
- 200
- 422
{- "data": [
- 0
], - "vectors": {
- "property1": [
- 0
], - "property2": [
- 0
]
}, - "time": 0,
- "timings": {
- "property1": 0,
- "property2": 0
}
}
Predict Sentence Kbid
Get the vector of a sentence
path Parameters
kbid required | string (Kbid) |
query Parameters
text required | string (Text) |
Array of Models (strings) or Models (null) (Models) Semantic models to compute the sentence vector for, if not provided, it will only compute the sentence vector for default semantic model in the Knowledge box's configuration. |
Responses
Response samples
- 200
- 422
{- "data": [
- 0
], - "vectors": {
- "property1": [
- 0
], - "property2": [
- 0
]
}, - "time": 0,
- "timings": {
- "property1": 0,
- "property2": 0
}
}
Predict Summarize
Get summarized answers via NUA
query Parameters
model | string (Model) Default: "claude-3-fast" |
Request Body schema: application/jsonrequired
required | object (Resources) |
summary_kind | string (SummaryKind) Enum: "simple" "extended" |
User Prompt (string) or User Prompt (null) (User Prompt) Default: "" | |
Generative Model (string) or Generative Model (null) (Generative Model) |
Responses
Request samples
- Payload
{- "resources": {
- "property1": {
- "fields": {
- "property1": "string",
- "property2": "string"
}
}, - "property2": {
- "fields": {
- "property1": "string",
- "property2": "string"
}
}
}, - "summary_kind": "simple",
- "user_prompt": "",
- "generative_model": "string"
}
Response samples
- 200
- 422
null
Predict Summarize Kbid
Get summarized answers via NUA with Container
path Parameters
kbid required | string (Kbid) |
Request Body schema: application/jsonrequired
required | object (Resources) |
summary_kind | string (SummaryKind) Enum: "simple" "extended" |
User Prompt (string) or User Prompt (null) (User Prompt) Default: "" | |
Generative Model (string) or Generative Model (null) (Generative Model) |
Responses
Request samples
- Payload
{- "resources": {
- "property1": {
- "fields": {
- "property1": "string",
- "property2": "string"
}
}, - "property2": {
- "fields": {
- "property1": "string",
- "property2": "string"
}
}
}, - "summary_kind": "simple",
- "user_prompt": "",
- "generative_model": "string"
}
Response samples
- 200
- 422
null
Upload Partition Account
Upload a partition of a dataset
path Parameters
dataset_id required | string (Dataset Id) |
account_id required | string (Account Id) |
partition_id required | string (Partition Id) |
header Parameters
content-length required | integer (Content-Length) |
Responses
Response samples
- 422
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
]
}
Delete Dataset Partition
Deletes a partition of a dataset
path Parameters
dataset_id required | string (Dataset Id) |
partition_id required | string (Partition Id) ^[a-zA-Z0-9-_]+$ |
account_id required | string (Account Id) |
Responses
Response samples
- 422
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
]
}
Create Dataset Account
Creates a new dataset
path Parameters
account_id required | string (Account Id) |
Request Body schema: application/jsonrequired
name required | string (Name) |
required | object (DatasetFilter) |
type required | string (Task) Enum: "PARAGRAPH_CLASSIFICATION" "FIELD_CLASSIFICATION" "SENTENCE_CLASSIFICATION" "TOKEN_CLASSIFICATION" "IMAGE_CLASSIFICATION" "PARAGRAPH_STREAMING" "QUESTION_ANSWER_STREAMING" "FIELD_STREAMING" |
Responses
Request samples
- Payload
{- "name": "string",
- "filter": {
- "labels": [
- "string"
]
}, - "type": "PARAGRAPH_CLASSIFICATION"
}
Response samples
- 201
- 422
{- "id": "string"
}
Response samples
- 201
- 422
{- "datasets": [
- {
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "account_id": "string",
- "nua_client_id": "string",
- "account_type": "string",
- "type": "string",
- "path": "string",
- "filter": { },
- "name": "string"
}
]
}
Upload Partition
Upload a partition of a dataset
path Parameters
dataset_id required | string (Dataset Id) |
partition_id required | string (Partition Id) |
header Parameters
content-length required | integer (Content-Length) |
Responses
Response samples
- 422
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
]
}
Create Dataset
Creates a new dataset
Request Body schema: application/jsonrequired
name required | string (Name) |
required | object (DatasetFilter) |
type required | string (Task) Enum: "PARAGRAPH_CLASSIFICATION" "FIELD_CLASSIFICATION" "SENTENCE_CLASSIFICATION" "TOKEN_CLASSIFICATION" "IMAGE_CLASSIFICATION" "PARAGRAPH_STREAMING" "QUESTION_ANSWER_STREAMING" "FIELD_STREAMING" |
Responses
Request samples
- Payload
{- "name": "string",
- "filter": {
- "labels": [
- "string"
]
}, - "type": "PARAGRAPH_CLASSIFICATION"
}
Response samples
- 201
- 422
{- "id": "string"
}
List Account Possible Tasks
Get the available tasks on a KB
path Parameters
dataset_id required | string (Dataset Id) |
account_id required | string (Account Id) |
query Parameters
count | integer (Count) Default: 10 How many finished tasks to return |
Responses
Response samples
- 200
- 422
{- "tasks": [
- {
- "name": "string",
- "description": "string",
- "validation": { }
}
], - "running": [
- {
- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string"
}, - "source": "nucliadb",
- "kbid": "string",
- "dataset_id": "string",
- "account_id": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "scheduled": false,
- "completed": false,
- "stopped": false,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "stopped_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "parameters": { },
- "log": "string"
}
], - "configs": [
- {
- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string"
}, - "kbid": "string",
- "account_id": "string",
- "account_type": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "parameters": { },
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "defined_at": "2019-08-24T14:15:22Z"
}
], - "done": [
- {
- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string"
}, - "source": "nucliadb",
- "kbid": "string",
- "dataset_id": "string",
- "account_id": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "scheduled": false,
- "completed": false,
- "stopped": false,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "stopped_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "parameters": { },
- "log": "string"
}
]
}
Start Knowledge Box Training Task
Start a train task on a knowledge box
path Parameters
kb_uuid required | string (Kb Uuid) |
Request Body schema: application/jsonrequired
name required | string (TaskName) Enum: "dummy" "env" "demo-dataset" "labeler" "llm-graph" "synthetic-questions" "ask" "llm-align" "semantic-model-migrator" |
required | DataAugmentation (object) or SemanticModelMigrationParams (object) or Parameters (null) (Parameters) Parameters to be passed to the task. These must match the |
apply | string (ApplyOptions) Enum: "EXISTING" "NEW" "ALL" Defines how the tasks should be applied to the existing data.
|
Responses
Request samples
- Payload
{- "name": "dummy",
- "parameters": {
- "name": "",
- "on": 0,
- "filter": {
- "contains": [
- "string"
], - "resource_type": [
- "string"
], - "field_types": [
- "string"
], - "not_field_types": [
- "string"
], - "rids": [
- "string"
], - "fields": [
- "string"
], - "splits": [
- "string"
]
}, - "operations": [
- {
- "graph": {
- "entity_defs": [
- {
- "label": "string",
- "description": ""
}
], - "entity_examples": [
- {
- "name": "string",
- "label": "string",
- "example": ""
}
], - "relation_examples": [
- {
- "source": "string",
- "target": "string",
- "label": "string",
- "example": ""
}
], - "ident": ""
}, - "label": {
- "labels": [
- {
- "label": "",
- "description": "",
- "examples": [
- "string"
]
}
], - "ident": "",
- "description": "",
- "multiple": false
}, - "ask": {
- "question": "",
- "destination": "",
- "json": false
}, - "qa": {
- "question_generator_prompt": "",
- "system_question_generator_prompt": "",
- "summary_prompt": "",
- "generate_answers_prompt": ""
}, - "extract": {
- "model": 0
}, - "prompt_guard": false,
- "llama_guard": false
}
], - "llm": {
- "model": "",
- "provider": "",
- "keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}
}, - "prompts": {
- "openai": {
- "system": "",
- "prompt": ""
}, - "azure_openai": {
- "system": "",
- "prompt": ""
}, - "palm": {
- "prompt": ""
}, - "anthropic": {
- "prompt": ""
}, - "text_generation": {
- "prompt": ""
}, - "mistral": {
- "prompt": ""
}, - "azure_mistral": {
- "prompt": ""
}, - "claude3": {
- "system": "",
- "prompt": ""
}
}
}
}, - "apply": "EXISTING"
}
Response samples
- 200
- 422
{- "name": "dummy",
- "status": "not_running",
- "id": "string"
}
Inspect Knowledge Box Training Task
Get the status of a task on a knowledge box
path Parameters
kb_uuid required | string (Kb Uuid) |
task_id required | string (Task Id) |
Responses
Response samples
- 200
- 422
{- "request": {
- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string"
}, - "source": "nucliadb",
- "kbid": "string",
- "dataset_id": "string",
- "account_id": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "scheduled": false,
- "completed": false,
- "stopped": false,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "stopped_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "parameters": { },
- "log": "string"
}, - "config": {
- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string"
}, - "kbid": "string",
- "account_id": "string",
- "account_type": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "parameters": { },
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "defined_at": "2019-08-24T14:15:22Z"
}
}
Inspect Knowledge Box Training Task Worker Config
Get the worker config of a task on a knowledge box
path Parameters
task_id required | string (Task Id) |
Responses
Response samples
- 200
- 422
{- "task": {
- "name": "string",
- "image_repository": "europe-west4-docker.pkg.dev/nuclia-internal/nuclia",
- "image_name": "string",
- "image_version": "latest",
- "entrypoint": [
- "string"
], - "sentry_id": "string",
- "memory": "1Gi",
- "cpu": "1000m",
- "imagePullPolicy": "Always",
- "use_gpu": false,
- "trainset_type": 0,
- "command": [
- "string"
], - "disallowed_account_types": [ ],
- "validation": { },
- "model_type": null,
- "listing": true,
- "data_augmentation": false,
- "description": "string",
- "feedback": false,
- "available_on": [ ],
- "conflict": null
}, - "source": "nucliadb",
- "kbid": "string",
- "dataset_id": "string",
- "dataset_path": "string",
- "account_id": "string",
- "account_type": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "parameters": { },
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "scheduled": false,
- "completed": false,
- "stopped": false,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "stopped_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "token": "string",
- "key_id": "string",
- "ndb_token": "string",
- "log": "string"
}
List Knowledge Box Possible Tasks
Get the available tasks on a KB
path Parameters
kb_uuid required | string (Kb Uuid) |
query Parameters
count | integer (Count) Default: 10 How many finished tasks to return |
Responses
Response samples
- 200
- 422
{- "tasks": [
- {
- "name": "string",
- "description": "string",
- "validation": { }
}
], - "running": [
- {
- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string"
}, - "source": "nucliadb",
- "kbid": "string",
- "dataset_id": "string",
- "account_id": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "scheduled": false,
- "completed": false,
- "stopped": false,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "stopped_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "parameters": { },
- "log": "string"
}
], - "configs": [
- {
- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string"
}, - "kbid": "string",
- "account_id": "string",
- "account_type": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "parameters": { },
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "defined_at": "2019-08-24T14:15:22Z"
}
], - "done": [
- {
- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string"
}, - "source": "nucliadb",
- "kbid": "string",
- "dataset_id": "string",
- "account_id": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "scheduled": false,
- "completed": false,
- "stopped": false,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "stopped_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "parameters": { },
- "log": "string"
}
]
}