Nuclia Understanding API (v1)
API reference for the Nuclia Understanding API.
Get Processed Activity Log
Get latest events related to activity of a Nuclia Understanding API client
query Parameters
page | integer (Page) Default: 0 |
size | integer (Size) Default: 50 |
header Parameters
x-stf-account required | string (X-Stf-Account) |
x-stf-account-type required | string (AccountType) Enum: "stash-trial" "stash-starter" "stash-growth" "stash-startup" "stash-enterprise" "stash-developer" "stash-business" An enumeration. |
x-stf-nua-internal-client-id required | string (X-Stf-Nua-Internal-Client-Id) |
Responses
Response samples
- 200
- 422
{- "events": [
- { }
], - "pagination": {
- "page": 0,
- "size": 0,
- "last": true
}
}
Send Data To Process
Push data to process
Request Body schema: application/jsonrequired
kbid | string (Kbid) non-empty ^[a-z0-9_-]+$ Default: "default" |
uuid | string (Uuid) non-empty ^[a-z0-9_-]+$ |
slug | string (Slug) |
source | integer (Source) Enum: 0 1 An enumeration. |
userid | string (Userid) |
object (Genericfield) Default: {} | |
object (Filefield) Default: {} | |
object (Linkfield) Default: {} | |
object (Textfield) Default: {} | |
object (Layoutfield) Default: {} | |
object (Conversationfield) Default: {} | |
object (PushProcessingOptions) | |
object (LearningConfig) | |
object (WebhookConfig) |
Responses
Request samples
- Payload
{- "kbid": "default",
- "uuid": "string",
- "slug": "string",
- "source": 0,
- "userid": "string",
- "genericfield": { },
- "filefield": { },
- "linkfield": { },
- "textfield": { },
- "layoutfield": { },
- "conversationfield": { },
- "processing_options": {
- "ml_text": true
}, - "learning_config": {
- "semantic_model": "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"
}
Get Dataset Task Executions
Gets the list of past training tasks executions on a dataset
path Parameters
dataset_id required | string (Dataset Id) |
query Parameters
task | Array of strings (Task) Default: "" |
page | integer (Page) Default: 0 |
size | integer (Size) Default: 50 |
Responses
Response samples
- 200
- 422
{- "items": [
- {
- "id": "string",
- "task": "string",
- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z",
- "status": "succeeded"
}
], - "pagination": {
- "page": 0,
- "size": 0,
- "last": true
}
}
Inspect Dataset Training Task
Get the status of a train task on a dataset
path Parameters
dataset_id required | string (Dataset Id) |
task_name required | string (Task Name) |
Responses
Response samples
- 200
- 422
{- "task": "string",
- "status": "not_running",
- "last_execution": {
- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z",
- "status": "succeeded"
}
}
Download Dataset Predictive Model File
Download the trained model or any other generated file as a result of a training task on a dataset
path Parameters
dataset_id required | string (Dataset Id) |
task_name required | string (Task Name) |
filename required | string (Filename) |
Responses
Response samples
- 200
- 422
null
Start Dataset Training Task
Start a train task on a dataset
path Parameters
dataset_id required | string (Dataset Id) |
task_name required | string (Task Name) |
Request Body schema: application/json
Responses
Request samples
- Payload
{ }
Response samples
- 200
- 422
{- "task": "string",
- "status": "not_running"
}
Get Knowledge Box Task Execution Result
Gets the details of a training task execution on a knowledge box
path Parameters
kb_uuid required | string (Kb Uuid) |
execution_id required | string (Execution Id) |
Responses
Response samples
- 200
- 422
{- "id": "string",
- "task": "string",
- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z",
- "status": "succeeded",
- "results": {
- "labelsets": [
- "string"
], - "num_resources": 0,
- "reports": { }
}, - "error": "string"
}
Get Knowledge Box Task Executions
Gets the list of past training tasks executions on a knowledge box
path Parameters
kb_uuid required | string (Kb Uuid) |
query Parameters
task | Array of strings (Task) Default: "" |
page | integer (Page) Default: 0 |
size | integer (Size) Default: 50 |
Responses
Response samples
- 200
- 422
{- "items": [
- {
- "id": "string",
- "task": "string",
- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z",
- "status": "succeeded"
}
], - "pagination": {
- "page": 0,
- "size": 0,
- "last": true
}
}
Inspect Knowledge Box Training Task
Get the status of a train task on a knowledge box
path Parameters
kb_uuid required | string (Kb Uuid) |
task_name required | string (Task Name) |
Responses
Response samples
- 200
- 422
{- "task": "string",
- "status": "not_running",
- "last_execution": {
- "start": "2019-08-24T14:15:22Z",
- "end": "2019-08-24T14:15:22Z",
- "status": "succeeded"
}
}
Download Nucliadb 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
kb_uuid required | string (Kb Uuid) |
task_name required | string (Task Name) |
filename required | string (Filename) |
Responses
Response samples
- 200
- 422
null
Start Knowledge Box Training Task
Start a train task on a knowledge box
path Parameters
kb_uuid required | string (Kb Uuid) |
task_name required | string (Task Name) |
Request Body schema: application/json
Responses
Request samples
- Payload
{ }
Response samples
- 200
- 422
{- "task": "string",
- "status": "not_running"
}
Update Dataset Configuration
Updates the configuration of a dataset
path Parameters
dataset_id required | string (Dataset Id) |
Request Body schema: application/jsonrequired
name | string (Name) |
object (DatasetFilter) | |
type | string (TrainsetType) Enum: "FIELD_CLASSIFICATION" "PARAGRAPH_CLASSIFICATION" "SENTENCE_CLASSIFICATION" "TOKEN_CLASSIFICATION" An enumeration. |
Responses
Request samples
- Payload
{- "name": "string",
- "filter": {
- "labels": [
- "string"
]
}, - "type": "FIELD_CLASSIFICATION"
}
Response samples
- 422
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
]
}
Upload Partition
Upload a partition of a dataset
path Parameters
dataset_id required | string (Dataset Id) |
partition_id required | string (Partition Id) ^[a-zA-Z0-9-_]+$ |
header Parameters
content-length required | string (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 (TrainsetType) Enum: "FIELD_CLASSIFICATION" "PARAGRAPH_CLASSIFICATION" "SENTENCE_CLASSIFICATION" "TOKEN_CLASSIFICATION" An enumeration. |
Responses
Request samples
- Payload
{- "name": "string",
- "filter": {
- "labels": [
- "string"
]
}, - "type": "FIELD_CLASSIFICATION"
}
Response samples
- 201
- 422
{- "id": "string"
}
Predict Chat
Chat interface for your NucliaDB
query Parameters
model | string (Model) Default: "chatgpt" |
Request Body schema: application/jsonrequired
question required | string (Question) |
retrieval | boolean (Retrieval) Default: true |
user_id required | string (User Id) |
system | string (System) |
Array of objects (Chat History) Default: [] | |
Array of objects (Context) Default: [] | |
query_context | Array of strings (Query Context) Default: [] |
truncate | boolean (Truncate) Default: false |
object (UserPrompt) |
Responses
Request samples
- Payload
{- "question": "string",
- "retrieval": true,
- "user_id": "string",
- "system": "string",
- "chat_history": [ ],
- "context": [ ],
- "query_context": [ ],
- "truncate": false,
- "user_prompt": {
- "prompt": "string"
}
}
Response samples
- 200
- 422
null
Predict Feedback
Get feedback
query Parameters
model required | string (Model) |
Request Body schema: application/jsonrequired
ident required | string (Ident) |
good required | boolean (Good) |
task required | string (FeedbackTasks) Enum: "CHAT" "SUMMARY" An enumeration. |
feedback | string (Feedback) |
user_id | string (User Id) |
client | string (Client) |
forwarded | string (Forwarded) |
Responses
Request samples
- Payload
{- "ident": "string",
- "good": true,
- "task": "CHAT",
- "feedback": "string",
- "user_id": "string",
- "client": "string",
- "forwarded": "string"
}
Response samples
- 422
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
]
}
Predict Rephrase
Rephrase interface for your NucliaDB
query Parameters
model | string (Model) Default: "chatgpt" |
Request Body schema: application/jsonrequired
question required | string (Question) |
Array of objects (Chat History) Default: [] | |
Array of objects (Context) Default: [] | |
user_id required | string (User Id) |
Responses
Request samples
- Payload
{- "question": "string",
- "chat_history": [ ],
- "context": [ ],
- "user_id": "string"
}
Response samples
- 200
- 422
"string"
Predict Summarize
Get summarized answers via NUA
query Parameters
model | string (Model) Default: "chatgpt" |
Request Body schema: application/jsonrequired
required | object (Resources) | ||||||||||
|
Responses
Request samples
- Payload
{- "resources": {
- "property1": {
- "fields": {
- "property1": "string",
- "property2": "string"
}
}, - "property2": {
- "fields": {
- "property1": "string",
- "property2": "string"
}
}
}
}
Response samples
- 200
- 422
null
Knowledgebox Models Configuration
Current configuration of models assigned to a knowledgebox
path Parameters
kbid required | string (Kbid) |
Responses
Response samples
- 200
- 422
{- "semantic_model": "string",
- "anonymization_model": "string",
- "generative_model": "string",
- "ner_model": "string",
- "visual_labeling": "disabled",
- "user_keys": {
- "openai": {
- "key": "string",
- "org": "string"
}, - "azure_openai": {
- "key": "string",
- "url": "string",
- "deployment": "string",
- "model": "string"
}, - "palm": {
- "credentials": "string",
- "location": "string"
}, - "cohere": {
- "key": "string"
}, - "anthropic": {
- "key": "string"
}
}, - "user_prompts": {
- "openai": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this {question}"
}, - "azure_openai": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this {question}"
}, - "palm": {
- "prompt": "Answer my question in an informal tone, based only in this context: {context}. Question: {question}"
}, - "cohere": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: {context}, answer this {question}:"
}, - "anthropic": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}, - "text_generation": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: {context}, answer this question: \"{question}\" :"
}
}, - "semantic_vector_similarity": "string",
- "semantic_vector_size": 0,
- "semantic_threshold": 0
}
Knowledgebox Models 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" | |
GenerativeModel (string) or Generative Model (string) (Generative Model) Default: "chatgpt-azure" | |
NERModel (string) or Ner Model (string) (Ner Model) Default: "multilingual" | |
object (UserLearningKeys) | |
object (UserPrompts) |
Responses
Request samples
- Payload
{- "anonymization_model": "disabled",
- "visual_labeling": "disabled",
- "generative_model": "chatgpt-azure",
- "ner_model": "multilingual",
- "user_keys": {
- "openai": {
- "key": "string",
- "org": "string"
}, - "azure_openai": {
- "key": "string",
- "url": "string",
- "deployment": "string",
- "model": "string"
}, - "palm": {
- "credentials": "string",
- "location": "string"
}, - "cohere": {
- "key": "string"
}, - "anthropic": {
- "key": "string"
}
}, - "user_prompts": {
- "openai": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this {question}"
}, - "azure_openai": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this {question}"
}, - "palm": {
- "prompt": "Answer my question in an informal tone, based only in this context: {context}. Question: {question}"
}, - "cohere": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: {context}, answer this {question}:"
}, - "anthropic": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}, - "text_generation": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: {context}, answer this question: \"{question}\" :"
}
}
}
Response samples
- 422
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
]
}
Get Processed Activity Log
Get latest events related to activity of a Nuclia Understanding API client
path Parameters
account_slug required | string (Account Slug) |
client_id required | string (Client Id) |
query Parameters
page | integer (Page) Default: 0 |
size | integer (Size) Default: 50 |
Responses
Response samples
- 200
- 422
{- "events": [
- { }
], - "pagination": {
- "page": 0,
- "size": 0,
- "last": true
}
}
Get Knowledgebox Activity Deprecated
Get latest events related to activity of a knowledgebox
path Parameters
kb_uuid required | string (Kb Uuid) |
query Parameters
type | string (EventType) Default: "PROCESSED" Enum: "VISITED" "MODIFIED" "DELETED" "NEW" "STARTED" "STOPPED" "SEARCH" "PROCESSED" "SUGGEST" "CHAT" An enumeration. |
page | integer (Page) Default: 0 |
size | integer (Size) Default: 50 |
Responses
Response samples
- 200
- 422
{- "events": [
- { }
], - "pagination": {
- "page": 0,
- "size": 0,
- "last": true
}
}
Download Knowledgebox Activity
Download the csv file for the activity audit for a given month
path Parameters
kb_uuid required | string (Kb Uuid) |
query Parameters
type required | string (EventType) Enum: "VISITED" "MODIFIED" "DELETED" "NEW" "STARTED" "STOPPED" "SEARCH" "PROCESSED" "SUGGEST" "CHAT" Audit event type |
month required | string (Month) ^\d+-(0[1-9]|1[012])$ Month in YYYY-MM format |
Responses
Response samples
- 200
- 422
null
Get Knowledgebox Activity Downloads List
Get the list of monthly activity audit files available to download
path Parameters
kb_uuid required | string (Kb Uuid) |
query Parameters
type required | string (EventType) Enum: "VISITED" "MODIFIED" "DELETED" "NEW" "STARTED" "STOPPED" "SEARCH" "PROCESSED" "SUGGEST" "CHAT" Audit event type |
Responses
Response samples
- 200
- 422
{- "downloads": [
- "string"
]
}